* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000514;
    color: #5fb8ff;
    font-family: 'Courier New', monospace;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    filter: contrast(120%);
}

.abstract-container {
    position: fixed;
    width: 100%;
    height: 100%;
    mix-blend-mode: difference;
}

.distortion-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            var(--angle, 45deg),
            #000514 0px,
            rgba(95, 184, 255, 0.2) 2px,
            transparent 4px
        ),
        repeating-radial-gradient(
            circle at var(--center-x, 50%) var(--center-y, 50%),
            #000514 0%,
            rgba(95, 184, 255, 0.3) 2%,
            transparent 4%,
            rgba(95, 184, 255, 0.1) 6%
        );
    background-size: 200% 200%;
    background-position: var(--bg-x, 0) var(--bg-y, 0);
    filter: url('#extreme-distort') url('#pixel-sort');
    mix-blend-mode: exclusion;
    transform-origin: center;
    animation: 
        distort-space 2s linear infinite,
        glitch-shift 2s steps(2) infinite;
    transition: filter 0.1s;
    isolation: isolate;
}

.wave-effect {
    position: absolute;
    inset: 0;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(95, 184, 255, 0.2),
        transparent 25%
    );
    filter: url('#wave-distort');
    mix-blend-mode: screen;
    animation: wave-rotation 2s linear infinite;
    will-change: transform;
}

.digital-fragments {
    position: absolute;
    inset: 0;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(95, 184, 255, 0.15) 90deg,
        transparent 180deg
    );
    filter: url('#digital-break');
    mix-blend-mode: screen;
    clip-path: polygon(20% 20%, 80% 20%, 80% 80%, 20% 80%);
    animation: fragment-rotate 2s linear infinite;
    will-change: transform;
}

.data-streams {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 49%,
        rgba(95, 184, 255, 0.15) 50%,
        transparent 51%
    );
    background-size: 20px 100%;
    animation: data-flow 2s linear infinite;
    mix-blend-mode: screen;
    will-change: transform;
}

.fractal-patterns {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 50%,
        transparent 0%,
        rgba(95, 184, 255, 0.1) 40%,
        transparent 80%
    );
    background-size: 150% 150%;
    filter: url('#fractal-morph');
    mix-blend-mode: screen;
    animation: fractal-evolution 2s linear infinite;
    transform-origin: center;
    will-change: transform;
}

.fluid-motion-layer {
    position: absolute;
    inset: 0;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(95, 184, 255, 0.1),
        transparent 50%
    );
    filter: url('#fluid-motion');
    mix-blend-mode: screen;
    animation: fluid-motion 2s linear infinite;
    transform-origin: center;
    will-change: transform;
}

.morphing-shapes {
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: radial-gradient(
        circle at center,
        rgba(95, 184, 255, 0.15),
        transparent 70%
    );
    filter: url('#shape-morph');
    mix-blend-mode: screen;
    animation: shape-morphing 2s ease-in-out infinite;
    will-change: transform;
}

.noise-diffusion {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(95, 184, 255, 0.1) 50%,
        transparent 100%
    );
    filter: url('#noise-diffusion');
    mix-blend-mode: screen;
    animation: noise-diffuse 2s linear infinite;
    opacity: 0.3;
    will-change: transform;
}

.interference-lines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        var(--interference-angle, 90deg),
        transparent 0px,
        rgba(95, 184, 255, 0.05) 1px,
        transparent 2px
    );
    pointer-events: none;
    mix-blend-mode: overlay;
    animation: interference-shift 5s linear infinite;
}

.digital-noise {
    position: fixed;
    inset: 0;
    backdrop-filter: contrast(150%) brightness(120%);
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: var(--noise-opacity, 0.1);
    mix-blend-mode: overlay;
    animation: noise-intensity 4s steps(4) infinite;
}

.distortion-layer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        conic-gradient(
            from var(--rotation, 0deg),
            transparent,
            rgba(95, 184, 255, 0.2),
            transparent 30%,
            rgba(95, 184, 255, 0.1),
            transparent 60%
        );
    filter: url('#rgb-split');
    mix-blend-mode: hard-light;
    animation: rotate-chaos 20s linear infinite;
    transform-origin: center;
}

.distortion-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        repeating-radial-gradient(
            circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            #000514 0%,
            transparent 10%,
            rgba(95, 184, 255, 0.3) 15%
        );
    filter: url('#destroy');
    mix-blend-mode: color-dodge;
    animation: pulse-destroy 15s ease-in-out infinite;
    clip-path: polygon(
        calc(50% + var(--clip-x, 0px)) calc(50% + var(--clip-y, 0px)),
        calc(100% + var(--clip-x, 0px)) calc(0% + var(--clip-y, 0px)),
        calc(100% + var(--clip-x, 0px)) calc(100% + var(--clip-y, 0px)),
        calc(0% + var(--clip-x, 0px)) calc(100% + var(--clip-y, 0px)),
        calc(0% + var(--clip-x, 0px)) calc(0% + var(--clip-y, 0px))
    );
}

@keyframes distort-space {
    0% { 
        transform: perspective(500px) rotateX(0deg) scale(1);
        filter: url('#extreme-distort');
    }
    50% { 
        transform: perspective(500px) rotateX(15deg) scale(1.1);
        filter: url('#data-corruption');
    }
    100% { 
        transform: perspective(500px) rotateX(0deg) scale(1);
        filter: url('#extreme-distort');
    }
}

@keyframes glitch-shift {
    0%, 100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        transform: translate(0);
    }
    25% {
        clip-path: polygon(var(--clip-x1, 0%) var(--clip-y1, 0%), 
                          var(--clip-x2, 100%) var(--clip-y2, 0%), 
                          var(--clip-x3, 100%) var(--clip-y3, 100%), 
                          var(--clip-x4, 0%) var(--clip-y4, 100%));
        transform: translate(5px, -5px);
    }
    50% {
        clip-path: inset(var(--clip-top, 0%) var(--clip-right, 0%) var(--clip-bottom, 0%) var(--clip-left, 0%));
        transform: translate(-5px, 5px);
    }
    75% {
        clip-path: polygon(50% var(--clip-y1, 0%), 
                          var(--clip-x2, 100%) 50%, 
                          50% var(--clip-y3, 100%), 
                          var(--clip-x4, 0%) 50%);
        transform: translate(5px, 5px);
    }
}

@keyframes wave-rotation {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes fragment-rotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes data-flow {
    0% { transform: translateX(0); }
    100% { transform: translateX(20px); }
}

@keyframes interference-shift {
    0% { --interference-angle: 90deg; opacity: 0.5; }
    25% { --interference-angle: 88deg; opacity: 0.7; }
    50% { --interference-angle: 92deg; opacity: 0.3; }
    75% { --interference-angle: 87deg; opacity: 0.6; }
    100% { --interference-angle: 90deg; opacity: 0.5; }
}

@keyframes noise-intensity {
    0% { --noise-opacity: 0.1; transform: scale(1); }
    25% { --noise-opacity: 0.15; transform: scale(1.02); }
    50% { --noise-opacity: 0.08; transform: scale(0.98); }
    75% { --noise-opacity: 0.12; transform: scale(1.01); }
    100% { --noise-opacity: 0.1; transform: scale(1); }
}

@keyframes rotate-chaos {
    0% { transform: rotate(0deg) scale(1); --rotation: 0deg; }
    25% { transform: rotate(90deg) scale(1.5); --rotation: 90deg; }
    50% { transform: rotate(180deg) scale(1); --rotation: 180deg; }
    75% { transform: rotate(270deg) scale(0.5); --rotation: 270deg; }
    100% { transform: rotate(360deg) scale(1); --rotation: 360deg; }
}

@keyframes pulse-destroy {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    25% { opacity: 0.3; transform: scale(1.2) rotate(5deg); }
    50% { opacity: 0.8; transform: scale(0.9) rotate(-5deg); }
    75% { opacity: 0.4; transform: scale(1.1) rotate(3deg); }
}

.chromatic-aberration {
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    mix-blend-mode: screen;
    animation: chromatic-shift 4s infinite;
}

.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(95, 184, 255, 0.05));
    mix-blend-mode: difference;
    animation: glitch-move 0.2s infinite;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.15;
    z-index: 1;
    mix-blend-mode: overlay;
    animation: noise-shift 0.5s infinite;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    background-size: 100% 4px;
    z-index: 2;
}

@keyframes distort {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(2deg); }
    50% { transform: scale(0.9) rotate(-1deg); }
    75% { transform: scale(1.05) rotate(1deg); }
}

@keyframes glitch-move {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes noise-shift {
    0%, 100% { 
        background: repeating-radial-gradient(#000514 0 0.0001%, #5fb8ff 0 0.0002%) 50% 0/1500px 1500px;
        opacity: 0.1;
    }
    50% { 
        background: repeating-radial-gradient(#5fb8ff 0 0.0001%, #000514 0 0.0002%) 50% 0/2000px 2000px;
        opacity: 0.15;
    }
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 60%, rgba(0, 5, 20, 0.8) 100%);
    pointer-events: none;
    z-index: 3;
}

.grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(95, 184, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(95, 184, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: grid-move 20s linear infinite;
    z-index: 0;
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

.floating-elements {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.circuit-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(95, 184, 255, 0.3), transparent);
    height: 2px;
    width: 100%;
    animation: circuit-float 8s linear infinite;
}

.circuit-line:nth-child(1) {
    top: 20%;
    animation-delay: 0s;
}

.circuit-line:nth-child(2) {
    top: 50%;
    animation-delay: -3s;
}

.circuit-line:nth-child(3) {
    top: 80%;
    animation-delay: -6s;
}

@keyframes circuit-float {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.floating-symbol {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(95, 184, 255, 0.5);
    animation: symbol-float 15s linear infinite;
}

.floating-symbol:nth-child(4) {
    top: 30%;
    left: 20%;
    animation-delay: 0s;
    transform: rotate(45deg);
}

.floating-symbol:nth-child(5) {
    top: 60%;
    left: 70%;
    animation-delay: -5s;
    transform: rotate(30deg);
}

.floating-symbol:nth-child(6) {
    top: 80%;
    left: 40%;
    animation-delay: -10s;
    transform: rotate(60deg);
}

@keyframes symbol-float {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(100px, -100px) rotate(360deg);
        opacity: 0;
    }
}

/* Particles */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particles::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#5fb8ff 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particle-drift 20s linear infinite;
    opacity: 0.3;
}

@keyframes particle-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50px); }
}

/* Data Streams */
.data-streams {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.stream {
    position: absolute;
    width: 1px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #5fb8ff, transparent);
    animation: stream-fall 3s linear infinite;
}

.stream:nth-child(1) { left: 20%; animation-delay: -1s; }
.stream:nth-child(2) { left: 40%; animation-delay: -0.5s; }
.stream:nth-child(3) { left: 60%; animation-delay: -1.5s; }
.stream:nth-child(4) { left: 80%; animation-delay: -2s; }

@keyframes stream-fall {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* Pulse Rings */
.pulse-rings {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.ring {
    position: absolute;
    border: 1px solid rgba(95, 184, 255, 0.3);
    border-radius: 50%;
    animation: ring-pulse 4s ease-out infinite;
}

.ring:nth-child(1) { animation-delay: -2s; }
.ring:nth-child(2) { animation-delay: -1s; }
.ring:nth-child(3) { animation-delay: 0s; }

@keyframes ring-pulse {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

/* Corner Decorations */
.corner-decorations {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.corner {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(95, 184, 255, 0.3);
}

.top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* Energy Bars */
.energy-bars {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.bar {
    width: 3px;
    height: 20px;
    background: rgba(95, 184, 255, 0.5);
    animation: energy-pulse 1.5s ease-in-out infinite;
}

.bar:nth-child(1) { animation-delay: 0s; }
.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.4s; }
.bar:nth-child(4) { animation-delay: 0.6s; }
.bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes energy-pulse {
    0%, 100% { height: 20px; }
    50% { height: 40px; }
}

/* Grunge Elements */
.grunge-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='grunge' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence baseFrequency='0.02' numOctaves='3' type='fractalNoise' /%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='100%25' height='100%25' filter='url(%23grunge)'/%3E%3C/svg%3E");
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 2;
}

.texture-scratches {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent 1px,
            rgba(95, 184, 255, 0.03) 1px,
            transparent 2px
        ),
        repeating-linear-gradient(
            45deg,
            transparent 0,
            transparent 5px,
            rgba(95, 184, 255, 0.02) 5px,
            transparent 6px
        );
    opacity: 0.3;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 2;
    animation: scratch-shift 30s linear infinite;
}

.dirty-lens {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 30% 40%,
        rgba(95, 184, 255, 0.05) 0%,
        transparent 50%
    ),
    radial-gradient(
        circle at 70% 60%,
        rgba(95, 184, 255, 0.03) 0%,
        transparent 40%
    );
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 2;
}

.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)' opacity='0.08'/%3E%3C/svg%3E");
    opacity: 0.08;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 3;
    animation: grain 0.8s steps(1) infinite;
}

.old-paper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(
            circle at 50% 50%,
            rgba(95, 184, 255, 0.02) 0%,
            transparent 90%
        ),
        repeating-linear-gradient(
            45deg,
            transparent 0,
            transparent 1px,
            rgba(95, 184, 255, 0.01) 1px,
            transparent 2px
        );
    opacity: 0.15;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

@keyframes scratch-shift {
    0% {
        transform: translateX(0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateX(20px) scale(1.1);
        opacity: 0.2;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 0.3;
    }
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0) }
    10% { transform: translate(-1%, -1%) }
    20% { transform: translate(1%, 1%) }
    30% { transform: translate(-2%, -2%) }
    40% { transform: translate(2%, 2%) }
    50% { transform: translate(-1%, 1%) }
    60% { transform: translate(1%, -1%) }
    70% { transform: translate(2%, -2%) }
    80% { transform: translate(-2%, 2%) }
    90% { transform: translate(1%, -2%) }
}

/* Glow Overlay */
.glow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(95, 184, 255, 0.1) 0%, transparent 70%);
    animation: glow-pulse 4s ease-in-out infinite;
    z-index: 3;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@font-face {
    font-family: 'Playwrite TZ';
    src: url('fonts/PlaywriteTZ-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
}

/* Flash Text */
.flash-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Playwrite TZ', sans-serif;
    font-size: 18vw;
    opacity: 0;
    pointer-events: none;
    z-index: 99999;
    font-weight: 400;
    letter-spacing: -0.2vw;
    will-change: transform, opacity, clip-path;
    mix-blend-mode: normal;
    filter: url('#data-slice') contrast(150%);
    background: none;
}

/* Style for dark backgrounds */
.flash-text.on-dark {
    color: #ffffff;
    text-shadow: 
        0 0 1px #ffffff,
        0 0 2px #5fb8ff;
}

/* Style for light backgrounds */
.flash-text.on-light {
    color: #5fb8ff;
    text-shadow: 
        0 0 1px #5fb8ff,
        0 0 2px rgba(95, 184, 255, 0.5);
}

.flash-text.active {
    animation: 
        text-reveal 0.8s cubic-bezier(0.23, 1, 0.32, 1),
        text-glitch 0.05s steps(2) infinite;
}

.flash-text::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0%,
        transparent 49%,
        rgba(95, 184, 255, 0.1) 49.5%,
        transparent 50%
    );
    background-size: 4px 100%;
    mix-blend-mode: overlay;
    animation: scan-lines 10s linear infinite;
    pointer-events: none;
}

@keyframes text-reveal {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
        filter: url('#data-slice') contrast(150%);
    }
    5% {
        opacity: 1;
        clip-path: polygon(0 0, 15% 0, 15% 100%, 0 100%);
        filter: url('#frequency-shift') contrast(150%);
    }
    10% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        filter: url('#data-slice') contrast(150%);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        filter: url('#data-corruption') contrast(150%);
    }
    90% {
        clip-path: polygon(85% 0, 100% 0, 100% 100%, 85% 100%);
        filter: url('#frequency-shift') contrast(150%);
    }
    100% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
        clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
        filter: url('#data-slice') contrast(150%);
    }
}

@keyframes text-glitch {
    0%, 100% { 
        transform: translate(-50%, -50%) skew(0deg);
        filter: url('#data-slice');
    }
    33% { 
        transform: translate(-50.2%, -49.8%) skew(0.5deg);
        filter: url('#frequency-shift');
    }
    66% { 
        transform: translate(-49.8%, -50.2%) skew(-0.5deg);
        filter: url('#data-corruption');
    }
}

@keyframes scan-lines {
    0% {
        transform: translateX(-50%);
        opacity: 0.5;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(50%);
        opacity: 0.5;
    }
}

/* Terminal Lines */
.data-terminal {
    position: fixed;
    bottom: 40px;
    left: 40px;
    font-family: monospace;
    font-size: 14px;
    color: #5fb8ff;
    opacity: 0.7;
    text-transform: uppercase;
}

.terminal-line {
    opacity: 0;
    transform: translateY(20px);
    animation: terminal-appear 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    margin: 8px 0;
}

.terminal-line:nth-child(1) { animation-delay: 1s; }
.terminal-line:nth-child(2) { animation-delay: 2s; }
.terminal-line:nth-child(3) { animation-delay: 3s; }
.terminal-line:nth-child(4) { animation-delay: 4s; }

/* Corner Elements */
.corner-elements {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid #5fb8ff;
    opacity: 0.5;
}

.top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
    animation: corner-glitch 2s ease-in-out infinite;
}

.top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
    animation: corner-glitch 2s ease-in-out infinite 0.5s;
}

.bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
    animation: corner-glitch 2s ease-in-out infinite 1s;
}

.bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
    animation: corner-glitch 2s ease-in-out infinite 1.5s;
}

/* Data Streams */
.data-streams-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.3;
}

.data-column {
    position: absolute;
    top: -100%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent,
        #5fb8ff 20%,
        #5fb8ff 80%,
        transparent
    );
    animation: data-fall 4s linear infinite;
}

.data-column:nth-child(1) { left: 20%; animation-delay: 0s; }
.data-column:nth-child(2) { left: 50%; animation-delay: 2s; }
.data-column:nth-child(3) { left: 80%; animation-delay: 1s; }

/* Frequency Bars */
.frequency-bars {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    gap: 4px;
    height: 60px;
    align-items: flex-end;
}

.frequency-bars::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 60px;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 3px,
        rgba(95, 184, 255, 0.2) 3px,
        rgba(95, 184, 255, 0.2) 4px
    );
    animation: frequency-scan 2s linear infinite;
}

/* Animations */
@keyframes terminal-appear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 0.7;
        transform: translateY(0);
    }
}

@keyframes corner-glitch {
    0%, 100% { 
        opacity: 0.5;
        filter: none;
    }
    50% { 
        opacity: 0.7;
        filter: url('#data-slice');
    }
}

@keyframes data-fall {
    0% {
        transform: translateY(-100%) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(200%) translateX(20px);
        opacity: 0;
    }
}

@keyframes frequency-scan {
    0% {
        transform: translateX(-100%);
        opacity: 0.5;
    }
    50% {
        opacity: 0.2;
    }
    100% {
        transform: translateX(100%);
        opacity: 0.5;
    }
}

/* Grid Overlay */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.grid-line {
    position: absolute;
    background: rgba(95, 184, 255, 0.1);
}

.grid-line.horizontal {
    width: 100%;
    height: 1px;
    transform-origin: left;
    animation: grid-scan 8s linear infinite;
}

.grid-line.vertical {
    width: 1px;
    height: 100%;
    transform-origin: top;
    animation: grid-scan-vertical 8s linear infinite;
}

.grid-line.horizontal:nth-child(1) { top: 33%; animation-delay: -2s; }
.grid-line.horizontal:nth-child(2) { top: 66%; animation-delay: -4s; }
.grid-line.horizontal:nth-child(3) { top: 90%; animation-delay: -6s; }
.grid-line.vertical:nth-child(4) { left: 33%; animation-delay: -1s; }
.grid-line.vertical:nth-child(5) { left: 66%; animation-delay: -3s; }
.grid-line.vertical:nth-child(6) { left: 90%; animation-delay: -5s; }

/* Data Metrics */
.data-metrics {
    position: fixed;
    left: 40px;
    top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: monospace;
    color: #5fb8ff;
    font-size: 12px;
    text-transform: uppercase;
    mix-blend-mode: screen;
}

.metric {
    display: grid;
    grid-template-columns: auto 60px;
    grid-template-rows: auto auto;
    gap: 5px;
    animation: metric-flicker 4s ease-in-out infinite;
}

.metric-label {
    grid-column: 1;
    grid-row: 1;
    opacity: 0.7;
}

.metric-value {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-weight: bold;
}

.metric-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 2px;
    background: #5fb8ff;
    position: relative;
    overflow: hidden;
}

.metric-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #5fb8ff, transparent);
    animation: metric-bar-scan 2s ease-in-out infinite;
}

/* Time Code */
.time-code {
    position: fixed;
    top: 40px;
    right: 40px;
    font-family: monospace;
    font-size: 14px;
    color: #5fb8ff;
    letter-spacing: 2px;
}

.time-segment {
    animation: time-segment-glitch 0.1s steps(1) infinite;
}

/* Scan Lines */
.scan-lines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        rgba(95, 184, 255, 0.02) 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 5;
    animation: scan-line-drift 10s linear infinite;
}

/* New Animations */
@keyframes grid-scan {
    0% { transform: scaleX(0); opacity: 0.2; }
    50% { transform: scaleX(1); opacity: 0.1; }
    100% { transform: scaleX(0); opacity: 0.2; }
}

@keyframes grid-scan-vertical {
    0% { transform: scaleY(0); opacity: 0.2; }
    50% { transform: scaleY(1); opacity: 0.1; }
    100% { transform: scaleY(0); opacity: 0.2; }
}

@keyframes metric-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes metric-bar-scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes time-segment-glitch {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
    75% { opacity: 0.9; }
}

@keyframes block-pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.5;
        filter: none;
    }
    50% { 
        transform: scale(0.95);
        opacity: 0.7;
        filter: url('#data-corruption');
    }
}

@keyframes scan-line-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

@keyframes fractal-evolution {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes fluid-motion {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes shape-morphing {
    0% {
        transform: scale(1) rotate(0deg);
        clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
        clip-path: polygon(30% 30%, 70% 30%, 70% 70%, 30% 70%);
    }
    100% {
        transform: scale(1) rotate(360deg);
        clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    }
}

@keyframes noise-diffuse {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(90deg);
    }
    100% {
        transform: scale(1) rotate(180deg);
    }
}

.flash-text.active {
    animation: text-flash 800ms cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes text-flash {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    5% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    10% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    30%, 70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}
