/* --- Visual Juice & Special Effects --- */

/* Marquee Animation */
.marquee-wrapper {
    display: flex;
    width: max-content;
    animation: marquee-loop 20s linear infinite;
    animation-delay: 4s;
}

.marquee-content {
    padding-right: 50px; /* Gap between loops */
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
}

@keyframes marquee-loop {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

#now-playing-marquee .animate-pulse {
    box-shadow: 0 0 8px var(--accent);
}

/* Boot Sequence */
.boot-skip #boot-overlay { display: none !important; }

#boot-overlay {
    position: fixed; inset: 0; background: #000; z-index: 9999;
    display: flex; flex-direction: column; padding: 2rem;
    font-family: 'Courier New', monospace; color: #fff;
    pointer-events: auto; transition: opacity 0.5s ease-in-out;
}
#boot-terminal { font-size: 0.8rem; line-height: 1.4; overflow: hidden; text-shadow: 0 0 5px #fff; }

/* CRT Mode */
.crt-active body::before {
    content: " "; display: block; position: fixed; inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    z-index: 100; background-size: 100% 4px; pointer-events: none;
}
.crt-active body::after {
    content: " "; display: block; position: fixed; inset: 0;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 3px 100%; z-index: 101; pointer-events: none;
    animation: crt-flicker 0.15s infinite;
}

/* Curvature and Vignette */
.crt-active #crt-vignette {
    display: block !important;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 75%, rgba(0, 0, 0, 0.5) 100%);
    box-shadow: inset 0 0 10rem rgba(0,0,0,0.8);
    z-index: 102; pointer-events: none;
}

/* The actual "Tube" curve mask */
.crt-active::before {
    content: ""; position: fixed; inset: 0; z-index: 103; pointer-events: none;
    background: radial-gradient(circle at center, transparent 0%, transparent 70%, rgba(0,0,0,1) 120%);
}

@keyframes crt-flicker { 0% { opacity: 0.1; } 50% { opacity: 0.15; } 100% { opacity: 0.1; } }

/* System Glitch (Konami) */
.system-glitch { animation: screen-shake 0.1s infinite; filter: invert(1) hue-rotate(90deg); }
@keyframes screen-shake {
    0% { transform: translate(2px, 1px) rotate(0deg); }
    20% { transform: translate(-1px, -2px) rotate(-1deg); }
    40% { transform: translate(-3px, 0px) rotate(1deg); }
    100% { transform: translate(-1px, 2px) rotate(-1deg); }
}

/* --- Power Surge Effect --- */
.power-surge-active {
    animation: power-surge-flicker 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes power-surge-flicker {
    0% { filter: brightness(1); transform: translateY(0); }
    30% { filter: brightness(0.4) contrast(1.5); transform: translateY(2px); }
    60% { filter: brightness(0.7) contrast(1.2); transform: translateY(-1px); }
    100% { filter: brightness(1); transform: translateY(0); }
}
