* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

header {
    background-color: #3D8F0C;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    width: 100%;
}

.header-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-width: 0; /* Prevents flex items from overflowing */
}

.logo-section {
    justify-content: flex-start;
}

.logo-section img {
    max-height: 80px;
    width: auto;
}

.title-section {
    text-align: center;
}

.team-level {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.nav-section {
    justify-content: flex-end;
}

.nav-section ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

nav ul li a:hover {
    color: #e3f2fd;
}

nav ul li a.active {
    border-bottom: 2px solid white;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.team-section h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #3D8F0C;
}

.team-banner {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.team-banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.player-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.player-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.player-info {
    padding: 1rem;
}

.player-info h3 {
    margin-bottom: 0.5rem;
    color: #3D8F0C;
}

.player-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close-button:hover {
    color: #3D8F0C;
}

.player-detail {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.player-detail-image {
    width: 300px;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.player-detail-info {
    flex: 1;
}

.player-detail-info h2 {
    color: #3D8F0C;
    margin-bottom: 1rem;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

.stat-item h4 {
    color: #3D8F0C;
    margin-bottom: 0.5rem;
}

/* Schedule Page Styles */
.schedule-section h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #3D8F0C;
}

.tournament-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.tournament-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tournament-card h3 {
    color: #3D8F0C;
    margin-bottom: 1rem;
}

.tournament-card .date {
    color: #e91e63;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.tournament-card .location {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.tournament-card .address {
    color: #666;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: #3D8F0C;
    color: white;
    margin-top: 4rem;
}

/* Mobile-first responsive styles */
@media screen and (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
        align-items: center;
    }

    .header-section {
        width: 100%;
        padding: 0.5rem;
        justify-content: center;
    }

    .logo-section {
        justify-content: center;
    }

    .logo-section img {
        max-height: 60px;
    }

    .team-level {
        font-size: 1.5rem;
    }

    .nav-section {
        justify-content: center;
    }

    .nav-section ul {
        justify-content: center;
        gap: 1.5rem;
    }

    .nav-section ul {
        justify-content: center;
        gap: 1.5rem;
    }

    .player-detail {
        flex-direction: column;
        align-items: center;
    }

    .player-detail-image {
        width: 100%;
        max-width: 300px;
        height: auto;
    }

    .modal-content {
        margin: 2% auto;
        padding: 1rem;
        width: 95%;
    }

    .player-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .player-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }

    main {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .team-banner {
        max-height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .team-level {
        font-size: 1.3rem;
    }

    .player-grid {
        grid-template-columns: 1fr;
    }

    .player-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .tournament-list {
        grid-template-columns: 1fr;
    }
}
