@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700;900&display=swap');

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

body, html {
    width: 100%;
    background-color: #000;
    font-family: 'Inter', sans-serif;
    color: white;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* BACKGROUND */
.background-scroller {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 120vw;
    height: 140vh;
    z-index: 1;
    transform: rotate(-12deg);
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0.5;
    pointer-events: none;
}

.scroller-row {
    display: flex;
    gap: 20px;
    width: max-content;
}

.scroller-row img { 
    width: 160px; 
    height: 160px; 
    border-radius: 12px; 
    object-fit: cover; 
}

.background-overlay {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0) 50%, 
        rgba(0, 0, 0, 1) 95%
    );
    z-index: 2; /* De gradient blijft laag */
    pointer-events: none;
}

/* HERO & NAV */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 5; /* Iets verlaagd t.o.v. nav voor betere layering */
    background: radial-gradient(circle at top, rgba(43, 10, 10, 0.8) 0%, rgba(0, 0, 0, 0.95) 90%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* HERO & NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    
    /* FIX: Blur en Mask op de volledige breedte */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
    
    display: flex;
    justify-content: center;
}

.nav-content {
    width: 100%;
    max-width: 1400px;
    padding: 20px 50px;
    display: grid;
    /* FIX: 1fr 1fr 1fr dwingt drie exact gelijke kolommen af, 
       waardoor de middelste (nav-links) ALTIJD perfect gecentreerd is */
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
}

#site-logo {
    height: 18px;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
    justify-content: center; /* Center de links in de middelste kolom */
}

.nav-links a {
    color: #999;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding: 10px 0;
    transition: color 0.4s ease;
}

.nav-links a:hover { color: #fff; }

.nav-links a span:after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #d10000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a:hover span:after { transform: scaleX(1); }

.nav-socials {
    display: flex;
    gap: 25px;
    justify-content: flex-end;
}

.social-icon {
    color: #fff;
    font-size: 22px;
    text-decoration: none;
    transition: 0.3s;
}

.social-icon:hover {
    color: #d10000;
    transform: translateY(-2px);
}

/* CONTENT */
.content { 
    text-align: center; 
    position: relative; 
    z-index: 20; /* Dwingt content BOVEN de gradient */
}

h1 {
    font-size: 3.8rem;
    font-weight: 500;
    letter-spacing: -1.5px;
    margin-bottom: 15px;
    line-height: 1.1;
}

.highlight { color: #d10000; }

.content p {
    color: #888;
    font-size: 14px;
    max-width: 480px;
    margin: 0 auto 35px auto;
}

.buttons { display: flex; gap: 15px; justify-content: center; }

/* --- GEUPDATE KNOPPEN MET SUBTIELE TWEEN --- */
.btn-primary, .btn-secondary {
    display: inline-block;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    
    /* De Tween instellingen */
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.2, 1), 
                background-color 0.3s ease, 
                box-shadow 0.3s ease,
                filter 0.3s ease;
    will-change: transform;
}

/* Primary (Rood) */
.btn-primary {
    background-color: #d10000;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #ff0000;
    transform: translateY(-2px) scale(1.03); /* Gaat iets omhoog en wordt groter */
    box-shadow: 0 10px 20px rgba(209, 0, 0, 0.3); /* Zachte rode gloed */
    filter: brightness(1.1);
}

/* Secondary (Wit) */
.btn-secondary {
    background-color: white;
    color: black;
    border: none;
}

.btn-secondary:hover {
    background-color: #ffffff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1); /* Zachte witte gloed */
    filter: contrast(1.1);
}

/* 'Klik' effect voor beide knoppen */
.btn-primary:active, .btn-secondary:active {
    transform: translateY(0) scale(0.97); /* Knoppen 'drukken in' als je klikt */
}

/* STATS - FIX VOOR LEESBAARHEID BOVEN DE GRADIENT */
.stats { 
    display: flex; 
    gap: 100px; 
    margin-top: 80px; 
    position: relative; 
    z-index: 30; /* Hoogste z-index om door de gradient heen te breken */
}

.stat-item p { 
    color: #fff; 
    font-size: 13px; 
    margin-bottom: 8px; 
    opacity: 0.8; 
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-item h2 { 
    font-size: 2.5rem; 
    font-weight: 700; 
    color: #fff; 
    text-shadow: 0 4px 10px rgba(0,0,0,0.5); /* Kleine schaduw voor diepte */
}

/* ABOUT ME SECTION */
.about-me {
    position: relative;
    z-index: 10;
    padding: 100px 50px;
    background-color: #000; 
    display: flex;
    justify-content: center;
}

.about-container {
    max-width: 1100px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image img {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    border: 2px solid #d10000;
    object-fit: cover;
    box-shadow: 0 0 20px rgba(209, 0, 0, 0.2);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.about-text p {
    color: #fff; 
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.9;
}

.works-section {
    position: relative;
    z-index: 20; /* Hoger dan de scroller */
    padding: 100px 50px;
    background-color: #000; /* Volledig zwart zoals About Me */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centreert de titel en grid */
    overflow: hidden;
}

/* De rode gloed achter de grid */
.grid-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1500px; /* Breedte van de lichtbron */
    height: 1000px; /* Hoogte van de lichtbron */
    background: radial-gradient(circle, rgba(209, 0, 0, 0.15) 0%, rgba(209, 0, 0, 0) 70%);
    filter: blur(80px); /* Maakt het licht heel zacht */
    z-index: 1; /* Achter de kaarten (die op z-index 2 of hoger staan) */
    pointer-events: none; /* Je moet er doorheen kunnen klikken */
}

.works-title {
    font-size: 3rem;
    margin-bottom: 50px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}

.works-container {
    /* Was 1400px, nu 1000px maakt de vakken direct een stuk kleiner */
    max-width: 1000px; 
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.works-header {
    margin-bottom: 20px;
    color: #c7c7c7; /* Iets donkerder grijs voor de '12 experiences' tekst */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.works-grid {
    perspective: 1000px; /* Cruciaal: dit geeft de grid zijn diepte-veld */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; 
}

.game-card {
    text-decoration: none;
    color: white;
    border-radius: 12px; 
    overflow: hidden; /* Houdt de hoeken rond */
    position: relative;
    aspect-ratio: 1 / 1;
    
    /* DE FIX VOOR DE CORNERS */
    isolation: isolate; /* Dwingt de browser om de hoeken te respecteren */
    backface-visibility: hidden; /* Voorkomt flikkering en glitches */
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* Forceert ronde hoeken in Safari/Chrome */
    
    /* 3D EIGENSCHAPPEN */
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: #111;
}

.game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* De donkere schaduw die op de icon ligt */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Donkere overlay */
    transition: opacity 0.4s ease;
    z-index: 1;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Minder padding rondom de tekst */
    padding: 12px; 
    z-index: 2;
}

.game-title {
    /* Kleiner font voor de nieuwe afmetingen */
    font-size: 1.05rem; 
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.game-stats-bar {
    background: rgba(0, 0, 0, 0.75); /* Iets donkerder voor beter contrast */
    backdrop-filter: blur(10px);
    padding: 7px 14px;              /* Iets ruimer (was 5px 10px) */
    border-radius: 8px;             /* Iets ronder */
    display: flex;
    gap: 12px;                      /* Meer ruimte tussen Visits en CCU */
    font-size: 10px;                /* Iets groter (was 9px) */
    font-weight: 800;               /* Veel dikker/vetter (was 600) */
    width: fit-content;
    border: 1px solid rgba(255,255,255,0.15); /* Randje iets duidelijker */
    letter-spacing: 0.3px;          /* Tekst iets makkelijker leesbaar */
}

.active-players {
    color: #00ff88; /* Groen voor CCU */
}

.active-players i {
    font-size: 8px;
    vertical-align: middle;
}

/* Play button die verschijnt op hover */
.play-button {
    background: white;
    color: black;
    /* Compactere button */
    padding: 8px; 
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 900;
    font-size: 11px;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- HIER DE HOVER FIX VOOR LICHTROOD --- */
.play-button:hover {
    background-color: #ff4d4d; /* Een mooie, lichtrode tint */
    color: white; /* Tekstkleur naar wit voor betere leesbaarheid */
}

/* Let op: de .game-card:hover .play-button zorgt ervoor dat de knop verschijnt */
.game-card:hover .play-button {
    opacity: 1;
    transform: translateY(0);
}

/* --- HOVER EFFECTS --- */

.game-card:hover .game-img {
    transform: scale(1.05) translateZ(10px); /* Iets subtieler zoom, plus een kleine 'lift' */
}

.game-card:hover .card-overlay {
    opacity: 0.2; /* Maakt de overlay bijna onzichtbaar */
}

.game-card:hover .play-button {
    opacity: 1;
    transform: translateY(0); /* Komt omhoog */
}

/* Responsive: op mobiel 2 kolommen */
@media (max-width: 1000px) {
    .works-grid { grid-template-columns: repeat(2, 1fr); }
}

/* FOOTER STYLING */
.site-footer {
    background-color: #000;
    padding: 60px 50px 30px 50px;
    position: relative;
    z-index: 100;
    /* HET NIEUWE FIJNE LIJNTJE BOVENAAN */
    border-top: 1px solid #1a1a1a; 
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 28px; /* Iets groter nu de tekst weg is */
    width: auto;
    opacity: 0.9;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-social-icon {
    width: 40px;
    height: 40px;
    background-color: #0a0a0a; /* Donkere fill zoals screenshot */
    border: 1px solid #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999; /* Iets grijzer, wit op hover */
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.footer-social-icon:hover {
    color: white;
    border-color: #d10000;
    background-color: #d10000;
    transform: translateY(-3px);
}

.footer-divider {
    border: 0;
    height: 1px;
    background: #1a1a1a; /* Hetzelfde lijntje als bovenin */
    margin-bottom: 25px;
}

.footer-bottom {
    color: #444; /* Donkergrijs zoals screenshot */
    font-size: 12px;
    font-weight: 400;
}

/* --- GEFIKSTE LOGO BUTTONS (BOVEN EN ONDER) --- */

/* Algemene styling voor beide logo-links */
.logo-link {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.2, 1, 0.2, 1);
    will-change: transform;
}

/* Specifiek voor het logo BOVEN (in de nav) */
nav .logo-link {
    width: 72px; 
    height: 32px;
}
nav .logo-link img {
    height: 18px; /* Kleiner voor de nav bar */
    width: auto;
}

/* Specifiek voor het logo BENEDEN (in de footer) */
.footer-logo .logo-link {
    width: auto; /* Mag zijn eigen ruimte pakken */
    justify-content: flex-start; /* Uitlijnen naar links */
}
.footer-logo .logo-link img {
    height: 32px; /* Groter gemaakt voor de footer */
    width: auto;
}

/* Subtiele effecten voor beide knoppen */
.logo-link:hover {
    transform: scale(1.02); 
    filter: brightness(1.1);
}

.logo-link:active {
    transform: scale(0.98);
}

#game-count, #dynamic-visits {
    color: #ff0000;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(209, 0, 0, 0.2);
}

/* ANIMATIONS */
.row-left { animation: scrollLeft 80s linear infinite; }
.row-right { animation: scrollRight 80s linear infinite; }

@keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-20%); } }
@keyframes scrollRight { 0% { transform: translateX(-20%); } 100% { transform: translateX(0); } }

/* --- IN-TWEEN ANIMATIES --- */

/* 1. Titel Typewriter effect */
.titel-container {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid transparent; /* De 'cursor' */
    width: 0;
    margin: 0 auto;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #d10000; }
}

/* 2. Fade-in-up voor knoppen en stats */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay voor een 'staircase' effect */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }