:root {
    /* --- GOTHIC LAVENDER & GRUNGE PALETTE --- */
    --color-text-base: #d1d1e0;          /* Soft Mist Grey */
    --color-primary-accent: #9d81ba;     /* Dusty Lavender (Headers/Accents) */
    --color-secondary-accent: #c3a6ff;   /* Bright Lavender (Links/Hover) */
    --color-background-fill: #1a1a1c;    /* Deep Charcoal Box Fill */
    --color-box-border: #3d3d45;         /* Muted Iron Border */
    --color-light-bg: #2d2d33;           /* Muted Stone for Header/Nav Hover */
    --color-light-border: #4a4a52;       /* Subtle dashed lines */
    --color-darker-bg: #0f0f11;          /* Near-Black for Body */
    --color-dropdown-separator: #2d2d33;

    --spacing-xs: 5px;
    --spacing-s: 10px;
    --spacing-m: 15px;
    --spacing-l: 20px;
}

/* --- Basic Styles --- */
/* Start https://www.cursors-4u.com */ * {cursor: url(https://cur.cursors-4u.net/symbols/sym-7/sym780.cur), auto !important;} /* End https://www.cursors-4u.com */

body {
    background-color: var(--color-darker-bg);
    /* Subtle noise texture for a gritty, cinematic feel */
    background-image: url('https://64.media.tumblr.com/af7a7d106a531fa8bfcfe668ddfcbddd/83e18aa30bd413c2-63/s540x810/331964d628da9facdb75c5735eed951793720bcc.gifv'); 
    background-repeat: repeat;
    color: var(--color-text-base);
    font-family: 'Ubuntu', 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0; 
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* --- Link Styling --- */
a {
    color: var(--color-primary-accent);
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--color-secondary-accent);
    text-shadow: 0 0 8px var(--color-secondary-accent);
    transform: translateX(3px);
}

/* --- Layout Wrappers --- */
#site-header, #container {
    max-width: 1000px; /* Narrower feel for a more intimate "journal" look */
    margin: 0 auto;
    padding: 0 var(--spacing-l); 
}

#site-header {
    margin-top: var(--spacing-l);
    margin-bottom: var(--spacing-l);
    background-color: var(--color-background-fill);
    text-align: center;
    border: 1px solid var(--color-box-border);
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.5); /* Brutalist/Grunge shadow */
    border-radius: 4px;
    padding: var(--spacing-m);
}

.header-content-line {
    display: flex;
    justify-content: center;
    align-items: center;
}

#site-header h1 {
    font-family: 'Courier New', Courier, monospace; /* Typewriter feel */
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
    color: var(--color-primary-accent); 
    text-transform: lowercase;
    letter-spacing: -2px;
}

/* --- Main Container & Columns --- */
#container {
    display: flex;
    gap: var(--spacing-l);
    align-items: flex-start;
    padding-bottom: 50px;
}

#left-sidebar {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-l);
}

#main-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* --- The Boxed Aesthetic --- */
.box {
    background-color: var(--color-background-fill);
    border: 1px solid var(--color-box-border);
    padding: var(--spacing-m);
    margin-bottom: var(--spacing-l);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
}

.box-header {
    background-color: var(--color-light-bg); 
    color: var(--color-primary-accent);
    padding: var(--spacing-xs) var(--spacing-s);
    margin: -15px -15px 15px -15px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--color-box-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-decor {
    filter: grayscale(1) brightness(0.8) sepia(1) hue-rotate(240deg); /* Makes gifs look lavender */
    width: 20px;
}

/* --- Navigation --- */
#main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#main-nav li a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-m);
    border-bottom: 1px dashed var(--color-light-border);
    font-size: 0.9em;
}

#main-nav li a:hover {
    background-color: var(--color-light-bg);
}

/* --- Dropdown Styles --- */
.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background-color: var(--color-darker-bg);
}

.dropdown:hover .dropdown-content {
    max-height: 200px;
}

.dropdown-content a {
    font-size: 0.85em !important;
    padding-left: 30px !important;
}

/* --- Quotes & Typography --- */
blockquote {
    background-color: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--color-primary-accent);
    padding: var(--spacing-m);
    margin: var(--spacing-l) 0;
    font-family: 'Courier New', Courier, monospace;
    font-style: italic;
}

blockquote footer {
    margin-top: 10px;
    color: var(--color-primary-accent);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Custom Elements --- */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-box-border), transparent);
    margin: var(--spacing-l) 0;
}

ul:not(#main-nav ul, .dropdown-content ul, .info-box ul) li {
    padding-left: var(--spacing-l);
    position: relative;
    margin-bottom: var(--spacing-s);
    line-height: 1.4;
}

ul:not(#main-nav ul, .dropdown-content ul, .info-box ul) li::before {
    content: "✦"; /* Gothic star bullet */
    color: var(--color-primary-accent);
    position: absolute;
    left: 0;
}

/* --- Reason Randomizer Text --- */
#reason-display {
    font-family: 'Courier New', Courier, monospace;
    font-weight: normal;
    font-size: 1.1em;
    line-height: 1.5;
    transition: opacity 0.3s ease-in-out;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    #container { flex-direction: column; }
    #left-sidebar { width: 100%; flex: none; }
}


/* --- TV GLITCH EFFECT --- */
.glitch {
    position: relative;
    display: inline-block;
}

/* The "Ghost" layers */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-background-fill); /* Matches box bg to hide overlap */
}

/* Purple/Lavender Layer */
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--color-secondary-accent);
    clip: rect(44px, 450px, 56px, 0); /* Horizontal slice */
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

/* Blue/Darker Layer */
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #5e5e8a; /* Deep blue-grey for depth */
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

/* The shaking/clipping animation */
@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    5% { clip: rect(70px, 9999px, 71px, 0); }
    10% { clip: rect(29px, 9999px, 83px, 0); }
    15% { clip: rect(16px, 9999px, 91px, 0); }
    20% { clip: rect(2px, 9999px, 23px, 0); }
    /* ... it continues to jitter randomly ... */
    100% { clip: rect(67px, 9999px, 62px, 0); }
}

/* Shorter, faster jitter for the second layer */
@keyframes glitch-anim2 {
    0% { clip: rect(10px, 9999px, 20px, 0); transform: skew(0.5deg); }
    100% { clip: rect(80px, 9999px, 90px, 0); transform: skew(-0.5deg); }
}

/* CRT Scanline Effect Overlay (Optional but very "TV Glow") */
#site-header::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.05) 0px,
        rgba(0, 0, 0, 0.05) 1px,
        transparent 2px,
        transparent 3px
    );
    pointer-events: none; /* Let clicks pass through */
}


#site-header {
    position: relative; /* Essential for the static overlay to align */
    overflow: hidden;   /* Keeps the static inside the box corners */
    transition: background 0.3s ease;
}

/* The Static Layer */
#site-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* A classic TV static gif */
    background-image: url('https://64.media.tumblr.com/af7a7d106a531fa8bfcfe668ddfcbddd/83e18aa30bd413c2-63/s540x810/331964d628da9facdb75c5735eed951793720bcc.gifv');
    background-size: cover;
    opacity: 0; /* Hidden by default */
    pointer-events: none;
    z-index: 1; /* Sits above the background but below the text */
    transition: opacity 0.1s steps(2); /* Makes the "flash" feel snappier */
}

/* When you hover over the header... */
#site-header:hover::before {
    opacity: 0.15; /* Adjust this number to make the static more or less intense */
}

/* Optional: Make the text jitter more when hovered */
#site-header:hover h1.glitch {
    animation: jitter-fast 0.2s infinite;
}

@keyframes jitter-fast {
    0% { transform: translate(0,0); }
    25% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, 1px); }
    100% { transform: translate(0,0); }
}

.signal-lost {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 0.6em;
    color: var(--color-secondary-accent);
    opacity: 0;
    font-family: 'Courier New', monospace;
}

#site-header:hover .signal-lost {
    opacity: 1;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* --- SCOTCH TAPE EFFECT --- */
.box {
    position: relative;
}

.box::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: 80px;
    height: 25px;
    /* Translucent tape look */
    background: rgba(200, 200, 220, 0.2); 
    box-shadow: inset 0 0 5px rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.05);
    z-index: 10;
}

/* --- THE "TRACKING" LINE --- */
/* A thin white line that moves up the screen like a bad VHS tape */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 2px;
    background: rgba(157, 129, 186, 0.1); /* Lavender tracking line */
    opacity: 0.5;
    z-index: 9999;
    pointer-events: none;
    animation: vhs-tracking 8s linear infinite;
}

@keyframes vhs-tracking {
    0% { top: -10%; }
    100% { top: 110%; }
}

/* Makes the "You (EST)" clock feel like a tracking beacon */
#their-clock {
    text-shadow: 0 0 5px var(--color-primary-accent);
    animation: beacon-blink 2s infinite ease-in-out;
}

@keyframes beacon-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Make the list items feel like a list of instructions */
.content-box ul li b {
    color: var(--color-primary-accent);
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* --- LIVE INDICATOR --- */
.live-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #ff4444; /* Alert Red */
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
    box-shadow: 0 0 5px #ff4444;
    animation: blink-red 1.5s infinite;
}

@keyframes blink-red {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}


#their-clock {
    text-shadow: 0 0 8px var(--color-primary-accent);
    letter-spacing: 1px;
}

/* --- ECHOES & WHISPERS STYLING --- */
.typewriter-quotes {
    background: rgba(0, 0, 0, 0.2); /* Darkens the inside of the scroll area */
    border-radius: 4px;
}

.quote-item {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 2px solid var(--color-primary-accent);
}

.typewriter-quotes blockquote {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
    color: var(--color-text-base);
    line-height: 1.5;
    margin: 0 0 5px 0;
    padding: 0;
}

.typewriter-quotes .source {
    font-size: 0.75em;
    color: var(--color-primary-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.transmission-sub {
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    margin-bottom: 15px;
    color: var(--color-secondary-accent);
}

/* Custom scrollbar for this box to make it feel more "techy" */
.scroll-content::-webkit-scrollbar {
    width: 6px;
}
.scroll-content::-webkit-scrollbar-thumb {
    background: var(--color-primary-accent);
    border-radius: 10px;
}




.content-box ul {
    list-style: none;
    padding-left: 1.5em;
}

.content-box li {
    position: relative;
    margin-bottom: 8px;
}


.content-box li::before {
    content: "◆";
    position: absolute;
    left: -1.4em;
    color: var(--color-primary-accent);
    font-size: 0.85em;
    
    animation: bullet-glitch 4s infinite;
}


@keyframes bullet-glitch {
    0%, 90%, 100% { 
        transform: translate(0, 0); 
        opacity: 1; 
        color: var(--color-primary-accent);
    }
    91% { 
        transform: translate(2px, -1px); 
        opacity: 0.8; 
        color: #ff4444; 
    }
    92% { 
        transform: translate(-2px, 1px); 
        opacity: 1;
    }
    93% { 
        transform: translate(0, 0); 
    }
    94% { 
        transform: scaleY(1.5) scaleX(0.8); 
        color: #ffffff; 
    }
    95% { 
        transform: scale(1); 
    }
}


.cassette-container {
    padding: var(--spacing-s);
    text-align: center;
    background: #1a1a1a; 
    border: 2px solid #333;
    margin: 10px;
    border-radius: 4px;
    box-shadow: inset 0 0 10px #000;
}

.cassette-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a0a0a; 
    padding: 10px;
    border: 1px solid #444;
    border-radius: 2px;
    position: relative;
}

.reel {
    width: 25px;
    height: 25px;
    border: 3px dashed var(--color-primary-accent); 
    border-radius: 50%;
    opacity: 0.4;
}

.spinning {
    animation: tape-spin 3s linear infinite;
}

.reel-center {
    z-index: 2;
}

.spotify-tape-disc {
    width: 45px;
    height: auto;
    filter: drop-shadow(0 0 5px var(--color-primary-accent));
    transition: transform 0.3s ease;
}

.spotify-tape-disc:hover {
    transform: scale(1.1) rotate(10deg);
}

.tape-label {
    font-family: 'Courier New', monospace;
    font-size: 0.7em;
    color: #888;
    margin-top: 8px;
    text-transform: uppercase;
    background: #f0f0f0; 
    color: #222;
    display: inline-block;
    padding: 2px 8px;
    transform: rotate(-1deg);
}


@keyframes tape-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.cassette-container {
    padding: 15px 10px;
    text-align: center;
    background: #1e1e1e;
    border: 2px solid #333;
    margin: 10px;
    border-radius: 4px;
    box-shadow: inset 0 0 15px #000;
}

.cassette-body {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #080808; 
    padding: 12px;
    border: 1px solid #333;
    border-radius: 2px;
    margin-bottom: 12px;
}

.tape-window-center {
    width: 40%;
    height: 10px;
    background: #111;
    border: 1px solid #222;
    position: relative;
    overflow: hidden;
}


.tape-strands {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #3d2b1f, transparent);
    opacity: 0.6;
}

.reel {
    width: 20px;
    height: 20px;
    border: 3px dashed var(--color-primary-accent);
    border-radius: 50%;
    opacity: 0.3;
}

.spinning {
    animation: tape-spin 4s linear infinite;
}


.tape-label-link {
    display: inline-block;
    background: #e0e0e0; 
    color: #111 !important; 
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.75em;
    padding: 5px 12px;
    text-decoration: none;
    transform: rotate(-1.5deg); 
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
    border-left: 4px solid #cc0000; 
}

.tape-label-link:hover {
    transform: rotate(0deg) scale(1.05);
    background: #ffffff;
    box-shadow: 3px 3px 0px var(--color-primary-accent);
}

.rec-dot {
    color: #cc0000;
    margin-right: 4px;
    animation: blink-red 1s infinite;
}

@keyframes tape-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.deserve-glow {
    color: #ffffff !important;
    text-shadow: 0 0 10px #ffffff, 0 0 20px var(--color-primary-accent);
    animation: text-pulse 2s infinite alternate;
}

@keyframes text-pulse {
    from { opacity: 0.8; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}



.static-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.12; 
    pointer-events: none;
    z-index: 10000;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}


.box {
    filter: saturate(0.8) contrast(1.1);
    position: relative;
    overflow: hidden;
}


body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.8) 150%);
    pointer-events: none;
    z-index: 9999;
}


.box-header {
    text-shadow: 2px 0 0 rgba(255,0,0,0.5), -2px 0 0 rgba(0,255,255,0.5);
    letter-spacing: 3px;
}

/* --- CHANNEL 017 TV SPLASH --- */
#loading-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    display: flex; justify-content: center; align-items: center;
    z-index: 99999;
    overflow: hidden;
}

.tv-tube {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    background: radial-gradient(circle, #1a1a1a 0%, #050505 100%);
    animation: tv-flicker 0.15s infinite;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
}

@keyframes tv-flicker {
    0% { opacity: 0.98; }
    50% { opacity: 1; }
    100% { opacity: 0.99; }
}

.tv-auth-text {
    font-family: 'Ubuntu', sans-serif; 
    color: var(--color-primary-accent);
    text-shadow: 0 0 5px var(--color-primary-accent);
    margin-top: 15px;
    letter-spacing: 2px;
    font-size: 0.8em;
}


#loading-screen.closing .tv-tube {
    transform: scaleY(0.005) scaleX(1.2);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
}

#loading-screen.closing {
    background: #000;
    transition: background 0.5s;
}


.loading-bar {
    width: 200px; height: 2px;
    background: rgba(0, 168, 150, 0.2);
    margin-top: 20px;
    position: relative;
}
.loading-progress {
    width: 0%; height: 100%;
    background: var(--color-primary-accent);
    box-shadow: 0 0 10px var(--color-primary-accent);
    animation: load-progress 2.5s forwards;
}
@keyframes load-progress {
    to { width: 100%; }
}


.static-loading {
    animation: aggressive-shiver 0.1s infinite !important;
    opacity: 0.4 !important; 
}

@keyframes aggressive-shiver {
    0% { transform: translate(0,0) scale(1); filter: brightness(1); }
    25% { transform: translate(-5px, 3px) scale(1.02); filter: brightness(1.5); }
    50% { transform: translate(5px, -2px) scale(0.98); filter: brightness(0.8); }
    75% { transform: translate(-2px, -5px) scale(1.05); filter: brightness(2); }
    100% { transform: translate(0,0) scale(1); }
}

.researcher-hud {
    font-family: 'VT323', monospace;
    text-align: left;
    font-size: 0.7em;
    color: var(--color-primary-accent);
    opacity: 0.7;
    margin-top: 10px;
    line-height: 1.2;
}

.signal-flicker {
    animation: text-flicker 0.5s infinite alternate;
}

@keyframes text-flicker {
    from { opacity: 1; color: #00ffcc; }
    to { opacity: 0.3; color: #ff4d4d; } 
}



#loading-screen {
    position: fixed;
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background: #000;
    display: flex; justify-content: center; align-items: center;
    z-index: 100000; 
    overflow: hidden;
}

.tv-tube {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    background: radial-gradient(circle, #1a1a1a 0%, #050505 100%);
    box-shadow: inset 0 0 100px rgba(0,0,0,1);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}


.researcher-hud {
    font-family: 'Courier New', Courier, monospace; 
    text-align: left;
    font-size: 14px;
    color: #00ffcc; 
    margin-top: 20px;
    line-height: 1.5;
}

.signal-flicker {
    animation: signal-blink 0.5s infinite alternate;
}

@keyframes signal-blink {
    from { opacity: 1; } to { opacity: 0.2; color: red; }
}


#loading-screen.closing .tv-tube {
    transform: scaleY(0.005) scaleX(1.3);
    opacity: 0.5;
    filter: brightness(5);
}

.tv-shut-off {
    position: absolute;
    top: 50%; left: 0;
    width: 100%; height: 0px;
    background: #fff;
    box-shadow: 0 0 20px #fff;
    opacity: 0;
    z-index: 100001;
}

#loading-screen.closing .tv-shut-off {
    height: 2px;
    opacity: 1;
    transition: all 0.2s;
}


.static-overlay, .scanline-overlay {
    pointer-events: none;
}

.researcher-hud p {
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.5); 
    text-transform: uppercase;
    font-size: 0.85em;
    margin: 5px 0;
}


.loading-bar {
    border: 1px solid rgba(0, 255, 204, 0.3);
    padding: 2px;
}

#protocol-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999; 
    background: rgba(0, 0, 0, 0.8);
    color: var(--color-primary-accent);
    border: 1px solid var(--color-primary-accent);
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.7em;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#protocol-toggle:hover {
    background: var(--color-primary-accent);
    color: #000;
    box-shadow: 0 0 15px var(--color-primary-accent);
}


body.alt-layout #protocol-toggle {
    border-color: #ff4d4d; 
    color: #ff4d4d;
}

body.alt-layout #protocol-toggle:hover {
    background: #ff4d4d;
    color: #000;
    box-shadow: 0 0 15px #ff4d4d;
}







body.alt-layout {
    --color-primary-accent: #ffb347; 
}


body.alt-layout .box {
    background: #fdf5e6; /* Old paper color */
    color: #2b2b2b;
    border: 2px solid #2b2b2b;
    box-shadow: 5px 5px 0px #000;
}


body.alt-layout .static-overlay {
    display: none;
}


/*alt layout below */
body.alt-layout {
    background-color: #f4f4f9; 
    background-image: none;    
    color: #2a2a2a;            
    transition: all 0.5s ease;
}


body.alt-layout {
    --color-primary-accent: #7b2cbf; 
    --box-bg: #ffffff;
    --border-style: 2px solid var(--color-primary-accent);
}


body.alt-layout .static-overlay,
body.alt-layout .scanline-overlay,
body.alt-layout .tv-tube::after {
    display: none !important;
}


body.alt-layout .box {
    background: var(--box-bg);
    border: var(--border-style);
    box-shadow: 4px 4px 0px rgba(123, 44, 191, 0.2); /* Soft purple shadow */
    color: #333;
}


body.alt-layout .box-header {
    background: var(--color-primary-accent);
    color: white;
    border-bottom: none;
}


body.alt-layout a {
    color: var(--color-primary-accent);
    font-weight: bold;
    text-decoration: underline wavy rgba(123, 44, 191, 0.3);
}


body.alt-layout .glitch::before,
body.alt-layout .glitch::after {
    display: none;
}

body.alt-layout .glitch {
    animation: none;
    color: var(--color-primary-accent);
}

body.alt-layout #reason-display {
    background: #f0ebf7; 
    border-radius: 4px;
    color: #4a148c;
    padding: 20px;
}


body.alt-layout #protocol-toggle {
    background: var(--color-primary-accent);
    color: white;
    border: 1px solid #5a189a;
}

/* --- HEADER UPDATES --- */
body.alt-layout #site-header {
    background: #ffffff !important;
    border: 2px solid var(--color-primary-accent);
    color: #333 !important;
    box-shadow: 4px 4px 0px var(--color-primary-accent);
}

body.alt-layout #site-header h1 {
    color: var(--color-primary-accent) !important;
    text-shadow: none; 
}

body.alt-layout #site-header p {
    color: #666; 
    font-weight: bold;
}


body.alt-layout .cassette-container {
    background: #f0ebf7 !important; 
    border: 1px solid var(--color-primary-accent);
}

body.alt-layout .cassette-body {
    background: #ffffff !important;
    border: 2px solid #333; 
}

body.alt-layout .reel {
    border: 2px dashed var(--color-primary-accent) !important;
    background: #fdfdfd !important;
}

body.alt-layout .tape-label-link {
    color: var(--color-primary-accent) !important;
    background: #ffffff;
    border: 1px solid var(--color-primary-accent);
}



body.alt-layout #my-clock, 
body.alt-layout #their-clock {
    color: #333 !important;
}


body.alt-layout .info-box h2 {
    color: var(--color-primary-accent) !important;
}


body.alt-layout hr {
    background-color: var(--color-primary-accent) !important;
    border: none;
    height: 2px !important;
}



body.alt-layout, 
body.alt-layout *, 
body.alt-layout .glitch, 
body.alt-layout .glitch::before, 
body.alt-layout .glitch::after {
    text-shadow: none !important;
    box-shadow: none !important; 
}


body.alt-layout .box {
    box-shadow: 4px 4px 0px var(--color-primary-accent) !important;
}




body.alt-layout .content-box button p {
    color: var(--color-primary-accent) !important;
    font-weight: bold;
    opacity: 1 !important;
    text-shadow: none !important;
}


body.alt-layout .content-box button img {
    filter: drop-shadow(2px 2px 0px rgba(123, 44, 191, 0.2));
}


.header-content-line {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.glitch {
    position: relative;
    display: inline-block; 
    text-align: center;
    margin: 0 auto;
}


.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--color-secondary-accent);
    clip: rect(0, 999px, 999px, 0); 
    animation: glitch-anim 5s infinite linear alternate-reverse;
}


.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #5e5e8a; 
    clip: rect(0, 999px, 999px, 0); 
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}


body.alt-layout .header-content-line {
    justify-content: center;
}

body.alt-layout .glitch {
    display: block; 
    width: 100%;
}



body.alt-layout .glitch::before,
body.alt-layout .glitch::after {
    display: none !important;
    content: none !important;
}

body.alt-layout, 
body.alt-layout *, 
body.alt-layout .glitch {
    text-shadow: none !important;
 
    box-shadow: none !important; 
}

body.alt-layout .box {
    box-shadow: 4px 4px 0px var(--color-primary-accent) !important;
}



body.alt-layout::after,
body.alt-layout::before {
    display: none !important;
}


body.alt-layout #site-header::after,
body.alt-layout #site-header::before {
    display: none !important;
}


body.alt-layout .typewriter-quotes {
    background: rgba(123, 44, 191, 0.05) !important; 
    border: 1px solid rgba(123, 44, 191, 0.1);
}


body.alt-layout .typewriter-quotes blockquote {
    color: #2a2a2a !important;
    border-left: 3px solid var(--color-primary-accent); /* Thicker purple line */
    background: transparent !important;
}


body.alt-layout .typewriter-quotes .source {
    color: #5a189a !important;
    font-weight: bold;
    opacity: 1 !important;
}

/* Ensure the "Recovered Fragments" subheader is visible */
body.alt-layout .transmission-sub {
    color: #4a148c !important;
    font-weight: bold;
}

body.alt-layout .quote-item {
    border-left: 4px solid var(--color-primary-accent) !important;
    margin-bottom: 30px;
}



.glitch-text {
    color: var(--color-primary-accent) !important;
    font-family: 'Ubuntu', sans-serif;
    font-weight: bold;
    font-size: 1.5em;
    letter-spacing: 4px;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--color-primary-accent); 
    margin-bottom: 10px;
}


.researcher-hud p {
    color: #00ffcc !important; 
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.5);
}


.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent !important;
    color: var(--color-primary-accent);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1; 
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9; 
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}


body.alt-layout #loading-screen {
    background: #000 !important;
}

body.alt-layout .tv-tube {
    background: radial-gradient(circle, #1a1a1a 0%, #050505 100%) !important;
}

/* --- FIXING 'DESERVE' TEXT FOR LIGHT MODE --- */


body.alt-layout .deserve-glow {
    color: #ffffff !important;           
    background-color: #7b2cbf !important; 
    padding: 5px 15px;
    border-radius: 4px;
    display: inline-block;
    
  
    animation: recover-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    
 
    box-shadow: 4px 4px 0px #2a0a4d !important;
    text-shadow: none !important;
    font-weight: bold;
}

@keyframes recover-pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}


.data-hit {
    animation: screen-shake 0.3s linear;
}

@keyframes screen-shake {
    0% { transform: translate(0,0); }
    25% { transform: translate(5px, 5px); }
    50% { transform: translate(-5px, -5px); }
    75% { transform: translate(5px, -5px); }
    100% { transform: translate(0,0); }
}