:root {
    --primary: #2563eb;
    /* Royal Blue */
    --primary-dark: #1e40af;
    /* Dark Blue */
    --accent: #ffffff;
    /* White */
    --dark-bg: #0f172a;
    /* Slate 900 */
    --card-bg: rgba(15, 23, 42, 0.6);
    /* Darker slate for glass */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Typography & Grid Adjustments */
@media (max-width: 768px) {
    :root {
        --font-size-base: 14px;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 1.8rem !important;
    }
}

/* Navigation & Hamburger */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    transition: all 0.3s ease;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 3rem;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li a {
        font-size: 1.5rem;
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent), url('Images/Equipe/team.jpg');
    background-size: cover;
    background-position: center;
    padding-bottom: 40px;
    padding-left: 40px;
}

.hero-match-card {
    max-width: 700px;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--primary);
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-match-info {
    text-align: left;
    flex: 0 0 auto;
}

.hero-match-title {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.hero-match-label {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.hero-match-teams {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
}

.team-mini {
    text-align: center;
}

.vs-divider {
    text-align: center;
}

@media (max-width: 768px) {
    .hero-section {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 20px;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-match-card {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 100%;
        padding: 1.25rem;
    }

    .hero-match-info {
        text-align: center;
    }

    .hero-match-teams {
        width: 100%;
        justify-content: space-evenly;
    }
}

/* Custom Scrollbar for Photo Gallery */
#photos-grid::-webkit-scrollbar {
    height: 8px;
}

#photos-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#photos-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

#photos-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Custom Interaction for Photo Gallery */
#photos-grid {
    cursor: grab;
    user-select: none;
}

#photos-grid:active {
    cursor: grabbing;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
    color: var(--primary);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.photo-item {
    min-width: 400px;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.photo-item img:hover {
    transform: scale(1.05);
}

/* Photo Gallery Responsive Overrides */
@media (max-width: 900px) {
    .photo-item {
        min-width: 300px;
        height: 220px;
    }
}

@media (max-width: 768px) {
    #photos-grid {
        flex-direction: column !important;
        gap: 1.5rem !important;
        overflow-x: hidden !important;
        padding-bottom: 2rem;
    }

    .photo-item {
        min-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 3;
    }

    .photo-item img {
        height: 100% !important;
    }
}

/* Player Card Enhancements */
.player-photo-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    position: relative;
    border-radius: 50%;
    border: 4px solid var(--primary);
    overflow: hidden;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.player-photo-placeholder {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.player-number-badge {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    border: 3px solid var(--dark-bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.glass:hover .player-photo {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .player-photo-container {
        width: 150px;
        height: 150px;
    }
}

.match-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .match-details-grid {
        grid-template-columns: 1fr;
    }
}

.player-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.player-card-link:hover {
    transform: translateY(-10px);
}

.glass.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.glass.clickable:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}