*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --dark-blue: #1a2b4c;
    --light-blue: #3a6fc5;
    --sky-blue: #75b4ff;
    --gold: #f5c518;
    --silver: #e0e0e0;
    --white: #ffffff;
    --light-gray: #f5f6f7;
    --dark-gray: #2c3e50;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--light-blue) 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--white);
    min-height: 100vh;
    padding: 0;
}

header {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    border-bottom: 2px solid var(--gold);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: var(--white);
}

.team-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 3px solid var(--gold);
}

.team-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.team-info {
    margin-bottom: 2rem;
}

.team-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--sky-blue);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card p {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
}

.players-section {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--white);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gold);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.options-label {
    font-size: 1.1rem;
    font-weight: 600;
}

#players {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

#players:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.3);
}

#players option {
    background: var(--dark-blue);
    color: var(--white);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.player-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--light-blue);
    position: relative;
    overflow: hidden;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--light-blue), var(--gold));
}

.player-card.captain {
    border-top-color: var(--gold);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 197, 24, 0.1) 100%);
}

.player-card h2 {
    font-size: 1.4rem;
    color: var(--dark-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-card h2::before {
    content: '⚽';
    font-size: 1.2rem;
}

.player-card.captain h2::before {
    content: '⭐';
}

.player-card p {
    margin-bottom: 0.7rem;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
}

.player-card p::before {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.player-card p:nth-child(2)::before {
    content: '📍';
}

.player-card p:nth-child(3)::before {
    content: '🔢';
}

.player-card p:nth-child(4)::before {
    content: '💬';
}

.player-card .nickname {
    color: var(--light-blue);
    font-weight: 600;
}

footer {
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    color: var(--silver);
    font-size: 0.9rem;
}

/* Add these styles to your existing CSS */

/* Improved nickname styling */
.nickname-info {
    margin-bottom: 0.7rem;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
}

.nickname-info::before {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    content: '💬';
}

.nickname.has-nickname {
    color: var(--light-blue);
    font-weight: 600;
    font-style: italic;
}

.nickname.no-nickname {
    color: #95a5a6;
    font-style: italic;
}

/* Position-based card accents */
.player-card[class*="forward"] {
    border-top-color: #e74c3c;
}

.player-card[class*="midfielder"] {
    border-top-color: #f39c12;
}

.player-card[class*="defender"] {
    border-top-color: #3498db;
}

.player-card[class*="goalkeeper"] {
    border-top-color: #9b59b6;
}

/* Player number badge */
.player-card {
    position: relative;
}

.player-card::after {
    content: attr(data-number);
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--light-blue);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.player-card.captain::after {
    background: var(--gold);
}


/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .title {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-controls {
        width: 100%;
        justify-content: space-between;
    }

    .team-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem;
    }

    .team-stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .player-card {
        padding: 1.2rem;
    }
}