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

body {
    background: #0a0a1a;
    min-height: 100vh;
}

/* Scanline overlay */
.scanlines::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 252, 0.015) 2px,
        rgba(0, 255, 252, 0.015) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* Noise overlay */
.noise-overlay::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
    animation: noiseShift 8s steps(10) infinite;
}

@keyframes noiseShift {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(3%, 2%); }
    30% { transform: translate(-2%, 5%); }
    40% { transform: translate(5%, -3%); }
    50% { transform: translate(-3%, 1%); }
    60% { transform: translate(2%, -4%); }
    70% { transform: translate(-4%, 3%); }
    80% { transform: translate(1%, -2%); }
    90% { transform: translate(-1%, 4%); }
    100% { transform: translate(0, 0); }
}

/* Title glitch effect */
@keyframes glitch1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 0); }
    40% { clip-path: inset(40% 0 30% 0); transform: translate(3px, 0); }
    60% { clip-path: inset(60% 0 10% 0); transform: translate(-2px, 0); }
    80% { clip-path: inset(80% 0 0 0); transform: translate(1px, 0); }
}

@keyframes glitch2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    25% { clip-path: inset(10% 0 70% 0); transform: translate(2px, 0); }
    50% { clip-path: inset(50% 0 20% 0); transform: translate(-4px, 0); }
    75% { clip-path: inset(70% 0 5% 0); transform: translate(3px, 0); }
}

.glitch-title {
    position: relative;
    animation: titleFlicker 4s 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: #0ff0fc;
    animation: glitch1 3s infinite linear alternate-reverse;
    opacity: 0.6;
}

.glitch-title::after {
    color: #8b0000;
    animation: glitch2 2s infinite linear alternate-reverse;
    opacity: 0.6;
}

@keyframes titleFlicker {
    0%, 95%, 100% { opacity: 1; }
    96% { opacity: 0.8; }
    97% { opacity: 1; }
    98% { opacity: 0.6; }
    99% { opacity: 1; }
}

/* Pulsing glow */
@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; text-shadow: 0 0 20px rgba(15, 240, 252, 0.3); }
    50% { opacity: 1; text-shadow: 0 0 40px rgba(15, 240, 252, 0.6); }
}

.pulse-text {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* Enter button glow */
@keyframes btnGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(15, 240, 252, 0.3), inset 0 0 20px rgba(15, 240, 252, 0.1); }
    50% { box-shadow: 0 0 40px rgba(15, 240, 252, 0.6), inset 0 0 30px rgba(15, 240, 252, 0.2); }
}

.glow-btn {
    animation: btnGlow 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.glow-btn:hover {
    box-shadow: 0 0 60px rgba(15, 240, 252, 0.8), inset 0 0 40px rgba(15, 240, 252, 0.3);
    transform: scale(1.05);
}

/* Screen fracture transition */
@keyframes fracture {
    0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); filter: brightness(1); }
    10% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); filter: brightness(3); }
    20% { clip-path: polygon(5% 0, 95% 2%, 98% 100%, 3% 97%); filter: brightness(0.5); }
    40% { clip-path: polygon(10% 5%, 90% 0, 95% 95%, 0 90%); filter: brightness(2); }
    60% { clip-path: polygon(0 10%, 100% 5%, 95% 100%, 5% 95%); filter: brightness(0.3); }
    80% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); filter: brightness(0.1); }
    100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); filter: brightness(1); }
}

.fracture-transition {
    animation: fracture 0.8s ease-out forwards;
}

/* Fade in */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Node pulse */
@keyframes nodePulse {
    0%, 100% { box-shadow: 0 0 10px rgba(15, 240, 252, 0.3); }
    50% { box-shadow: 0 0 25px rgba(15, 240, 252, 0.7), 0 0 50px rgba(15, 240, 252, 0.2); }
}

.node-pulse {
    animation: nodePulse 2s ease-in-out infinite;
}

/* Typewriter cursor */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typewriter-cursor::after {
    content: '█';
    color: #0ff0fc;
    animation: blink 0.8s step-end infinite;
    margin-left: 2px;
}

/* Resonance meter glow */
@keyframes resonanceGlow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 5px rgba(15, 240, 252, 0.3)); }
    50% { filter: brightness(1.3) drop-shadow(0 0 15px rgba(15, 240, 252, 0.6)); }
}

.resonance-glow {
    animation: resonanceGlow 3s ease-in-out infinite;
}

/* Particle system */
@keyframes floatParticle {
    0% { transform: translateY(100vh) translateX(0) scale(0); opacity: 0; }
    10% { opacity: 0.6; scale: 1; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-10vh) translateX(50px) scale(0.5); opacity: 0; }
}

.particle {
    position: fixed;
    width: 2px;
    height: 2px;
    background: rgba(15, 240, 252, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Chronicle log styling */
.chronicle-log {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    border-left: 1px solid rgba(15, 240, 252, 0.2);
}

.chronicle-entry {
    border-bottom: 1px solid rgba(226, 183, 20, 0.15);
    position: relative;
}

.chronicle-entry::before {
    content: '▸';
    color: #e2b714;
    position: absolute;
    left: -16px;
    top: 4px;
}

/* Redacted text effect */
.redacted {
    background: #e0e0e0;
    color: #e0e0e0;
    padding: 0 4px;
    cursor: default;
    user-select: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a1a;
}

::-webkit-scrollbar-thumb {
    background: rgba(15, 240, 252, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 240, 252, 0.5);
}

/* Timeline line */
.timeline-line {
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(15, 240, 252, 0.4) 10%,
        rgba(15, 240, 252, 0.4) 90%,
        transparent 100%
    );
}

/* Background gradient animation */
@keyframes bgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-animated {
    background: linear-gradient(135deg, #0a0a1a, #1a1a2e, #16213e, #0a0a1a);
    background-size: 400% 400%;
    animation: bgShift 20s ease infinite;
}

/* Image loading shimmer */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.img-shimmer {
    background: linear-gradient(90deg, rgba(26,26,46,0) 0%, rgba(15,240,252,0.05) 50%, rgba(26,26,46,0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Choice card hover */
.choice-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(15, 240, 252, 0.15);
}

.choice-card:hover {
    border-color: rgba(15, 240, 252, 0.6);
    box-shadow: 0 0 30px rgba(15, 240, 252, 0.15);
    transform: translateY(-2px);
}

/* Responsive timeline */
@media (max-width: 768px) {
    .timeline-horizontal {
        flex-direction: column !important;
    }
}

/* Fade in with delay utility */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }
.delay-9 { animation-delay: 0.9s; }
.delay-10 { animation-delay: 1.0s; }