.scanlines {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.2) 50%
    );
    background-size: 100% 2px;
    pointer-events: none;
}

.glitch-text-shadow {
    text-shadow: 3px 0 #0066FF, -3px 0 #53ddfc;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    20% { transform: skew(3deg); }
    24% { transform: skew(-1deg); }
    28% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

.extreme-glitch {
    position: relative;
}

.extreme-glitch::before,
.extreme-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.extreme-glitch::before {
    color: #0066FF;
    z-index: -1;
    animation: glitch-anim 0.3s infinite;
}

.extreme-glitch::after {
    color: #53ddfc;
    z-index: -2;
    animation: glitch-anim2 0.3s infinite;
}

@keyframes glitch-anim {
    0% { clip: rect(24px, 9999px, 90px, 0); transform: translate(-5px, -2px); }
    20% { clip: rect(85px, 9999px, 10px, 0); transform: translate(5px, 2px); }
    40% { clip: rect(12px, 9999px, 56px, 0); transform: translate(-2px, 5px); }
    60% { clip: rect(62px, 9999px, 78px, 0); transform: translate(2px, -5px); }
    80% { clip: rect(41px, 9999px, 32px, 0); transform: translate(-5px, 2px); }
    100% { clip: rect(95px, 9999px, 15px, 0); transform: translate(5px, -2px); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(14px, 9999px, 30px, 0); transform: translate(5px, 2px); }
    20% { clip: rect(45px, 9999px, 80px, 0); transform: translate(-5px, -2px); }
    40% { clip: rect(62px, 9999px, 16px, 0); transform: translate(2px, -5px); }
    60% { clip: rect(12px, 9999px, 58px, 0); transform: translate(-2px, 5px); }
    80% { clip: rect(81px, 9999px, 72px, 0); transform: translate(5px, -2px); }
    100% { clip: rect(25px, 9999px, 45px, 0); transform: translate(-5px, 2px); }
}

.neon-glow {
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.4);
}

.ghost-border {
    border: 0.5px solid rgba(0, 102, 255, 0.3);
}

.bg-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.12;
}

.ticker-wrap {
    overflow: hidden;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(0, 102, 255, 0.5);
    white-space: nowrap;
}

.ticker {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.flicker {
    animation: flicker-anim 0.1s infinite alternate;
}

@keyframes flicker-anim {
    0% { opacity: 0.95; }
    100% { opacity: 1; filter: brightness(1.2) contrast(1.1); }
}

.tilt-1 { transform: rotate(-1deg); }
.tilt-2 { transform: rotate(1.5deg); }
.tilt-3 { transform: rotate(-0.5deg) translateX(-10px); }

.anomaly-card {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.anomaly-card:hover {
    transform: scale(1.08) rotate(0deg) !important;
    z-index: 50;
    background-color: rgba(0, 102, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.4), inset 0 0 10px rgba(83, 221, 252, 0.2);
    animation: subtle-glitch 0.2s infinite;
}

@keyframes subtle-glitch {
    0% { transform: scale(1.08) translate(0); }
    25% { transform: scale(1.08) translate(-2px, 1px); }
    50% { transform: scale(1.08) translate(2px, -1px); }
    75% { transform: scale(1.08) translate(-1px, -2px); }
    100% { transform: scale(1.08) translate(1px, 2px); }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 20s linear infinite;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-4px, 2px); }
    40% { transform: translate(-2px, -3px); opacity: 0.8; }
    60% { transform: translate(4px, 2px); }
    80% { transform: translate(2px, -4px); opacity: 0.9; }
    100% { transform: translate(0); }
}

.glitch-jitter-on-hover:hover {
    animation: glitch 0.15s infinite;
    color: #53ddfc;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #0066FF;
}

.under-construction-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    min-height: 100vh;
    height: 100dvh;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: radial-gradient(circle at 20% 15%, rgba(0, 102, 255, 0.2), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(83, 221, 252, 0.15), transparent 40%),
        rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(6px);
}

html.under-construction-enabled .under-construction-overlay {
    display: flex;
}

html.under-construction-enabled,
html.under-construction-enabled body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

html.under-construction-enabled body {
    position: fixed;
    inset: 0;
    width: 100%;
}

.under-construction-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.04) 2px,
        rgba(255, 255, 255, 0.04) 3px
    );
    pointer-events: none;
}

.under-construction-card {
    position: relative;
    width: min(720px, 100%);
    border: 1px solid rgba(0, 102, 255, 0.45);
    background: rgba(5, 10, 20, 0.92);
    padding: 2.5rem 2rem;
    box-shadow: 0 0 32px rgba(0, 102, 255, 0.22);
    text-align: center;
}

.under-construction-label {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-style: italic;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #53ddfc;
    text-transform: uppercase;
}

.under-construction-loading {
    margin: 1rem 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ffffff;
    text-transform: uppercase;
    animation: under-construction-pulse 1.1s infinite alternate;
}

@keyframes under-construction-pulse {
    from {
        opacity: 0.65;
        text-shadow: 0 0 0 rgba(83, 221, 252, 0);
    }
    to {
        opacity: 1;
        text-shadow: 0 0 14px rgba(83, 221, 252, 0.55);
    }
}

html.overload-level-1 body {
    filter: contrast(1.12) saturate(1.18);
}

html.overload-level-2 body {
    filter: contrast(1.2) saturate(1.25) hue-rotate(8deg);
}

html.overload-level-3 body {
    filter: contrast(1.3) saturate(1.35) hue-rotate(16deg) blur(0.6px);
}

html.overload-level-4 body {
    filter: contrast(1.5) saturate(1.55) hue-rotate(28deg) blur(1px);
    animation: overload-shake 0.18s infinite;
}

html.overload-level-5 body {
    filter: contrast(1.9) saturate(1.8) hue-rotate(50deg) blur(1.6px);
    animation: overload-shake 0.1s infinite;
}

@keyframes overload-shake {
    0% { transform: translate(0, 0) skew(0deg); }
    25% { transform: translate(-2px, 1px) skew(0.4deg); }
    50% { transform: translate(2px, -1px) skew(-0.4deg); }
    75% { transform: translate(-1px, -2px) skew(0.3deg); }
    100% { transform: translate(1px, 2px) skew(-0.3deg); }
}
