/* ============================================
   BASE STYLES & RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-white: #ffffff;
    --dark-white: #cccccc;
    --neon-white: #ffffff;
    --accent-red: #ff0033;
    --accent-cyan: #00ffaa;
    --accent-gold: #ffaa00;
    --bg-black: #0a0a0a;
    --bg-dark: #111111;
    --bg-card: #1a1a1a;
    --border-white: rgba(255, 255, 255, 0.3);
    /* Typography */
    --font-mono: 'Courier New', monospace;
    --font-system: 'Consolas', 'Monaco', monospace;
}

body {
    font-family: var(--font-mono);
    line-height: 1.6;
    color: var(--primary-white);
    background-color: var(--bg-black);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ============================================
   TYPOGRAPHY VARIETY
   ============================================ */
.system-text {
    font-family: var(--font-system);
    letter-spacing: 0.15em;
    font-size: 0.85em;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.data-text {
    font-family: var(--font-system);
    font-weight: bold;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
}

.terminal-text {
    font-family: var(--font-system);
    color: var(--accent-cyan);
    text-shadow: 0 0 5px var(--accent-cyan);
}

/* ============================================
   ANIMATED BACKGROUND WITH NOISE & PARALLAX - FIXED
   ============================================ */
.matrix-style-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0a0a 0%, #0a0a0a 100%);
    z-index: -1;
    opacity: 0.8;
    overflow: hidden; /* CHANGED FROM visible TO hidden */
    pointer-events: none;
}

    /* Grid pattern - FIXED TO PREVENT DARK GAPS */
    .matrix-style-bg::before {
        content: '';
        position: absolute;
        top: -50px; /* Extended above viewport */
        left: 0;
        width: 100%;
        height: calc(100% + 100px); /* Extended height to cover gaps */
        background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, var(--primary-white) 2px, var(--primary-white) 4px), repeating-linear-gradient(90deg, transparent, transparent 2px, var(--primary-white) 2px, var(--primary-white) 4px);
        background-size: 100% 100%; /* Ensures full coverage */
        opacity: 0.03;
        animation: matrix-scroll 20s linear infinite;
        will-change: transform;
    }

    /* Noise texture overlay - EXTREMELY subtle, barely visible */
    .matrix-style-bg::after {
        display: none;
    }

/* Parallax layers - controlled by JS */
.parallax-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.parallax-layer-1 {
    opacity: 0.05;
    background: radial-gradient(circle at 20% 50%, var(--accent-red) 0%, transparent 50%);
}

.parallax-layer-2 {
    opacity: 0.03;
    background: radial-gradient(circle at 80% 30%, var(--accent-cyan) 0%, transparent 60%);
}

/* Ash particles - controlled by JS */
.ash-particle {
    position: fixed !important;
    pointer-events: none;
    z-index: 999 !important;
    background: white;
    border-radius: 50%;
}

/* ============================================
   ENHANCED PAGE TRANSITION OVERLAY
   ============================================ */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-black);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .page-transition.active {
        opacity: 1;
        pointer-events: all;
    }

/* System booting text */
.transition-text {
    font-family: var(--font-system);
    color: var(--accent-cyan);
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px var(--accent-cyan);
    animation: typing 1s steps(20) forwards, cursor-blink 0.5s step-end infinite;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid var(--accent-cyan);
}

/* Loading bars */
.transition-loading {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 300px;
}

.loading-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

    .loading-bar::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 0%;
        background: var(--accent-red);
        box-shadow: 0 0 10px var(--accent-red);
        animation: loading-fill 0.8s ease-out forwards;
    }

    .loading-bar:nth-child(2)::after {
        animation-delay: 0.1s;
        background: var(--accent-cyan);
        box-shadow: 0 0 10px var(--accent-cyan);
    }

    .loading-bar:nth-child(3)::after {
        animation-delay: 0.2s;
        background: var(--accent-gold);
        box-shadow: 0 0 10px var(--accent-gold);
    }

/* Scanline sweep */
.page-transition::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    animation: scan-sweep 0.6s ease-out forwards;
    box-shadow: 0 0 20px var(--accent-red);
}

/* music toggle button*/
.music-toggle.signal {
    opacity: 0.65;
}

.music-toggle {
    position: relative;
    margin: 60px auto 40px;
    text-align: center;
    opacity: 0.85;
    font-family: inherit;
}

.music-toggle-btn {
    background: none;
    border: 1px solid var(--primary-white);
    color: var(--primary-white);
    padding: 10px 18px;
    cursor: pointer;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

    .music-toggle-btn:hover {
        background: var(--primary-white);
        color: var(--bg-black);
    }

.music-credit {
    margin-top: 6px;
    font-size: 0.6rem;
    opacity: 0.6;
}

.music-toggle + .music-toggle {
    margin-top: 20px;
    opacity: 0.75;
}

/* Volume control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

    .volume-control label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.75rem;
        letter-spacing: 0.08em;
        color: rgba(255, 255, 255, 0.7);
    }

.volume-icon {
    font-size: 1rem;
}

.volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    border-radius: 2px;
    cursor: pointer;
}

    .volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 14px;
        height: 14px;
        background: #ffffff;
        border-radius: 50%;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

        .volume-slider::-webkit-slider-thumb:hover {
            transform: scale(1.2);
        }

    .volume-slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
        background: #ffffff;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

        .volume-slider::-moz-range-thumb:hover {
            transform: scale(1.2);
        }

.volume-percent {
    min-width: 35px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
}

/* ============================================
   SPLASH SCREEN
   ============================================ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 1s ease;
}

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

.splash-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.splash-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .splash-logo h1 {
        font-size: 2.5rem;
        margin: 0;
        font-family: 'Courier New', monospace;
        letter-spacing: 0.2em;
    }

    .splash-logo .logo-bracket {
        font-size: 3rem;
        color: var(--accent-red, #ff0033);
        animation: pulse 2s infinite;
    }

.splash-subtitle {
    font-size: 1rem;
    letter-spacing: 0.15em;
    opacity: 0.7;
    margin-bottom: 3rem;
}

.splash-enter-btn {
    background: transparent;
    border: 2px solid var(--primary-white, #fff);
    color: var(--primary-white, #fff);
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

    .splash-enter-btn:hover {
        background: var(--primary-white, #fff);
        color: #000;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
        transform: scale(1.05);
    }

    .splash-enter-btn span {
        position: relative;
        z-index: 2;
    }

.btn-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s infinite;
}

.splash-warning {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--accent-red, #ff0033);
    animation: blink 1.5s infinite;
}

.splash-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: scan 3s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes pulse-ring {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }

    50%, 100% {
        opacity: 0.3;
    }
}

@keyframes scan {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .splash-logo h1 {
        font-size: 1.5rem;
    }

    .splash-logo .logo-bracket {
        font-size: 2rem;
    }

    .splash-enter-btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   EMERGENCY MOBILE FIXES
   ============================================ */

@media (max-width: 768px) {
    /* Scale down huge text */
    .glitch {
        font-size: 2rem !important;
    }

    .typing-text {
        font-size: 1rem !important;
    }

    /* Fix breadcrumbs */
    .breadcrumb-container {
        top: 1rem !important;
        left: 1rem !important;
        font-size: 0.6rem !important;
        padding: 0.5rem !important;
    }

    /* Fix hamburger */
    .hamburger {
        top: 1rem !important;
        right: 1rem !important;
        width: 40px !important;
        height: 40px !important;
    }

    /* Fix gallery grid */
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }


}
