/* --- RESET & VARIABLES --- */
:root {
    --bg-dark: #0a0a0f;
    --bg-panel: #12121a;
    --bg-card: #1a1a25;
    --primary: #00ff88;
    --primary-dim: #00cc6a;
    --accent: #00d4ff;
    --text-main: #e8e8e8;
    --text-muted: #9999aa;
    --border: #2a2a3a;
    
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.2);
    --radius: 8px;
    
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

html.no-scroll {
    overflow: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- UTILITIES --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.highlight { color: var(--primary); }
.cursor { animation: blink 1s infinite; }

@keyframes blink { 50% { opacity: 0; } }

/* --- SCROLL PROGRESS --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9999;
    box-shadow: 0 0 10px var(--primary);
    transition: width 0.1s;
}

/* --- LOCK SCREEN --- */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.98);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.lock-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lock-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
}

.lock-icon-container {
    margin-bottom: 30px;
    animation: lockPulse 2s ease-in-out infinite;
}

@keyframes lockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.lock-icon {
    position: relative;
    width: 120px;
    height: 140px;
    margin: 0 auto;
}

.lock-shackle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 60px;
    border: 8px solid var(--primary);
    border-bottom: none;
    border-radius: 35px 35px 0 0;
    animation: shackleShake 0.5s ease-in-out infinite;
}

@keyframes shackleShake {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(-5deg); }
    75% { transform: translateX(-50%) rotate(5deg); }
}

.lock-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 70px;
    background: linear-gradient(145deg, #1a1a25, #0d0d15);
    border: 3px solid var(--primary);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.lock-keyhole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 30px;
    background: var(--bg-dark);
    border-radius: 10px 10px 20px 20px;
    border: 2px solid var(--primary);
}

.lock-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #ff6b6b;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    animation: titleGlitch 3s ease-in-out infinite;
}

@keyframes titleGlitch {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 107, 107, 0.5); }
    50% { text-shadow: 0 0 30px rgba(255, 107, 107, 0.8); }
}

.lock-subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1rem;
}

/* --- QUIZ STYLES --- */
.quiz-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: left;
}

.quiz-question {
    margin-bottom: 25px;
}

.question-number {
    display: inline-block;
    background: var(--primary);
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 15px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-main);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.05);
    transform: translateX(5px);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.quiz-option.correct {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.15);
    animation: optionSuccess 0.5s ease;
}

@keyframes optionSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.quiz-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    display: none;
}

.quiz-feedback.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.quiz-feedback.positive {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.next-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    display: none;
}

.next-btn.show {
    display: inline-block;
}

.next-btn:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    transform: translateY(-2px);
}

/* --- ACCESS GRANTED --- */
.access-granted {
    text-align: center;
    padding: 40px;
}

.checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--primary);
    animation: checkmarkPop 0.6s ease;
}

@keyframes checkmarkPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.access-granted h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.access-granted p {
    color: var(--text-muted);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- GLITCH OVERLAY --- */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    background: transparent;
    transition: opacity 0.3s ease;
}

.glitch-overlay.active {
    animation: glitchOverlay 0.6s ease-in-out;
}

@keyframes glitchOverlay {
    0% { opacity: 0; background: transparent; transform: translate(0); }
    10% { opacity: 0.4; background: rgba(0, 255, 136, 0.15); transform: translate(-2px, 2px); }
    20% { opacity: 0; background: transparent; transform: translate(2px, -2px); }
    30% { opacity: 0.5; background: rgba(0, 255, 136, 0.2); transform: translate(-3px, 1px); }
    40% { opacity: 0; background: transparent; transform: translate(1px, -1px); }
    50% { opacity: 0.6; background: rgba(0, 255, 136, 0.25); transform: translate(-1px, 3px); }
    60% { opacity: 0; background: transparent; transform: translate(2px, -2px); }
    70% { opacity: 0.4; background: rgba(0, 255, 136, 0.15); transform: translate(-2px, 1px); }
    80% { opacity: 0; background: transparent; transform: translate(1px, -1px); }
    90% { opacity: 0.3; background: rgba(0, 255, 136, 0.1); transform: translate(-1px, 2px); }
    100% { opacity: 0; background: transparent; transform: translate(0); }
}

/* --- GLITCH EFFECT ON ELEMENTS --- */
.glitch-active {
    animation: elementGlitch 0.6s ease-in-out;
    filter: hue-rotate(90deg) contrast(1.2);
}

@keyframes elementGlitch {
    0% { transform: translate(0); filter: hue-rotate(0deg); }
    10% { transform: translate(-5px, 5px); filter: hue-rotate(90deg); }
    20% { transform: translate(5px, -5px); filter: hue-rotate(180deg); }
    30% { transform: translate(-5px, -5px); filter: hue-rotate(270deg); }
    40% { transform: translate(5px, 5px); filter: hue-rotate(0deg); }
    50% { transform: translate(-3px, 3px); filter: hue-rotate(90deg); }
    60% { transform: translate(3px, -3px); filter: hue-rotate(180deg); }
    70% { transform: translate(-3px, -3px); filter: hue-rotate(270deg); }
    80% { transform: translate(3px, 3px); filter: hue-rotate(0deg); }
    90% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
    100% { transform: translate(0); filter: hue-rotate(0deg); }
}

/* --- BUTTON GLITCH TRANSITION --- */
.btn-glitch-transition {
    position: relative;
    overflow: hidden;
}

.btn-glitch-transition::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-glitch-transition:hover::before {
    left: 100%;
}

.btn-glitch-transition:active {
    animation: buttonPressGlitch 0.4s ease-in-out;
}

@keyframes buttonPressGlitch {
    0% { transform: scale(1); filter: hue-rotate(0deg); }
    25% { transform: scale(0.95) translateX(-2px); filter: hue-rotate(90deg); }
    50% { transform: scale(1.02) translateX(2px); filter: hue-rotate(180deg); }
    75% { transform: scale(0.98) translateX(-1px); filter: hue-rotate(270deg); }
    100% { transform: scale(1); filter: hue-rotate(0deg); }
}

/* --- SNAKE GAME MODAL --- */
.snake-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.98);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.snake-modal.active {
    display: flex;
    opacity: 1;
}

.snake-container {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.snake-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
    z-index: 10;
}

.snake-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.snake-header {
    text-align: center;
    margin-bottom: 20px;
}

.snake-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-main);
    margin-bottom: 5px;
}

.snake-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

#snake-canvas {
    width: 100%;
    aspect-ratio: 1;
    background: #0d0d15;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    display: block;
}

.snake-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.95);
    border-radius: var(--radius);
    z-index: 5;
}

.snake-start-screen,
.snake-game-over,
.snake-victory {
    text-align: center;
    padding: 30px;
}

.snake-start-screen h3,
.snake-game-over h3,
.snake-victory h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.snake-start-screen p,
.snake-game-over p {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.snake-hint {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 25px !important;
}

.snake-start-btn,
.snake-restart-btn,
.snake-close-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.3s ease;
    margin-top: 15px;
}

.snake-start-btn:hover,
.snake-restart-btn:hover,
.snake-close-btn:hover {
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
    transform: translateY(-3px);
}

.victory-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--primary);
    animation: completePop 0.6s ease;
}

@keyframes completePop {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

.victory-message {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 25px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.snake-score {
    font-size: 1.2rem;
    color: var(--text-main);
}

.snake-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.snake-score-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-value {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
}

.snake-languages-collected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.lang-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    transition: transform 0.3s ease;
    animation: langPop 0.4s ease;
}

@keyframes langPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.lang-icon:hover {
    transform: scale(1.2);
}

/* --- GIFT BOX ANIMATION - ENHANCED --- */
.gift-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
    perspective: 1000px;
}

.gift-box {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}

.gift-box:hover {
    animation: giftShake 0.6s ease-in-out infinite;
}

@keyframes giftShake {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    20% { transform: rotate(-8deg) translateY(-5px); }
    40% { transform: rotate(8deg) translateY(5px); }
    60% { transform: rotate(-8deg) translateY(-5px); }
    80% { transform: rotate(8deg) translateY(5px); }
}

.gift-lid {
    position: absolute;
    top: 15px;
    left: 10px;
    width: 160px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 50%, #ff8787 100%);
    border-radius: 10px;
    z-index: 3;
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5),
                inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.gift-lid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 50px;
    background: linear-gradient(135deg, #ffd93d 0%, #ffb900 100%);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(255, 217, 61, 0.4);
}

.gift-lid::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 15px;
    background: linear-gradient(135deg, #ff5252 0%, #ee5a5a 100%);
    border-radius: 0 0 8px 8px;
}

.gift-body {
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 140px;
    height: 120px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 50%, #ff8787 100%);
    border-radius: 10px;
    z-index: 2;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.6),
                inset 0 2px 15px rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.gift-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 120px;
    background: linear-gradient(135deg, #ffd93d 0%, #ffb900 100%);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(255, 217, 61, 0.4);
}

.gift-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, #ff5252 0%, #ee5a5a 100%);
    border-radius: 0 0 8px 8px;
}

.gift-ribbon {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    z-index: 4;
}

.gift-ribbon::before,
.gift-ribbon::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 10px solid #ffd93d;
    border-radius: 50%;
    top: 0;
    box-shadow: 0 3px 10px rgba(255, 217, 61, 0.5);
}

.gift-ribbon::before {
    left: -25px;
    border-color: transparent transparent #ffd93d #ffd93d;
    transform: rotate(-45deg);
}

.gift-ribbon::after {
    right: -25px;
    left: auto;
    border-color: transparent #ffd93d #ffd93d transparent;
    transform: rotate(-45deg);
}

.gift-box.opened .gift-lid {
    transform: translateY(-150px) rotate(-25deg) translateX(30px);
    opacity: 0;
}

.gift-opened {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: none;
}

.gift-opened.show {
    display: block;
    animation: giftOpenReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes giftOpenReveal {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
        filter: brightness(0);
    }
    50% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
        filter: brightness(1.2);
    }
    100% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        filter: brightness(1);
    }
}

.gift-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 10;
}

.message-line {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    position: relative;
}

.message-line.line-1 {
    animation: messageRevealEnhanced 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.message-line.line-2 {
    animation: messageRevealEnhanced 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
    font-size: 2.5rem;
    color: var(--accent);
    letter-spacing: 6px;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
}

@keyframes messageRevealEnhanced {
    0% { 
        opacity: 0; 
        transform: translateY(30px) scale(0.8) rotate(-5deg);
        filter: blur(10px);
    }
    50% {
        filter: blur(0px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

.gift-sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: sparkleFlyEnhanced 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    box-shadow: 0 0 15px var(--primary);
}

@keyframes sparkleFlyEnhanced {
    0% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% { 
        opacity: 0; 
        transform: translate(var(--tx), var(--ty)) scale(0) rotate(720deg);
    }
}

/* Light rays from gift */
.gift-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    pointer-events: none;
    z-index: 1;
}

.gift-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 120px;
    background: linear-gradient(to top, var(--primary), transparent);
    transform-origin: bottom center;
    opacity: 0;
    animation: rayExpand 1s ease 0.5s forwards;
}

@keyframes rayExpand {
    0% {
        opacity: 0;
        height: 0;
    }
    100% {
        opacity: 0.6;
        height: 120px;
    }
}

/* --- HEADER --- */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: padding 0.3s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.5);
}

.logo-icon { 
    color: var(--primary);
    font-size: 1.8rem;
}

.logo-text {
    color: var(--text-main);
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.25;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- ZHGMK BADGE --- */
.zhgmk-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

.zhgmk-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.zhgmk-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 8px;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.1); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.2); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 20px;
    position: relative;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.glitch {
    position: relative;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--primary);
    margin-bottom: 60px;
    min-height: 1.6em;
}

.hero-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 20px 30px;
    border-radius: var(--radius);
    backdrop-filter: blur(5px);
    min-width: 150px;
    transition: transform 0.3s, border-color 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- MESSAGE SECTION (TERMINAL) --- */
.message-section {
    padding: 100px 0;
    background: var(--bg-dark);
}

.terminal-window {
    background: #1a1a25;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--font-mono);
}

.terminal-header {
    background: #252535;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.btn-close { background: #ff5f56; }
.btn-min { background: #ffbd2e; }
.btn-max { background: #27c93f; }

.terminal-title {
    color: #aaa;
    font-size: 0.85rem;
}

.terminal-body {
    padding: 20px;
    color: #d4d4d4;
    font-size: 0.95rem;
    line-height: 1.8;
}

.prompt { color: var(--primary); margin-right: 10px; }
.output p { margin-bottom: 10px; color: #fff; }
.output .highlight { color: var(--primary); font-weight: bold; }

/* --- CODE SECTION --- */
.code-section {
    padding: 100px 0;
    background: var(--bg-panel);
}

.code-card {
    background: #0d0d15;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.code-header {
    background: #1a1a25;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.lang {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.run-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.run-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

pre {
    padding: 20px;
    overflow-x: auto;
    color: #a9b7c6;
}

.cta-container {
    text-align: center;
    margin-top: 80px;
}

.cta-container h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.cta-container p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.main-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-mono);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.main-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.4), transparent);
    transition: left 0.5s ease;
}

.main-btn:hover::before {
    left: 100%;
}

.main-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.main-btn:active {
    animation: buttonPressGlitch 0.4s ease-in-out;
}

.main-btn.glitching {
    animation: buttonGlitch 0.5s ease-in-out;
}

@keyframes buttonGlitch {
    0% { transform: translate(0) scale(1); filter: hue-rotate(0deg); }
    25% { transform: translate(-3px, 3px) scale(1.05); filter: hue-rotate(90deg); }
    50% { transform: translate(3px, -3px) scale(0.95); filter: hue-rotate(180deg); }
    75% { transform: translate(-3px, -3px) scale(1.05); filter: hue-rotate(270deg); }
    100% { transform: translate(0) scale(1); filter: hue-rotate(0deg); }
}

/* --- FOOTER --- */
.site-footer {
    background: #050508;
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-main);
}

.copyright {
    color: #444;
    font-size: 0.8rem;
    margin-top: 20px;
}

.small-text { display: block; margin-top: 5px; opacity: 0.5; }

/* --- REVEAL ANIMATION --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .main-nav { display: none; }
    
    .hero-stats {
        flex-direction: column;
        width: 100%;
    }
    
    .stat-card { width: 100%; }
    
    .terminal-window { margin: 0 10px; }
    
    .code-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    
    .zhgmk-name {
        letter-spacing: 4px;
    }
    
    .lock-content {
        padding: 20px;
    }
    
    .lock-icon {
        width: 90px;
        height: 110px;
    }
    
    .quiz-container {
        padding: 20px;
    }
    
    .snake-container {
        padding: 20px;
    }
    
    #snake-canvas {
        max-width: 350px;
    }
    
    .logo-image {
        width: 40px;
        height: 40px;
    }
    
    .gift-container {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    #snake-canvas {
        max-width: 280px;
    }
    
    .snake-header h2 {
        font-size: 1.5rem;
    }
    
    .gift-container {
        width: 130px;
        height: 130px;
    }
    
    .gift-lid {
        width: 110px;
        height: 35px;
        top: 12px;
        left: 10px;
    }
    
    .gift-body {
        width: 100px;
        height: 90px;
        left: 15px;
    }
    
    .message-line {
        font-size: 1.3rem;
    }
    
    .message-line.line-2 {
        font-size: 1.8rem;
    }
}