:root {
    --void-black: #050505;
    --null-white: #e0e0e0;
    --liquid-silver: #a0a0a0;
    --alert-red: #ff3333;
    --font-main: 'Cinzel', serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-weird: 'Major Mono Display', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none;
    /* Custom cursor handling */
}

body,
html {
    width: 100%;
    height: 100%;
    background-color: var(--void-black);
    color: var(--null-white);
    font-family: var(--font-main);
    overflow: hidden;
    /* Prevent scrolling, controlled via JS */
    transition: transform 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6), filter 0.1s;
    /* Chaos transition */
}

/* --- LOADER --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.loader.finished {
    opacity: 0;
    pointer-events: none;
}

.loader-content h1 {
    font-family: var(--font-mono);
    font-size: 2rem;
    letter-spacing: 5px;
}

.progress-bar {
    width: 0%;
    height: 2px;
    background: var(--null-white);
    margin-top: 20px;
    transition: width 0.5s;
}

/* --- MAIN CONTAINER --- */
#void-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    perspective: 1000px;
    transition: transform 0.8s ease;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

/* --- SYMMETRY ENGINE --- */
.symmetry-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 0;
    opacity: 0.6;
}

.symmetry-left,
.symmetry-right {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.symmetry-right {
    transform: scaleX(-1);
    /* The Mirror Effect */
}

.img-container {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease, transform 10s ease;
    mix-blend-mode: luminosity;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: url(#liquid-filter) grayscale(100%) contrast(120%);
    transition: filter 0.3s;
}

.img-container.active {
    opacity: 0.8;
    /* Slightly reduced for text ease */
    transform: scale(1.1);
}

/* --- CENTRAL AXIS --- */
.central-axis {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    mix-blend-mode: difference;
    pointer-events: none;
    transition: opacity 0.8s ease, filter 0.8s ease;
}

.central-axis.hidden {
    opacity: 0;
    filter: blur(10px);
}

.bnb-logo {
    position: absolute;
    top: 12.5vh;
    /* Centered between top and title */
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    /* Half size */
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 0 10px rgba(243, 186, 47, 0.5));
    /* BNB Color Glow */
    z-index: 25;
    /* Higher than content to persist */
    pointer-events: none;
}

.scroll-indicator {
    position: absolute;
    bottom: 150px;
    /* Way above HUD */
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--null-white);
    opacity: 0.6;
    animation: bounce 2s infinite;
    z-index: 25;
    pointer-events: none;
    transition: opacity 0.5s;
}

.scroll-indicator.hidden {
    opacity: 0;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.main-title {
    font-size: 8vw;
    font-weight: 900;
    line-height: 0.8;
    white-space: nowrap;
    text-transform: uppercase;
}

.subtitle {
    font-family: var(--font-mono);
    margin-top: 1rem;
    font-size: 1.2rem;
    letter-spacing: 0.5rem;
    opacity: 0.8;
}

/* --- GLITCH TEXT --- */
.glitch {
    position: relative;
    color: var(--null-white);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--void-black);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(60px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(30px, 9999px, 90px, 0);
    }

    100% {
        clip: rect(50px, 9999px, 60px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(50px, 9999px, 20px, 0);
    }

    20% {
        clip: rect(20px, 9999px, 80px, 0);
    }

    40% {
        clip: rect(90px, 9999px, 10px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    80% {
        clip: rect(70px, 9999px, 30px, 0);
    }

    100% {
        clip: rect(30px, 9999px, 70px, 0);
    }
}

/* --- CONTENT LAYERS --- */
.content-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    /* Let clicks pass unless active */
}

.content-layer.hidden {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(20px);
    transition: all 0.8s ease-out;
    /* Slower transition for readability */
}

.content-layer.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.text-block {
    max-width: 800px;
    padding: 3rem;
    background: rgba(5, 5, 5, 0.85);
    /* Darker background */
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    /* Stronger blur of background */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.text-block h2 {
    font-family: var(--font-weird);
    font-size: 3rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--liquid-silver);
    padding-bottom: 0.5rem;
    color: var(--null-white);
}

.text-block p,
.text-block li {
    font-family: var(--font-mono);
    line-height: 1.8;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    color: #ccc;
    /* Slightly reduced contrast for 'silver' feel */
}

.text-block ul {
    list-style: none;
    padding-left: 0;
}

.text-block li::before {
    content: "> ";
    color: var(--alert-red);
}

/* --- HUD --- */
.hud {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 40px;
    z-index: 50;
    font-family: var(--font-mono);
}

.hud> :first-child {
    justify-self: start;
}

.hud> :last-child {
    justify-self: end;
    text-align: right;
}

.hud-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--null-white);
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: 1rem;
    text-transform: uppercase;
    transition: all 0.3s;
    pointer-events: auto;
}

.hud-btn:hover {
    background: var(--null-white);
    color: var(--void-black);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.contract-address {
    opacity: 0.5;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- CURSOR --- */
#cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.2s, height 0.2s;
}

#cursor-follower.hovered {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
}

/* --- CHAOS CLASSES --- */
.chaos-invert {
    filter: invert(1);
}

.chaos-hue {
    filter: hue-rotate(90deg) contrast(150%);
}

.chaos-flash {
    filter: brightness(3) contrast(50%);
    background-color: white;
}

.chaos-rgb {
    text-shadow: 4px 0 red, -4px 0 blue;
    /* Simple text split */
    filter: drop-shadow(4px 0 red) drop-shadow(-4px 0 blue);
}

.chaos-blur {
    filter: blur(5px) contrast(200%);
}

.chaos-red {
    background-color: #200;
}

.chaos-red .text-block {
    border-color: red;
    color: red;
}

/* --- PARTICLES --- */
.particle {
    position: fixed;
    pointer-events: none;
    background: var(--null-white);
    border-radius: 50%;
    z-index: 9999;
}