:root {
    --bg: #050505;
    --text: #f0f0f0;
    --accent: #ff2a2a;
    --accent-glow: rgba(255, 42, 42, 0.6);
    --gold: #ebd197;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    overflow: hidden; /* Scroll controlled by container */
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}

.screen {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.content {
    max-width: 1000px;
    width: 100%;
    text-align: center;
    position: relative;
}

/* SECTION 1 */
.step-1 .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards 0.5s;
}

.glitch-wrapper {
    position: relative;
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2rem;
}

.glitch {
    position: relative;
    color: var(--text);
    display: inline-block;
}

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

.glitch::before {
    left: 4px;
    text-shadow: -2px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -4px;
    text-shadow: -2px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 86px, 0); }
    5% { clip: rect(61px, 9999px, 8px, 0); }
    10% { clip: rect(82px, 9999px, 73px, 0); }
    15% { clip: rect(72px, 9999px, 14px, 0); }
    20% { clip: rect(98px, 9999px, 92px, 0); }
    25% { clip: rect(32px, 9999px, 21px, 0); }
    30% { clip: rect(1px, 9999px, 44px, 0); }
    35% { clip: rect(78px, 9999px, 13px, 0); }
    40% { clip: rect(21px, 9999px, 87px, 0); }
    45% { clip: rect(17px, 9999px, 42px, 0); }
    50% { clip: rect(94px, 9999px, 81px, 0); }
    55% { clip: rect(31px, 9999px, 49px, 0); }
    60% { clip: rect(6px, 9999px, 8px, 0); }
    65% { clip: rect(47px, 9999px, 71px, 0); }
    70% { clip: rect(12px, 9999px, 21px, 0); }
    75% { clip: rect(82px, 9999px, 53px, 0); }
    80% { clip: rect(65px, 9999px, 9px, 0); }
    85% { clip: rect(38px, 9999px, 77px, 0); }
    90% { clip: rect(11px, 9999px, 81px, 0); }
    95% { clip: rect(33px, 9999px, 16px, 0); }
    100% { clip: rect(81px, 9999px, 62px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(52px, 9999px, 74px, 0); }
    10% { clip: rect(79px, 9999px, 85px, 0); }
    15% { clip: rect(75px, 9999px, 5px, 0); }
    20% { clip: rect(31px, 9999px, 98px, 0); }
    25% { clip: rect(14px, 9999px, 16px, 0); }
    30% { clip: rect(20px, 9999px, 18px, 0); }
    35% { clip: rect(82px, 9999px, 66px, 0); }
    40% { clip: rect(98px, 9999px, 46px, 0); }
    45% { clip: rect(12px, 9999px, 94px, 0); }
    50% { clip: rect(9px, 9999px, 21px, 0); }
    55% { clip: rect(76px, 9999px, 68px, 0); }
    60% { clip: rect(48px, 9999px, 7px, 0); }
    65% { clip: rect(2px, 9999px, 10px, 0); }
    70% { clip: rect(37px, 9999px, 35px, 0); }
    75% { clip: rect(63px, 9999px, 27px, 0); }
    80% { clip: rect(87px, 9999px, 89px, 0); }
    85% { clip: rect(11px, 9999px, 19px, 0); }
    90% { clip: rect(76px, 9999px, 44px, 0); }
    95% { clip: rect(6px, 9999px, 15px, 0); }
    100% { clip: rect(67px, 9999px, 29px, 0); }
}

.verdict {
    font-size: 5rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    text-transform: uppercase;
}

.hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.show {
    opacity: 1;
    transform: scale(1);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    letter-spacing: 2px;
    opacity: 0.5;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SECTION 2 */
.split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    text-align: left;
}

.split .left {
    flex: 1;
}

.split h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--gold);
}

.split p {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.highlight {
    color: #fff;
    font-weight: bold;
    background: linear-gradient(120deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    padding: 0 10px;
    border-radius: 4px;
}

.split .right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fake-word-container {
    position: relative;
    font-size: 4rem;
    font-weight: 800;
    padding: 2rem;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.fake-word {
    color: var(--accent);
}

.red-cross {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 6px;
    background-color: var(--accent);
    transform: translate(-50%, -50%) rotate(-15deg);
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 0.8s ease;
}

.step-2.active .red-cross {
    width: 120%;
}

.conclusion {
    margin-top: 2rem;
    font-size: 1.2rem;
    color: #aaa;
    text-align: center;
    font-style: italic;
}

/* SECTION 3 */
.interactive h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.interactive p {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 4rem;
}

.game-area {
    position: relative;
    height: 400px;
    width: 100%;
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 20px;
}

.runaway-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1.5rem 3rem;
    font-size: 2rem;
    font-weight: 800;
    font-family: inherit;
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s;
    letter-spacing: 2px;
}

.runaway-btn:hover {
    background: rgba(255,255,255,0.1);
}

.hidden-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    width: 100%;
    text-shadow: 0 0 20px var(--accent-glow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s;
}

/* SECTION 4 */
.final .neon-text {
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    color: #222;
    text-shadow: none;
    line-height: 1.2;
    transition: all 0.3s;
}

.neon-red {
    color: var(--accent);
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--accent),
        0 0 40px var(--accent),
        0 0 80px var(--accent);
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    display: block;
    margin-top: 1rem;
    animation: pulse 2s infinite;
}

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

.flicker-slow {
    animation: flicker 3s infinite alternate;
}

.flicker-fast {
    animation: flicker 0.5s infinite alternate;
}

@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        color: #fff;
        text-shadow:
            0 0 4px #fff,
            0 0 11px #fff,
            0 0 19px #fff,
            0 0 40px var(--accent),
            0 0 80px var(--accent),
            0 0 90px var(--accent),
            0 0 100px var(--accent),
            0 0 150px var(--accent);
    }
    20%, 24%, 55% {        
        color: #222;
        text-shadow: none;
    }    
}

.final p {
    font-size: 1.5rem;
    margin-top: 3rem;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .glitch-wrapper { font-size: 4rem; }
    .verdict { font-size: 3rem; }
    .split { flex-direction: column; gap: 2rem; }
    .fake-word-container { font-size: 2.5rem; }
    .final .neon-text { font-size: 3rem; }
    .neon-red { font-size: 2.5rem; }
}
