:root {
    --blood: #8b0000;
    --blood-bright: #ff0000;
    --blood-glow: rgba(255, 0, 0, 0.4);
    --matrix: #00ff41;
    --dark: #000000;
    --fog: rgba(20, 0, 0, 0.6);
    --heartbeat-speed: 1.5s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important;
}

body {
    background-color: var(--dark);
    color: #fff;
    font-family: 'VT323', monospace;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.15) 2px,
            rgba(0, 0, 0, 0.15) 4px);
    animation: scanline-roll 8s linear infinite;
}

@keyframes scanline-roll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 200px;
    }
}

.vhs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://64.media.tumblr.com/152062f43d81b37f4070a894760086d4/tumblr_n6s6f6Sly11tw59m9o1_500.gifv');
    opacity: 0.04;
    z-index: 10003;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.chromatic-aberration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10004;
    pointer-events: none;
    animation: chromatic-glitch 6s ease-in-out infinite;
}

@keyframes chromatic-glitch {

    0%,
    90%,
    100% {
        opacity: 0;
    }

    92% {
        opacity: 1;
        box-shadow: -3px 0 rgba(255, 0, 0, 0.5) inset, 3px 0 rgba(0, 255, 255, 0.5) inset;
    }

    94% {
        opacity: 0;
    }

    96% {
        opacity: 1;
        box-shadow: 5px 0 rgba(255, 0, 0, 0.3) inset, -5px 0 rgba(0, 0, 255, 0.3) inset;
    }
}

.blood-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(80, 0, 0, 0.5) 100%);
    animation: vignette-pulse var(--heartbeat-speed) ease-in-out infinite;
}

@keyframes vignette-pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.fog-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    z-index: 10000;
    pointer-events: none;
    opacity: 0.08;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(100, 0, 0, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(50, 0, 0, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(80, 0, 0, 0.3) 0%, transparent 50%);
    animation: fog-drift 20s ease-in-out infinite alternate;
}

@keyframes fog-drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-10%, -5%);
    }
}

.shake-screen {
    animation: screen-shake 0.08s infinite;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 60000;
    background: rgba(255, 0, 0, 0.15);
    pointer-events: none;
}

@keyframes screen-shake {
    0% {
        transform: translate(3px, 1px) rotate(0.5deg);
    }

    25% {
        transform: translate(-3px, -2px) rotate(-0.5deg);
    }

    50% {
        transform: translate(1px, 3px) rotate(0.3deg);
    }

    75% {
        transform: translate(-2px, 1px) rotate(-0.3deg);
    }

    100% {
        transform: translate(2px, -1px) rotate(0.5deg);
    }
}

#flashlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle 100px at var(--x) var(--y), transparent 0%, rgba(0, 0, 0, 0.97) 100%);
    z-index: 10006;
    pointer-events: none;
    transition: background 0.1s;
}

#laser {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--blood-bright);
    border-radius: 50%;
    z-index: 10007;
    pointer-events: none;
    box-shadow: 0 0 10px var(--blood-bright), 0 0 20px var(--blood-bright), 0 0 40px rgba(255, 0, 0, 0.3);
    transform: translate(-50%, -50%);
    animation: laser-pulse 1s ease-in-out infinite;
}

@keyframes laser-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px var(--blood-bright), 0 0 20px var(--blood-bright);
    }

    50% {
        box-shadow: 0 0 15px var(--blood-bright), 0 0 30px var(--blood-bright), 0 0 60px rgba(255, 0, 0, 0.4);
    }
}

.blood-drip-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    z-index: 9999;
    pointer-events: none;
    overflow: visible;
}

.blood-drip {
    position: absolute;
    top: 0;
    width: 4px;
    background: linear-gradient(to bottom, rgba(139, 0, 0, 0.9), rgba(139, 0, 0, 0.3), transparent);
    border-radius: 0 0 50% 50%;
    animation: drip-fall var(--drip-duration, 4s) ease-in forwards;
    animation-delay: var(--drip-delay, 0s);
    opacity: 0;
}

@keyframes drip-fall {
    0% {
        height: 0;
        opacity: 0.9;
    }

    20% {
        height: 40px;
        opacity: 0.9;
    }

    40% {
        height: 60px;
    }

    100% {
        height: 120px;
        top: 100vh;
        opacity: 0;
    }
}

header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.glitch-title {
    font-family: 'Nosifer', cursive;
    font-size: 7vw;
    color: var(--blood-bright);
    text-shadow: 4px 4px #330000, 0 0 20px rgba(255, 0, 0, 0.5);
    position: relative;
    animation: title-breathe 3s ease-in-out infinite;
}

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

.glitch-title::before {
    color: cyan;
    z-index: -1;
    animation: glitch-shift-1 3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch-title::after {
    color: #ff0080;
    z-index: -1;
    animation: glitch-shift-2 2s infinite linear alternate-reverse;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-shift-1 {

    0%,
    80% {
        transform: translate(0);
    }

    82% {
        transform: translate(-5px, 2px);
    }

    84% {
        transform: translate(5px, -2px);
    }

    86% {
        transform: translate(-3px, 1px);
    }

    88%,
    100% {
        transform: translate(0);
    }
}

@keyframes glitch-shift-2 {

    0%,
    70% {
        transform: translate(0);
    }

    72% {
        transform: translate(4px, -3px);
    }

    74% {
        transform: translate(-4px, 3px);
    }

    76% {
        transform: translate(2px, -1px);
    }

    78%,
    100% {
        transform: translate(0);
    }
}

@keyframes title-breathe {

    0%,
    100% {
        text-shadow: 4px 4px #330000, 0 0 20px rgba(255, 0, 0, 0.5);
        transform: scale(1);
    }

    50% {
        text-shadow: 4px 4px #330000, 0 0 40px rgba(255, 0, 0, 0.8), 0 0 80px rgba(255, 0, 0, 0.3);
        transform: scale(1.02);
    }
}

.connection-text {
    color: #333;
    letter-spacing: 12px;
    font-weight: bold;
    animation: flicker-text 4s infinite;
    position: relative;
}

@keyframes flicker-text {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.3;
    }
}

.subtitle {
    font-family: 'Cairo';
    font-size: 1.8rem;
    color: #444;
    margin-top: 10px;
    animation: subtitle-reveal 2s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes subtitle-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blink-prompt {
    color: var(--blood-bright);
    margin-top: 30px;
    animation: blink-horror 1.5s infinite, text-flicker 0.1s infinite alternate;
}

@keyframes blink-horror {

    0%,
    49% {
        opacity: 1;
    }

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

@keyframes text-flicker {
    from {
        text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    }

    to {
        text-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 0 20px rgba(255, 0, 0, 0.3);
    }
}

.ghost-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
}

.section {
    min-height: 100vh;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.section .reveal-item {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section .reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.stat-card {
    border: 1px solid rgba(139, 0, 0, 0.3);
    padding: 30px 40px;
    background: rgba(5, 5, 5, 0.9);
    text-align: center;
    min-width: 250px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blood-bright), transparent);
    animation: card-scan 4s linear infinite;
}

@keyframes card-scan {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.stat-card:hover {
    border-color: var(--blood-bright);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.15), inset 0 0 30px rgba(255, 0, 0, 0.05);
    transform: scale(1.05);
}

.stat-card h2 {
    color: var(--blood-bright);
    font-size: 3.5rem;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: number-glow 2s ease-in-out infinite;
}

@keyframes number-glow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    }

    50% {
        text-shadow: 0 0 30px rgba(255, 0, 0, 0.6), 0 0 60px rgba(255, 0, 0, 0.2);
    }
}

.stat-card p {
    color: #666;
    margin-top: 10px;
    font-family: 'Cairo';
    font-size: 0.95rem;
}

.terminal-box {
    width: 100%;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.95);
    border-left: 4px solid var(--blood);
    padding: 25px 30px;
    color: var(--matrix);
    font-size: 1.2rem;
    margin-top: 40px;
    box-shadow: -10px 0 30px rgba(255, 0, 0, 0.05), inset 0 0 60px rgba(0, 255, 65, 0.02);
    position: relative;
    overflow: hidden;
}

.terminal-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    animation: terminal-scroll 10s linear infinite;
}

@keyframes terminal-scroll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100px;
    }
}

.terminal-box p {
    margin: 8px 0;
    opacity: 0;
    animation: terminal-line-appear 0.5s ease forwards;
}

.terminal-box p:nth-child(1) {
    animation-delay: 0.5s;
}

.terminal-box p:nth-child(2) {
    animation-delay: 1.5s;
}

.terminal-box p:nth-child(3) {
    animation-delay: 2.5s;
}

@keyframes terminal-line-appear {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--matrix);
    animation: cursor-blink 0.7s infinite;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes cursor-blink {

    0%,
    49% {
        opacity: 1;
    }

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

.trial-section-title {
    font-family: 'Creepster';
    font-size: 4rem;
    color: var(--blood-bright);
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.4);
    animation: title-breathe 3s ease-in-out infinite;
    margin-bottom: 30px;
}

.trial-zone {
    border: 2px solid rgba(80, 0, 0, 0.4);
    padding: 50px;
    margin-top: 20px;
    width: 100%;
    max-width: 700px;
    text-align: center;
    transition: all 0.5s ease;
    position: relative;
    background: rgba(10, 0, 0, 0.4);
    overflow: hidden;
}

.trial-zone::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(139, 0, 0, 0.1), transparent, rgba(139, 0, 0, 0.1), transparent);
    animation: rotate-bg 10s linear infinite;
    z-index: -1;
}

@keyframes rotate-bg {
    to {
        transform: rotate(360deg);
    }
}

.trial-zone:hover {
    border-color: var(--blood-bright);
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.1), inset 0 0 40px rgba(255, 0, 0, 0.05);
}

.trial-question {
    font-family: 'Cairo';
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: #aaa;
    line-height: 1.8;
}

.btn-choice {
    display: block;
    width: 100%;
    padding: 18px;
    margin: 12px 0;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(80, 0, 0, 0.5);
    color: #ccc;
    font-family: 'Cairo';
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-choice:hover {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.8), rgba(100, 0, 0, 0.6));
    border-color: var(--blood-bright);
    color: #fff;
    transform: scale(1.03) translateX(-5px);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2), inset 0 0 20px rgba(255, 0, 0, 0.1);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

#death-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 70000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#death-overlay h1 {
    font-family: 'Nosifer';
    font-size: 6vw;
    color: red;
    text-align: center;
    animation: death-text-glitch 0.3s infinite;
}

@keyframes death-text-glitch {
    0% {
        transform: translate(0);
        text-shadow: 5px 0 red, -5px 0 cyan;
    }

    25% {
        transform: translate(-3px, 2px);
        text-shadow: -5px 0 red, 5px 0 cyan;
    }

    50% {
        transform: translate(3px, -2px);
        text-shadow: 3px 3px red, -3px -3px cyan;
    }

    75% {
        transform: translate(-2px, -3px);
        text-shadow: -3px 0 red, 3px 0 blue;
    }

    100% {
        transform: translate(0);
    }
}

#death-overlay p {
    font-family: 'Cairo';
    font-size: 2rem;
    color: #500;
    animation: fade-up 1s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(-10px);
    }
}

.skull-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 65000;
    pointer-events: none;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.95);
}

.skull-flash .skull-emoji {
    font-size: 30vw;
    animation: skull-appear 0.3s ease;
    filter: drop-shadow(0 0 40px rgba(255, 0, 0, 0.8));
}

@keyframes skull-appear {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

.glitch-bar {
    position: fixed;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(255, 0, 0, 0.1);
    z-index: 10008;
    pointer-events: none;
    opacity: 0;
}

.glitch-bar.active {
    animation: glitch-bar-flash 0.15s ease-out forwards;
}

@keyframes glitch-bar-flash {
    0% {
        height: 3px;
        opacity: 1;
    }

    100% {
        height: 8px;
        opacity: 0;
    }
}

.heartbeat-border {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9997;
    pointer-events: none;
    border: 2px solid transparent;
    animation: heartbeat-border var(--heartbeat-speed) ease-in-out infinite;
}

@keyframes heartbeat-border {

    0%,
    100% {
        border-color: transparent;
    }

    30% {
        border-color: rgba(139, 0, 0, 0.3);
    }

    35% {
        border-color: transparent;
    }

    50% {
        border-color: rgba(139, 0, 0, 0.2);
    }

    55% {
        border-color: transparent;
    }
}

.section-title {
    font-family: 'Nosifer';
    color: var(--blood-bright);
    margin-bottom: 40px;
    position: relative;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blood-bright), transparent);
    margin: 15px auto 0;
    animation: line-expand 2s ease-in-out infinite;
}

@keyframes line-expand {

    0%,
    100% {
        width: 80px;
        opacity: 0.5;
    }

    50% {
        width: 200px;
        opacity: 1;
    }
}

.distortion-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10009;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
}

.distortion-layer.active {
    opacity: 1;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(255, 0, 0, 0.03) 2px,
            rgba(255, 0, 0, 0.03) 4px);
    animation: distort-shift 0.2s steps(3) infinite;
}

@keyframes distort-shift {
    0% {
        transform: translateX(0);
    }

    33% {
        transform: translateX(-2px) skewX(0.5deg);
    }

    66% {
        transform: translateX(2px) skewX(-0.5deg);
    }

    100% {
        transform: translateX(0);
    }
}

.blood-pool {
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(80, 0, 0, 0.3));
    position: relative;
}

.blood-pool::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, transparent, rgba(139, 0, 0, 0.2));
    animation: blood-spread 3s ease-in-out infinite alternate;
}

@keyframes blood-spread {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.8;
    }
}

.horror-divider {
    width: 100%;
    height: 40px;
    position: relative;
    overflow: hidden;
}

.horror-divider::before {
    content: '▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼';
    position: absolute;
    width: 100%;
    text-align: center;
    color: rgba(139, 0, 0, 0.2);
    font-size: 0.8rem;
    letter-spacing: 10px;
    animation: divider-pulse 3s ease-in-out infinite;
}

@keyframes divider-pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
        color: rgba(255, 0, 0, 0.3);
    }
}

@media (max-width: 768px) {
    .glitch-title {
        font-size: 12vw;
    }

    .trial-section-title {
        font-size: 2.5rem;
    }

    .stat-card {
        min-width: 180px;
        padding: 20px;
    }

    .trial-zone {
        padding: 30px 20px;
    }
}