/* ===== FONTS & RESET ===== */
/* Reset alle standaard browser margins, padding en zet box-sizing naar border-box */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Basis body styling met een modern font stack en gradient achtergrond */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Zachte beige gradient achtergrond voor een professionele uitstraling */
    background: linear-gradient(135deg, #ede7e3 0%, #f5f1ed 50%, #ede7e3 100%);
    min-height: 100vh;
    overflow-x: hidden; /* Voorkom horizontale scroll door animaties */
    position: relative;
}

/* ===== ANIMATED BACKGROUND ===== */
/* Container voor de geanimeerde achtergrond elementen */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Zit achter alle andere content */
    pointer-events: none; /* Voorkom interactie met de achtergrond shapes */
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Zwevende cirkel shapes met subtiele kleur en float animatie */
.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(155, 106, 108, 0.1), rgba(155, 106, 108, 0.05));
    animation: float 20s infinite linear;
}

/* Verschillende posities en grootes voor elke shape met staggered animatie delays */
.shape-1 { width: 80px; height: 80px; top: 20%; left: 10%; animation-delay: 0s; }
.shape-2 { width: 120px; height: 120px; top: 60%; left: 80%; animation-delay: -5s; }
.shape-3 { width: 60px; height: 60px; top: 80%; left: 20%; animation-delay: -10s; }
.shape-4 { width: 100px; height: 100px; top: 30%; left: 70%; animation-delay: -15s; }
.shape-5 { width: 140px; height: 140px; top: 10%; left: 60%; animation-delay: -7s; }
.shape-6 { width: 90px; height: 90px; top: 70%; left: 50%; animation-delay: -12s; }

/* Float animatie: shapes zweven op en neer met rotatie en opacity verandering */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.7;
    }
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ===== HEADER ===== */
.error-header {
    background-color: #ede7e3;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-text {
    font-size: 2rem;
    margin-left: 3rem;
    color: #9B6A6c;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* ===== MAIN CONTENT ===== */
.error-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-content {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

/* ===== ANIMATED 404 NUMBER ===== */
/* Container voor de grote 404 cijfers met perspectief voor 3D effect */
.error-number {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    perspective: 1000px; /* Geeft diepte aan de animaties */
}

/* Styling voor individuele cijfers van de 404 */
.digit {
    font-size: 8rem;
    font-weight: 900;
    color: #9B6A6c; /* Hoofdkleur van het thema */
    text-shadow: 0 10px 30px rgba(155, 106, 108, 0.3); /* Zachte schaduw voor diepte */
    animation: bounce 2s infinite ease-in-out; /* Continue bounce effect */
    display: inline-block;
    position: relative;
}

/* Gestaggerde animatie delays voor een golf-effect */
.digit-4-1 { animation-delay: 0s; }
.digit-0 { animation-delay: 0.2s; }
.digit-4-2 { animation-delay: 0.4s; }

/* Bounce animatie voor de cijfers */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); } /* Cijfers springen omhoog */
}

/* Zero Animation - Special orbital effect */
/* Speciale container voor het middelste cijfer (0) met orbital animatie */
.digit-0 {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.zero-animation {
    position: relative;
    width: 120px;
    height: 120px;
}

/* Orbital ring rond de 0 */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border: 4px solid rgba(155, 106, 108, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 4s linear infinite; /* Continue rotatie */
}

/* Planeet die rond de 0 draait */
.planet {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #9B6A6c;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(155, 106, 108, 0.5); /* Glow effect */
}

/* Rotatie animatie voor de orbital ring */
@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== ERROR MESSAGE ===== */
.error-message {
    margin-bottom: 3rem;
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #424b54;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-description {
    font-size: 1.2rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== INTERACTIVE SEARCH ===== */
/* Container voor de zoekfunctionaliteit */
.search-container {
    margin-bottom: 3rem;
}

.search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

/* Zoek input veld styling */
.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem; /* Extra padding links voor het zoek icoon */
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    font-size: 1.1rem;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    outline: none;
}

/* Focus state van het zoekveld met enhanced styling */
.search-input:focus {
    border-color: #9B6A6c; /* Thema kleur bij focus */
    box-shadow: 0 0 0 3px rgba(155, 106, 108, 0.1), 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px); /* Subtiele lift effect */
}

/* Zoek icoon gepositioneerd binnen het input veld */
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9B6A6c;
    z-index: 2;
}

/* Dropdown met zoeksuggesties */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
    margin-top: 0.5rem;
}

/* Zichtbare state van de suggesties dropdown */
.search-suggestions.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 0.75rem;
}

.suggestion-item:hover {
    background-color: rgba(155, 106, 108, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    color: #9B6A6c;
    width: 20px;
    height: 20px;
}

/* ===== ACTION BUTTONS ===== */
/* Flexbox container voor de knoppen */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap; /* Wrap op kleinere schermen */
}

/* Basis knop styling met flexbox voor icoon + tekst layout */
.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Subtiel glans effect overlay op hover */
.btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::before {
    opacity: 1;
}

/* Primaire knop met gradient en thema kleur */
.btn-primary {
    background: linear-gradient(135deg, #9B6A6c, #8a5d5f);
    color: white;
    box-shadow: 0 8px 25px rgba(155, 106, 108, 0.3);
}

/* Hover effect met lift en enhanced schaduw */
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(155, 106, 108, 0.4);
}

/* Secundaire knop met outline style */
.btn-secondary {
    background: white;
    color: #9B6A6c;
    border: 2px solid #9B6A6c;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Hover met inversie van kleuren */
.btn-secondary:hover {
    background: #9B6A6c;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(155, 106, 108, 0.3);
}

/* ===== INTERACTIVE ROCKET ===== */
/* Container voor de interactieve raket */
.interactive-element {
    margin-bottom: 3rem;
}

/* Raket met interactieve hover animatie */
.rocket {
    display: inline-block;
    cursor: pointer;
    position: relative;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Bouncy easing */
    margin-bottom: 1rem;
}

/* Raket tilt en lift effect bij hover */
.rocket:hover {
    transform: translateY(-10px) rotate(15deg);
}

/* Raket SVG met schaduw voor diepte */
.rocket svg {
    color: #9B6A6c;
    filter: drop-shadow(0 5px 15px rgba(155, 106, 108, 0.3));
}

/* Container voor de raket uitlaat vlammen */
.exhaust {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

/* Toon de uitlaat vlammen alleen bij hover */
.rocket:hover .exhaust {
    opacity: 1;
}

/* Basis styling voor vlam elementen */
.flame {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; /* Vlam vorm */
}

/* Drie verschillende vlammen met variërende kleuren en snelheden */
.flame-1 {
    width: 6px;
    height: 15px;
    background: linear-gradient(to top, #ff6b35, #f7931e); /* Oranje naar geel */
    animation: flicker 0.1s infinite alternate; /* Snelle flikkering */
}

.flame-2 {
    width: 4px;
    height: 12px;
    background: linear-gradient(to top, #f7931e, #ffcc02);
    left: 40%; /* Iets naar links */
    animation: flicker 0.15s infinite alternate;
}

.flame-3 {
    width: 4px;
    height: 12px;
    background: linear-gradient(to top, #f7931e, #ffcc02);
    left: 60%; /* Iets naar rechts */
    animation: flicker 0.12s infinite alternate;
}

/* Flikkering animatie voor de vlammen - creëert een realistisch vuur effect */
@keyframes flicker {
    0% { transform: translateX(-50%) scaleY(1); }
    100% { transform: translateX(-50%) scaleY(0.8) scaleX(1.1); } /* Vlam wordt korter en breder */
}

/* Tekst onder de raket */
.rocket-text {
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.5rem;
}

/* ===== EASTER EGG COUNTER ===== */
.easter-egg {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.egg-text {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

#visitCounter {
    color: #9B6A6c;
    font-weight: 600;
    font-size: 1.1rem;
}

.konami-hint {
    opacity: 0.6;
    transition: opacity 0.3s;
}

.konami-hint:hover {
    opacity: 1;
}

/* ===== KONAMI CODE MODAL ===== */
/* Modal overlay voor de Konami code easter egg - wordt getoond met speciale toetsencombinatie */
.konami-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Donkere overlay */
    backdrop-filter: blur(10px); /* Blur effect voor de achtergrond */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* Boven alle andere content */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Zichtbare state van de modal */
.konami-modal.show {
    opacity: 1;
    visibility: visible;
}

/* Content box binnen de modal */
.konami-content {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8); /* Start verkleind */
    transition: transform 0.3s ease;
}

/* Scale up animatie wanneer modal getoond wordt */
.konami-modal.show .konami-content {
    transform: scale(1);
}

.konami-content h2 {
    color: #9B6A6c;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.konami-content p {
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.achievement {
    background: linear-gradient(135deg, rgba(155, 106, 108, 0.1), rgba(155, 106, 108, 0.05));
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.achievement svg {
    color: #9B6A6c;
    margin-bottom: 1rem;
}

.achievement h3 {
    color: #424b54;
    font-size: 1.3rem;
}

/* ===== FOOTER ===== */
.error-footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    border-top: 1px solid rgba(155, 106, 108, 0.1);
}

.error-code {
    color: #9B6A6c;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* ===== SPECIAL ANIMATIONS ===== */
/* Raket lanceer animatie - vliegt uit beeld naar boven */
.launch-animation {
    animation: launch 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes launch {
    0% {
        transform: translateY(0) rotate(15deg) scale(1);
    }
    50% {
        transform: translateY(-100px) rotate(45deg) scale(1.2);
    }
    100% {
        transform: translateY(-200vh) rotate(90deg) scale(0.5);
        opacity: 0; /* Vervaagt terwijl het vliegt */
    }
}

/* Shake animatie voor foutieve acties */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); } /* Links */
    75% { transform: translateX(5px); } /* Rechts */
}

/* ===== RESPONSIVE DESIGN ===== */
/* Tablet en kleiner (768px en minder) */
@media (max-width: 768px) {
    .header-text {
        font-size: 1.5rem;
        margin-left: 1rem;
    }
    
    /* Verminder ruimte tussen de 404 cijfers */
    .error-number {
        gap: 1rem;
    }
    
    /* Kleinere cijfers op tablet */
    .digit {
        font-size: 4rem;
    }
    
    .error-title {
        font-size: 1.8rem;
    }
    
    .error-description {
        font-size: 1rem;
    }
    
    /* Stack knoppen verticaal op kleinere schermen */
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Kleinere modal op tablet */
    .konami-content {
        margin: 1rem;
        padding: 2rem;
    }
}

/* Mobiel (480px en minder) */
@media (max-width: 480px) {
    /* Nog kleinere cijfers op mobiel */
    .digit {
        font-size: 3rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    /* Kleinere zoekbalk op mobiel */
    .search-input {
        font-size: 1rem;
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    }
}