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

body {
    background-color: #000;
    color: #00ff00;
    font-family: monospace;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.fullscreen-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(0, 255, 0, 0.7);
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff00;
    z-index: 2000;
    pointer-events: none;
    transition: opacity 2s ease-in-out;
}

#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    opacity: 0.15;
}

.audio-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;
}

.main-terminal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: hidden;
    font-size: 16px; 
    line-height: 1.2;
    padding: 20px 20px 80px 20px;
    z-index: 1;
    font-weight: bold;
    pointer-events: none;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0,255,0,0.8);
}

.glitch {
    animation: glitch-anim 0.2s linear infinite alternate-reverse;
}

@keyframes glitch-anim {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 1px) }
    40% { transform: translate(1px, -2px) }
    60% { transform: translate(-1px, 2px) }
    80% { transform: translate(2px, -1px) }
    100% { transform: translate(0) }
}

#terminalOutput {
    white-space: pre-wrap;
    word-break: break-all;
    display: inline;
}

#cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: #00ff00;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    box-shadow: 0 0 10px #00ff00;
}

@keyframes blink { 50% { opacity: 0; } }

#desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(100vh - 40px);
    pointer-events: none;
    z-index: 10;
}

.panel {
    position: absolute;
    background: rgba(0, 15, 0, 0.85); 
    border: 1px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    display: flex;
    flex-direction: column;
    min-width: 250px;
    min-height: 200px;
    pointer-events: auto;
    transition: box-shadow 0.2s;
    backdrop-filter: blur(5px);
}

.panel:hover {
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.6);
}

.panel.fullscreen {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 40px) !important;
    z-index: 999;
    transition: none;
}

.panel.hidden { display: none; }

.panel-header {
    height: 25px;
    background: rgba(0, 255, 0, 0.2);
    border-bottom: 1px solid #00ff00;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    cursor: grab;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0 0 5px #00ff00;
}

.panel-controls { display: flex; gap: 8px; }
.control-btn { cursor: pointer; font-size: 14px;padding: 2px 4px;   }
.control-btn:hover { color: #fff; text-shadow: 0 0 8px #fff; }

.panel-content { flex-grow: 1; position: relative; padding: 10px; overflow: hidden; }

canvas { width: 100% !important; height: 100% !important; display: block; }

.resizer {
    width: 15px;
    height: 15px;
    background: transparent;
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
}
.resizer::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid #00ff00;
    border-right: 2px solid #00ff00;
}

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 40px;
    background: rgba(0, 20, 0, 0.95);
    border-top: 1px solid #00ff00;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,255,0,0.2);
}

.taskbar-item {
    padding: 5px 15px;
    border: 1px solid #00ff00;
    font-size: 12px;
    cursor: pointer;
    background: rgba(0, 255, 0, 0.1);
    font-weight: bold;
    box-shadow: 0 0 5px rgba(0,255,0,0.3);
}
.taskbar-item:hover { background: #00ff00; color: #000; box-shadow: 0 0 15px #00ff00;}

@media (max-width: 800px) {
    .panel { right: 5vw !important; left: 5vw !important; width: 90vw !important; }
}

/* Sleek Cyberpunk Scrollbar for windowed mode */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #02050a;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.35);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.7);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
}

/* Universal Fullscreen UI & Scrollbar Elimination */
:fullscreen,
:fullscreen body,
:fullscreen html,
:-webkit-full-screen,
:-webkit-full-screen body,
:-webkit-full-screen html,
:-moz-full-screen,
:-moz-full-screen body,
:-moz-full-screen html,
:-ms-fullscreen,
:-ms-fullscreen body,
:-ms-fullscreen html,
body.fullscreen-active,
html.fullscreen-active,
body.fullscreen-active html {
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

:fullscreen::-webkit-scrollbar,
:fullscreen body::-webkit-scrollbar,
:fullscreen html::-webkit-scrollbar,
:fullscreen *::-webkit-scrollbar,
:-webkit-full-screen::-webkit-scrollbar,
:-webkit-full-screen body::-webkit-scrollbar,
:-webkit-full-screen html::-webkit-scrollbar,
:-webkit-full-screen *::-webkit-scrollbar,
:-moz-full-screen::-webkit-scrollbar,
:-moz-full-screen *::-webkit-scrollbar,
:-ms-fullscreen::-webkit-scrollbar,
:-ms-fullscreen *::-webkit-scrollbar,
body.fullscreen-active::-webkit-scrollbar,
body.fullscreen-active body::-webkit-scrollbar,
body.fullscreen-active html::-webkit-scrollbar,
body.fullscreen-active *::-webkit-scrollbar,
html.fullscreen-active::-webkit-scrollbar,
html.fullscreen-active *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

:fullscreen #hkrConsentBanner,
:fullscreen #miniLinks,
:fullscreen #creatorControlsBar,
:fullscreen #siteHeader,
:fullscreen .site-header,
:fullscreen #typerTopBar,
:fullscreen .typer-top-bar,
:fullscreen .typer-guide-section,
:fullscreen .site-footer,
:-webkit-full-screen #miniLinks,
:-webkit-full-screen #creatorControlsBar,
:-webkit-full-screen #siteHeader,
:-webkit-full-screen .site-header,
:-webkit-full-screen #typerTopBar,
:-webkit-full-screen .typer-top-bar,
:-webkit-full-screen .typer-guide-section,
:-webkit-full-screen .site-footer,
:-moz-full-screen #miniLinks,
:-moz-full-screen #creatorControlsBar,
:-moz-full-screen #siteHeader,
:-moz-full-screen .site-header,
:-moz-full-screen #typerTopBar,
:-moz-full-screen .typer-top-bar,
:-moz-full-screen .typer-guide-section,
:-moz-full-screen .site-footer,
:-ms-fullscreen #miniLinks,
:-ms-fullscreen #creatorControlsBar,
:-ms-fullscreen #siteHeader,
:-ms-fullscreen .site-header,
:-ms-fullscreen #typerTopBar,
:-ms-fullscreen .typer-top-bar,
:-ms-fullscreen .typer-guide-section,
:-ms-fullscreen .site-footer,
body.fullscreen-active #hkrConsentBanner,
body.fullscreen-active #miniLinks,
body.fullscreen-active #creatorControlsBar,
body.fullscreen-active #siteHeader,
body.fullscreen-active .site-header,
body.fullscreen-active #typerTopBar,
body.fullscreen-active .typer-top-bar,
body.fullscreen-active .typer-guide-section,
body.fullscreen-active .site-footer,
html.fullscreen-active #miniLinks,
html.fullscreen-active #creatorControlsBar,
html.fullscreen-active #siteHeader,
html.fullscreen-active .site-header,
html.fullscreen-active #typerTopBar,
html.fullscreen-active .typer-top-bar,
html.fullscreen-active .typer-guide-section,
html.fullscreen-active .site-footer {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (display-mode: fullscreen) {
    #hkrConsentBanner,
    #miniLinks,
    #creatorControlsBar,
    #siteHeader,
    .site-header,
    #typerTopBar,
    .typer-top-bar,
    .typer-guide-section,
    .site-footer {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    body, html {
        overflow: hidden !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    ::-webkit-scrollbar,
    *::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}


#minimizedBar {
    position: fixed;
    bottom: 6.5px;
    left: 20px;   /* LEFT CORNER FIX */
    display: flex;
    gap: 10px;
    z-index: 9999;
}

.min-tab {
    pointer-events: auto;
    padding: 6px 12px;
    font-size: 11px;

    border: 1px solid #00ff00;   /* FIXED */
    background: rgba(0, 20, 0, 0.9);
    color: #00ff00;              /* FIXED */

    cursor: pointer;
    transition: 0.2s ease;

    text-shadow: 0 0 5px #00ff00;   /* ADD GLOW */
    box-shadow: 0 0 8px rgba(0,255,0,0.4);
}

.min-tab:hover {
    background: #00ff00;
    color: black;
    box-shadow: 0 0 15px #00ff00;
}

#miniLinks {
    position: fixed;
    bottom: 8px;  /* just below the glowing taskbar line visually */
    right: 15px;
    font-size: 9px;
    color: #00ff88;
    z-index: 9999;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: auto; /* Required so clicks register inside the transparent desktop */
}

#miniLinks a {
    color: #00ff88;
    text-decoration: none;
    transition: opacity 0.2s ease, text-shadow 0.2s ease;
}

#miniLinks a:hover {
    opacity: 1;
    text-shadow: 0 0 5px #00ff88;
}
.ad-panel {
    display: none !important;
}

/* Primary Site Header & Navigation Bar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 44px;
    background: rgba(0, 15, 0, 0.94);
    border-bottom: 1px solid rgba(0, 255, 0, 0.35);
    box-shadow: 0 2px 15px rgba(0, 255, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.header-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #00ff88;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
    flex-shrink: 0;
}

.brand-logo .accent {
    color: #fff;
    text-shadow: 0 0 8px #00ff00;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 0;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: rgba(0, 255, 136, 0.85);
    text-decoration: none;
    font-size: 11px;
    font-family: monospace;
    padding: 5px 8px;
    border-radius: 3px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: #000;
    background: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
    border-color: #00ff88;
    font-weight: bold;
}

.nav-link.highlight {
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(0, 40, 0, 0.7);
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.25);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-label {
    font-size: 12px;
}

.lang-chip {
    color: rgba(0, 255, 136, 0.8);
    text-decoration: none;
    font-size: 10px;
    font-family: monospace;
    padding: 3px 5px;
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 2px;
    background: rgba(0, 25, 0, 0.6);
    transition: all 0.15s ease;
}

.lang-chip:hover, .lang-chip.active {
    background: #00ff00;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 6px #00ff00;
}

/* Creator & Streamer Tools Bar */
#creatorControlsBar {
    position: fixed;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 20, 0, 0.88);
    border: 1px solid #00ff00;
    border-radius: 4px;
    padding: 5px 12px;
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.4);
    font-size: 11px;
    font-family: monospace;
    color: #00ff00;
    pointer-events: auto;
}

.creator-btn {
    background: rgba(0, 40, 0, 0.8);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 4px 8px;
    font-size: 11px;
    font-family: monospace;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
    text-shadow: 0 0 4px #00ff00;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
}

.creator-btn:hover, .creator-btn.active {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 10px #00ff00;
    text-shadow: none;
}

.speed-slider-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.speed-slider-wrap input[type="range"] {
    accent-color: #00ff00;
    cursor: pointer;
    width: 65px;
}

@media (max-width: 800px) {
    .site-header {
        height: auto;
        min-height: 42px;
        padding: 4px 6px;
    }
    .header-inner {
        padding: 0 4px;
        gap: 6px;
    }
    .brand-logo {
        font-size: 12px;
    }
    .nav-links {
        gap: 4px;
    }
    .nav-link {
        font-size: 10.5px;
        padding: 6px 8px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        touch-action: manipulation;
    }
    .lang-chip {
        padding: 4px 6px;
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        touch-action: manipulation;
    }
    #creatorControlsBar {
        top: auto;
        bottom: 46px;
        left: 50%;
        transform: translateX(-50%);
        width: 96vw;
        max-width: 440px;
        justify-content: space-around;
        gap: 4px;
        padding: 4px 6px;
    }
    .creator-btn {
        padding: 6px 8px;
        font-size: 11px;
        min-height: 34px;
        touch-action: manipulation;
    }
    .speed-slider-wrap {
        gap: 4px;
    }
    .speed-slider-wrap input[type="range"] {
        width: 55px;
        height: 24px;
    }
}

/* Chroma Key / Green Screen Display Modes */
body.chroma-active #desktop,
body.chroma-active #miniLinks,
body.chroma-active #minimizedBar,
body.chroma-active .fullscreen-hint,
body.chroma-active .audio-toggle,
body.chroma-active #creatorControlsBar,
body.chroma-active #siteHeader {
    display: none !important;
}

body.chroma-green {
    background-color: #00ff00 !important;
}

body.chroma-blue {
    background-color: #0000ff !important;
}

body.chroma-black {
    background-color: #000000 !important;
}

body.chroma-active #matrixCanvas {
    opacity: 0.9 !important;
}

/* ==========================================================================
   HACKER TYPER DEDICATED STYLES & THEME TOKENS
   ========================================================================== */
:root {
    --theme-bg: #000000;
    --theme-text: #00ff66;
    --theme-accent: #00ff88;
    --theme-glow: rgba(0, 255, 136, 0.4);
    --theme-border: rgba(0, 255, 136, 0.35);
}

body.theme-matrix {
    --theme-bg: #000000;
    --theme-text: #00ff66;
    --theme-accent: #00ff88;
    --theme-glow: rgba(0, 255, 136, 0.4);
    --theme-border: rgba(0, 255, 136, 0.35);
}

body.theme-amber {
    --theme-bg: #120a00;
    --theme-text: #ffb000;
    --theme-accent: #ffcc00;
    --theme-glow: rgba(255, 176, 0, 0.4);
    --theme-border: rgba(255, 176, 0, 0.35);
}

body.theme-cyberpunk {
    --theme-bg: #0d0221;
    --theme-text: #ff007f;
    --theme-accent: #00f0ff;
    --theme-glow: rgba(255, 0, 127, 0.4);
    --theme-border: rgba(0, 240, 255, 0.35);
}

body.theme-ice {
    --theme-bg: #030f1c;
    --theme-text: #00e5ff;
    --theme-accent: #70ffff;
    --theme-glow: rgba(0, 229, 255, 0.4);
    --theme-border: rgba(0, 229, 255, 0.35);
}

body.theme-ubuntu {
    --theme-bg: #300a24;
    --theme-text: #ffffff;
    --theme-accent: #e95420;
    --theme-glow: rgba(233, 84, 32, 0.4);
    --theme-border: rgba(233, 84, 32, 0.35);
}

body.theme-cmd {
    --theme-bg: #0c0c0c;
    --theme-text: #cccccc;
    --theme-accent: #ffffff;
    --theme-glow: rgba(200, 200, 200, 0.2);
    --theme-border: rgba(180, 180, 180, 0.3);
}

body.theme-light {
    --theme-bg: #f8f9fa;
    --theme-text: #1a1a1a;
    --theme-accent: #0066cc;
    --theme-glow: rgba(0, 102, 204, 0.2);
    --theme-border: rgba(0, 102, 204, 0.35);
}

/* CRT Scanlines and Cathode Flicker */
body.crt-active::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 999;
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
    opacity: 0.85;
}

/* Hacker Typer Page & Scroll Overrides */
body.typer-page {
    overflow-y: auto !important;
    height: auto !important;
    background-color: var(--theme-bg);
}

:fullscreen body.typer-page,
:-webkit-full-screen body.typer-page,
:-moz-full-screen body.typer-page,
:-ms-fullscreen body.typer-page,
body.fullscreen-active.typer-page,
html.fullscreen-active body.typer-page {
    overflow: hidden !important;
    height: 100vh !important;
    max-height: 100vh !important;
}

.typer-hero-wrap {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: var(--theme-bg);
    color: var(--theme-text);
    overflow: hidden;
}

:fullscreen .typer-hero-wrap,
:-webkit-full-screen .typer-hero-wrap,
:-moz-full-screen .typer-hero-wrap,
:-ms-fullscreen .typer-hero-wrap,
body.fullscreen-active .typer-hero-wrap,
html.fullscreen-active .typer-hero-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 10 !important;
}

#typerMatrixCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.18;
    pointer-events: none;
}

.typer-top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 40px;
    background: rgba(10, 15, 25, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--theme-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.typer-top-bar.hidden {
    transform: translateY(-100%);
}

.typer-top-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.typer-brand {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typer-brand .accent {
    color: var(--theme-accent);
}

.typer-status-chip {
    font-size: 10px;
    color: var(--theme-accent);
    background: rgba(0, 255, 136, 0.12);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--theme-border);
    font-family: monospace;
}

.typer-top-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.typer-select {
    background: rgba(0, 0, 0, 0.6);
    color: var(--theme-accent);
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 11px;
    font-family: monospace;
    cursor: pointer;
}

.typer-select:focus {
    outline: none;
    border-color: var(--theme-accent);
}

.typer-btn {
    background: rgba(0, 255, 136, 0.08);
    color: var(--theme-accent);
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-family: monospace;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.typer-btn:hover, .typer-btn.active {
    background: var(--theme-accent);
    color: #000;
    box-shadow: 0 0 8px var(--theme-glow);
}

/* Dedicated Typer Terminal Output */
.typer-terminal-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    padding: 50px 24px 40px 24px;
    overflow-y: auto;
    scroll-behavior: smooth;
    z-index: 2;
    cursor: text;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.typer-terminal-container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

:fullscreen .typer-terminal-container,
:-webkit-full-screen .typer-terminal-container,
:-moz-full-screen .typer-terminal-container,
:-ms-fullscreen .typer-terminal-container,
body.fullscreen-active .typer-terminal-container,
html.fullscreen-active .typer-terminal-container {
    padding-top: 24px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.typer-output-pre {
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.45;
    text-shadow: 0 0 4px var(--theme-glow);
    display: inline;
}

.typer-cursor {
    display: inline-block;
    width: 9px;
    height: 16px;
    background: var(--theme-accent);
    vertical-align: middle;
    margin-left: 2px;
    animation: typer-blink 1s step-end infinite;
    box-shadow: 0 0 8px var(--theme-accent);
}

@keyframes typer-blink {
    50% { opacity: 0; }
}

/* Draggable Windows */
.draggable-window {
    position: fixed;
    width: 320px;
    background: rgba(10, 16, 26, 0.95);
    border: 1px solid var(--theme-accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px var(--theme-glow);
    border-radius: 4px;
    color: var(--theme-text);
    font-family: monospace;
    overflow: hidden;
}

.window-header {
    background: rgba(0, 255, 136, 0.15);
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    border-bottom: 1px solid var(--theme-border);
}

.window-title {
    font-size: 11px;
    font-weight: bold;
    color: var(--theme-accent);
}

.window-controls {
    display: flex;
    gap: 6px;
}

.win-btn {
    background: transparent;
    color: var(--theme-accent);
    border: 1px solid var(--theme-border);
    border-radius: 2px;
    padding: 0 5px;
    font-size: 10px;
    cursor: pointer;
}

.win-btn:hover {
    background: var(--theme-accent);
    color: #000;
}

.window-body {
    padding: 12px;
    font-size: 11px;
    max-height: 260px;
    overflow-y: auto;
}

/* Alert Boxes Inside Windows */
.alert-box {
    text-align: center;
    padding: 12px;
}

.alert-box.denied h1 {
    color: #ff0055;
    font-size: 18px;
    margin-bottom: 6px;
    text-shadow: 0 0 10px rgba(255, 0, 85, 0.6);
}

.alert-box.granted h1 {
    color: #00ff88;
    font-size: 18px;
    margin-bottom: 6px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

/* Fullscreen Overlay Banner */
.typer-overlay-banner {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    cursor: pointer;
}

.typer-overlay-banner.active {
    display: flex;
    animation: banner-zoom 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes banner-zoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.banner-box {
    border-width: 4px;
    border-style: solid;
    padding: 30px 50px;
    text-align: center;
    background: rgba(5, 10, 18, 0.96);
    border-radius: 8px;
    max-width: 90vw;
}

.typer-overlay-banner.granted .banner-box {
    border-color: #00ff88;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.6);
}

.typer-overlay-banner.denied .banner-box {
    border-color: #ff0055;
    box-shadow: 0 0 40px rgba(255, 0, 85, 0.6);
}

.banner-icon {
    font-size: 42px;
    margin-bottom: 8px;
}

.typer-overlay-banner.granted .banner-icon { color: #00ff88; }
.typer-overlay-banner.denied .banner-icon { color: #ff0055; }

.banner-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.typer-overlay-banner.granted .banner-title { color: #00ff88; text-shadow: 0 0 20px #00ff88; }
.typer-overlay-banner.denied .banner-title { color: #ff0055; text-shadow: 0 0 20px #ff0055; }

.banner-sub {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.banner-dismiss {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

/* Shift Overlays */
.shift-overlay-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1500;
}

.shift-card {
    background: rgba(8, 14, 24, 0.96);
    border: 1px solid var(--theme-accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px var(--theme-glow);
    border-radius: 6px;
    width: 380px;
    max-width: 92vw;
    color: var(--theme-text);
}

.shift-card.danger {
    border-color: #ff0055;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 0, 85, 0.4);
}

.shift-card-header {
    background: rgba(0, 255, 136, 0.12);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--theme-border);
    font-size: 12px;
    font-weight: bold;
}

.shift-card.danger .shift-card-header {
    background: rgba(255, 0, 85, 0.15);
    color: #ff0055;
}

.shift-card-close {
    background: transparent;
    color: inherit;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

.shift-card-body {
    padding: 16px;
    font-size: 11px;
    line-height: 1.5;
}

.progress-bar-wrap {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--theme-accent);
    box-shadow: 0 0 8px var(--theme-accent);
}

.shift-muted {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}

.shift-disclaimer {
    font-size: 9px;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid var(--theme-border);
    padding: 4px;
    border-radius: 3px;
    margin-top: 8px;
}

.rec-indicator {
    color: #ff0055;
    font-weight: bold;
    margin-bottom: 8px;
}

.rec-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: #ff0055;
    border-radius: 50%;
    margin-right: 4px;
    animation: blink 0.8s infinite;
}

/* Settings Drawer */
.typer-settings-drawer {
    position: fixed;
    top: 0; right: -360px;
    width: 340px; height: 100vh;
    background: rgba(8, 12, 20, 0.98);
    border-left: 1px solid var(--theme-border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 2100;
    padding: 20px;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: monospace;
    color: #fff;
}

.typer-settings-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--theme-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.drawer-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--theme-accent);
}

.drawer-close {
    background: transparent;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    padding: 2px 8px;
    cursor: pointer;
}

.setting-group {
    margin-bottom: 16px;
}

.setting-label {
    display: block;
    font-size: 11px;
    color: var(--theme-accent);
    margin-bottom: 6px;
}

.setting-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--theme-border);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.setting-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
}

/* Embed Modal & Toast */
.embed-modal-wrap {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2200;
}

.embed-modal-card {
    background: #090e18;
    border: 1px solid var(--theme-accent);
    box-shadow: 0 0 30px var(--theme-glow);
    border-radius: 6px;
    width: 500px;
    max-width: 92vw;
    color: #fff;
    padding: 16px;
}

.embed-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--theme-border);
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: bold;
    color: var(--theme-accent);
}

.embed-modal-close {
    background: transparent;
    color: #ccc;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.embed-code-box {
    width: 100%;
    height: 110px;
    background: #000;
    color: #00ff88;
    border: 1px solid var(--theme-border);
    padding: 8px;
    font-family: monospace;
    font-size: 11px;
    border-radius: 4px;
    margin: 12px 0;
    resize: none;
}

.embed-btn-row {
    display: flex;
    gap: 10px;
}

.typer-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: rgba(10, 20, 30, 0.95);
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent);
    padding: 8px 18px;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    font-size: 12px;
    font-family: monospace;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3000;
    pointer-events: none;
}

.typer-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Below the Fold SEO Guide Section */
.typer-guide-section {
    position: relative;
    background: #060911;
    color: #c9d1d9;
    padding: 60px 24px;
    border-top: 1px solid rgba(0, 255, 136, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    z-index: 5;
}

.typer-guide-container {
    max-width: 1000px;
    margin: 0 auto;
}

.typer-guide-section h1 {
    font-size: 26px;
    color: #00ff88;
    margin-bottom: 16px;
    font-family: monospace;
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
    padding-bottom: 8px;
}

.typer-guide-section h2 {
    font-size: 20px;
    color: #fff;
    margin-top: 32px;
    margin-bottom: 12px;
    font-family: monospace;
}

.typer-guide-section p {
    font-size: 14px;
    margin-bottom: 14px;
    color: #8b949e;
}

.cheat-code-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 13px;
    font-family: monospace;
}

.cheat-code-table th {
    background: rgba(0, 255, 136, 0.12);
    color: #00ff88;
    padding: 10px;
    border: 1px solid rgba(0, 255, 136, 0.25);
    text-align: left;
}

.cheat-code-table td {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 16, 26, 0.6);
}

.cheat-code-table kbd {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.4);
    padding: 2px 6px;
    border-radius: 3px;
}

.faq-card {
    background: rgba(10, 16, 26, 0.8);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 14px;
}

.faq-question {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 6px;
    font-family: monospace;
}

.faq-answer {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.5;
}

/* Embed Powered-by Watermark */
.embed-powered-by {
    position: fixed;
    bottom: 8px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--theme-accent, #00ff88);
    border: 1px solid var(--theme-border, rgba(0, 255, 136, 0.3));
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 10px;
    font-family: monospace;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.embed-powered-by:hover {
    background: var(--theme-accent, #00ff88);
    color: #000;
    box-shadow: 0 0 8px var(--theme-glow, rgba(0, 255, 136, 0.5));
}

/* ==========================================================================
   CYBER ATTACK THREAT MAP STYLES & HUD
   ========================================================================== */
.threat-map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #050a14;
    overflow: hidden;
    font-family: monospace;
}

.threat-map-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

.threat-hud {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 5;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hud-top-bar {
    pointer-events: auto;
    background: rgba(8, 14, 24, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 255, 136, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    font-size: 11px;
}

.hud-left, .hud-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hud-badge-sim {
    background: rgba(255, 0, 85, 0.2);
    color: #ff0055;
    border: 1px solid rgba(255, 0, 85, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 0 8px rgba(255, 0, 85, 0.3);
}

.hud-stat-item {
    color: #c9d1d9;
}

.hud-stat-item b {
    color: #00ff88;
}

.hud-btn {
    background: rgba(0, 255, 136, 0.08);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    font-family: monospace;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-btn:hover, .hud-btn.active {
    background: #00ff88;
    color: #000;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.hud-intensity-group {
    display: inline-flex;
    gap: 2px;
}

.hud-body-grid {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    pointer-events: none;
    flex: 1;
}

.hud-side-panel {
    pointer-events: auto;
    width: 240px;
    background: rgba(8, 14, 24, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    font-size: 10px;
}

.hud-panel-title {
    font-size: 10px;
    font-weight: bold;
    color: #00ff88;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    padding-bottom: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.hud-country-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
    cursor: pointer;
    transition: background 0.15s ease;
}

.hud-country-row:hover, .hud-country-row.selected {
    background: rgba(0, 255, 136, 0.15);
}

.hud-c-name {
    width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}

.hud-c-bar-wrap {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 6px;
    border-radius: 2px;
    overflow: hidden;
}

.hud-c-bar.target {
    height: 100%;
    background: #ff0055;
}

.hud-c-bar.source {
    height: 100%;
    background: #00f0ff;
}

.hud-c-count {
    color: #aaa;
    width: 25px;
    text-align: right;
}

.hud-log-stream {
    height: 120px;
    overflow-y: auto;
    font-size: 9.5px;
    line-height: 1.4;
    color: #8b949e;
}

.hud-log-line {
    border-bottom: 1px dotted rgba(255, 255, 255, 0.05);
    padding: 2px 0;
}

.hud-legend-bar {
    pointer-events: auto;
    background: rgba(8, 14, 24, 0.88);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 6px 14px;
}

.hud-legend-chip {
    background: rgba(0, 0, 0, 0.6);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 10px;
    font-family: monospace;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.hud-legend-chip.active {
    color: #fff;
    border-color: var(--chip-color);
    box-shadow: 0 0 6px var(--chip-color);
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.country-trend-modal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    z-index: 20;
}

.trend-card {
    background: rgba(6, 12, 22, 0.96);
    border: 1px solid #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
    border-radius: 6px;
    width: 320px;
    color: #fff;
}

.trend-header {
    background: rgba(0, 255, 136, 0.15);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
    font-size: 11px;
    font-weight: bold;
}

.trend-close {
    background: transparent;
    color: #aaa;
    border: none;
    font-size: 12px;
    cursor: pointer;
}

.trend-body {
    padding: 12px;
    font-size: 11px;
    line-height: 1.5;
}

/* Compact Mode Overrides (Homepage / Mini Panels) */
.threat-map-compact .hud-side-panel {
    display: none !important;
}

.threat-map-compact .hud-top-bar {
    padding: 4px 8px;
    font-size: 10px;
}

.threat-map-compact .hud-btn {
    padding: 2px 5px;
    font-size: 9.5px;
}

.threat-map-compact .hud-intensity-group,
.threat-map-compact #hudFsBtn,
.threat-map-compact #hudTerminatorBtn {
    display: none !important;
}

.threat-map-compact .hud-legend-bar {
    padding: 3px 6px;
    gap: 4px;
}

.threat-map-compact .hud-legend-chip {
    padding: 1px 4px;
    font-size: 8.5px;
}

.threat-map-wrapper {
    container-type: inline-size;
}

@container (max-width: 720px) {
    .hud-side-panel {
        display: none !important;
    }
    .hud-intensity-group {
        display: none !important;
    }
}

@media (max-width: 800px) {
    .hud-side-panel {
        display: none !important;
    }
    .hud-intensity-group {
        display: none !important;
    }
}





/* =========================================================
   PHASE 2: DEDICATED HERO TOOLS & EDITORIAL STYLING
   ========================================================= */

.editorial-container {
    background: #05080c;
    color: #c9d1d9;
    padding: 60px 20px;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative;
    z-index: 100;
}
.content-article {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 15px;
}
.article-header { margin-bottom: 40px; }
.article-badge {
    display: inline-block;
    background: rgba(0, 229, 255, 0.12);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.35);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    font-weight: 600;
    margin-bottom: 12px;
}
.content-article h1 { font-size: 28px; color: #ffffff; margin-bottom: 16px; line-height: 1.3; }
.content-article h2 {
    font-size: 20px;
    color: #00ff88;
    margin-top: 36px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.15);
    padding-bottom: 6px;
}
.content-article p { margin-bottom: 18px; color: #a0aec0; }
.lead-text { font-size: 17px; color: #e2e8f0; line-height: 1.6; }
.content-article ul, .content-article ol { margin: 14px 0 24px 24px; color: #a0aec0; }
.content-article li { margin-bottom: 8px; }
.content-article code {
    background: rgba(255, 255, 255, 0.08);
    color: #00ff88;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
}
.specs-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.specs-table th {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    padding: 10px 14px;
    text-align: left;
    border: 1px solid rgba(0, 255, 136, 0.2);
}
.specs-table td { padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.08); color: #cbd5e0; }
.table-wrapper { overflow-x: auto; margin-bottom: 24px; }
.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 14px;
}
.faq-question { font-size: 16px; color: #ffffff; margin-bottom: 8px; }
.faq-answer { color: #94a3b8; margin-bottom: 0; }

.floating-controls-bar, .prank-action-bar, .cyber-action-bar, .youtube-action-bar, .unblocked-status-bar {
    position: fixed;
    top: 52px;
    left: 0;
    width: 100%;
    background: rgba(10, 15, 24, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    z-index: 1000;
    font-family: monospace;
    font-size: 12px;
}
.floating-controls-bar.autohide { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.control-group, .prank-bar-group, .cyber-bar-group, .yt-bar-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.control-select, .yt-select {
    background: #0d1117;
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
}
.control-btn, .prank-trigger-btn, .prank-opt-btn, .cyber-quick-cmd, .cyber-opt-btn, .yt-opt-btn, .unblocked-btn {
    background: rgba(0, 255, 136, 0.08);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: monospace;
    font-size: 11px;
    transition: all 0.2s ease;
}
.control-btn:hover, .prank-trigger-btn:hover, .cyber-quick-cmd:hover, .yt-opt-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}
.accent-btn { background: #00ff88 !important; color: #000000 !important; font-weight: bold; }

/* Dedicated Matrix Terminal Page Overrides */
body.matrix-page {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
    background-color: #000;
}

body.fullscreen-active.matrix-page,
:fullscreen body.matrix-page,
html.fullscreen-active body.matrix-page {
    overflow: hidden !important;
    height: 100vh !important;
}

.matrix-canvas-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

.matrix-canvas-wrapper #matrixCanvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    opacity: 1 !important;
    display: block !important;
    pointer-events: auto !important;
}

:fullscreen .floating-controls-bar,
body.fullscreen-active .floating-controls-bar,
html.fullscreen-active .floating-controls-bar {
    top: 0 !important;
}

.prank-viewport-container { padding: 100px 20px 40px; min-height: calc(100vh - 50px); background: #04080e; display: flex; flex-direction: column; position: relative; }
.prank-terminal-window { background: #060b12; border: 1px solid rgba(0, 255, 136, 0.3); border-radius: 6px; box-shadow: 0 0 30px rgba(0,0,0,0.8); display: flex; flex-direction: column; height: 75vh; overflow: hidden; font-family: "Courier New", monospace; }
.prank-terminal-header { background: #0d1520; padding: 8px 14px; display: flex; align-items: center; border-bottom: 1px solid rgba(0, 255, 136, 0.2); }
.prank-window-dots { display: flex; gap: 6px; margin-right: 14px; }
.prank-window-dots .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; } .dot.yellow { background: #ffbd2e; } .dot.green { background: #27c93f; }
.prank-window-title { color: #8b949e; font-size: 11px; flex: 1; }
.prank-watermark-tag { font-size: 10px; color: #00e5ff; background: rgba(0, 229, 255, 0.1); padding: 2px 8px; border-radius: 3px; border: 1px solid rgba(0, 229, 255, 0.3); }
.prank-output-content { flex: 1; padding: 14px; overflow-y: auto; font-size: 12px; line-height: 1.6; }
.prank-line { color: #a0aec0; }
.prank-line.warn { color: #ff5f56; font-weight: bold; }
.prank-line.success { color: #00ff88; font-weight: bold; }
.prank-line.info { color: #00e5ff; }
.prank-line .timestamp { color: #4a5568; margin-right: 6px; }
.prank-cursor-line { padding: 10px 14px; background: #090f17; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; align-items: center; gap: 6px; font-size: 12px; }
.prank-prompt { color: #00ff88; font-weight: bold; }
.prank-blinking-cursor { color: #00ff88; animation: blink 1s infinite; }
.prank-hint-text { color: #718096; font-size: 11px; }

.prank-overlays-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2500; }
.prank-modal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: auto; background: rgba(10, 15, 22, 0.96); border: 2px solid #00ff88; box-shadow: 0 0 50px rgba(0, 255, 136, 0.4); border-radius: 8px; padding: 28px 36px; text-align: center; min-width: 380px; font-family: monospace; }
.modal-denied { border-color: #ff1744; box-shadow: 0 0 50px rgba(255, 23, 68, 0.5); }
.modal-breach { border-color: #ff9100; box-shadow: 0 0 50px rgba(255, 145, 0, 0.5); }
.modal-header h2 { font-size: 24px; margin: 8px 0; }
.modal-granted h2 { color: #00ff88; } .modal-denied h2 { color: #ff1744; } .modal-breach h2 { color: #ff9100; }
.modal-close-btn { margin-top: 18px; background: #161b22; color: #e2e8f0; border: 1px solid rgba(255, 255, 255, 0.2); padding: 8px 18px; border-radius: 4px; cursor: pointer; font-family: monospace; }

.cyber-hud-container { padding: 100px 20px 40px; min-height: calc(100vh - 50px); background: #06020c; }
.cyber-hud-grid { display: grid; grid-template-columns: 320px 1fr 280px; gap: 16px; height: 75vh; }
@media (max-width: 900px) { .cyber-hud-grid { grid-template-columns: 1fr; height: auto; } }
.cyber-panel { background: #0a0414; border: 1px solid rgba(255, 0, 85, 0.35); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; position: relative; box-shadow: 0 0 20px rgba(255, 0, 85, 0.1); }
.cyber-panel.console-panel { border-color: rgba(0, 240, 255, 0.4); box-shadow: 0 0 20px rgba(0, 240, 255, 0.1); }
.panel-tag { background: #120524; color: #ff0055; padding: 6px 10px; font-family: monospace; font-size: 10px; letter-spacing: 1px; border-bottom: 1px solid rgba(255, 0, 85, 0.2); }
.console-panel .panel-tag { color: #00f0ff; border-color: rgba(0, 240, 255, 0.2); }
.cyber-canvas { width: 100%; flex: 1; display: block; }
.cyber-output { flex: 1; padding: 12px; overflow-y: auto; font-family: "Courier New", monospace; font-size: 12px; line-height: 1.5; }
.cyber-line.accent { color: #00f0ff; font-weight: bold; } .cyber-line.warn { color: #ff0055; } .cyber-line.info { color: #8a2be2; } .cyber-line.normal { color: #c0c0c0; }
.cyber-input-wrap { padding: 8px 12px; background: #0f061c; border-top: 1px solid rgba(0, 240, 255, 0.2); display: flex; align-items: center; gap: 8px; }
.cyber-prompt { color: #ff0055; font-family: monospace; font-size: 11px; font-weight: bold; }
.cyber-cmd-input { flex: 1; background: transparent; border: none; color: #00f0ff; font-family: monospace; font-size: 12px; outline: none; }

.yt-stage-outer { padding: 100px 20px 40px; min-height: calc(100vh - 50px); background: #02060c; display: flex; justify-content: center; align-items: center; }
.yt-stage-wrapper { position: relative; border: 1px solid rgba(0, 229, 255, 0.3); box-shadow: 0 0 40px rgba(0, 0, 0, 0.9); border-radius: 6px; overflow: hidden; background: #000; }
.yt-stage-wrapper.aspect-16-9 { width: min(90vw, 1100px); aspect-ratio: 16 / 9; }
.yt-stage-wrapper.aspect-9-16 { width: min(70vw, 450px); aspect-ratio: 9 / 16; }
.yt-stage-wrapper.aspect-21-9 { width: min(94vw, 1200px); aspect-ratio: 21 / 9; }
.yt-stage-wrapper.aspect-full { width: 95vw; height: 75vh; }
#ytStageCanvas { width: 100%; height: 100%; display: block; }
.yt-stage-hud-overlay { position: absolute; top: 0; left: 0; width: 100%; padding: 12px 18px; pointer-events: none; font-family: monospace; }
.hud-top-bar { display: flex; justify-content: space-between; align-items: center; color: #00e5ff; font-size: 12px; }
.rec-badge { background: rgba(255, 23, 68, 0.2); color: #ff1744; border: 1px solid #ff1744; padding: 3px 8px; border-radius: 3px; font-size: 10px; display: flex; align-items: center; gap: 6px; }
.rec-dot { width: 6px; height: 6px; background: #ff1744; border-radius: 50%; animation: blink 1s infinite; }
.clean-studio-mode #siteHeader, .clean-studio-mode #ytActionBar, .clean-studio-mode .editorial-container, .clean-studio-mode #siteFooter { display: none !important; }
.clean-studio-mode .yt-stage-outer { padding: 0; height: 100vh; }

.unblocked-viewport-container { padding: 100px 20px 40px; min-height: calc(100vh - 50px); background: #020408; display: flex; justify-content: center; }
.unblocked-terminal-box { width: min(94vw, 1000px); height: 75vh; background: #05080e; border: 1px solid rgba(0, 255, 136, 0.25); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; font-family: "Courier New", monospace; }
.unblocked-box-header { background: #0a101a; padding: 8px 14px; border-bottom: 1px solid rgba(0, 255, 136, 0.2); display: flex; justify-content: space-between; color: #8b949e; font-size: 11px; }
.unblocked-prompt-badge { color: #00ff88; font-weight: bold; }
.unblocked-output { flex: 1; padding: 14px; overflow-y: auto; font-size: 13px; line-height: 1.6; }
.unblocked-line { color: #a0aec0; }
.unblocked-line.accent { color: #00ff88; font-weight: bold; }
.unblocked-line.info { color: #00e5ff; }
.unblocked-line.warn { color: #ffbd2e; }
.unblocked-line.prompt { color: #ffffff; }
.unblocked-input-line { padding: 10px 14px; background: #080d15; border-top: 1px solid rgba(255, 255, 255, 0.06); display: flex; align-items: center; gap: 8px; }
.unblocked-cmd-input { flex: 1; background: transparent; border: none; color: #00ff88; font-family: monospace; font-size: 13px; outline: none; }
.unblocked-metrics { display: flex; gap: 8px; }
.metric-pill { background: rgba(255, 255, 255, 0.05); padding: 2px 8px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, 0.1); color: #e2e8f0; }
.metric-pill.safe { background: rgba(0, 255, 136, 0.1); color: #00ff88; border-color: rgba(0, 255, 136, 0.3); }

/* ==========================================================================
   UNIFIED SITE FOOTER STYLES
   ========================================================================== */
.site-footer {
    position: relative;
    z-index: 10;
    background: #030712;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    padding: 32px 20px;
    color: #94a3b8;
    font-family: monospace;
    font-size: 11.5px;
    line-height: 1.8;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav, .footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-group-title {
    color: #f8fafc;
    font-weight: bold;
    margin-right: 4px;
}

.footer-nav a, .footer-legal a {
    color: #00ff88;
    text-decoration: none;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

.footer-nav a:hover, .footer-legal a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px #00ff88;
}

.footer-notice {
    margin-top: 16px;
    color: #64748b;
    font-size: 10.5px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   SITUATION ROOM WORLD DISPLAY HUD ENHANCEMENTS
   ========================================================================== */
.threat-stage-wrap {
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .threat-stage-wrap {
        transform: none !important;
        transition: none !important;
    }
}

.hud-zulu {
    color: #00e5ff;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 2px;
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

.hud-side-panel {
    position: relative;
    border: 1px solid rgba(0, 229, 255, 0.28) !important;
    background: rgba(4, 12, 24, 0.86) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 229, 255, 0.08) !important;
}

.hud-corner-bracket {
    position: absolute;
    width: 6px;
    height: 6px;
    pointer-events: none;
}

.hud-corner-bracket.tl {
    top: -1px; left: -1px;
    border-top: 2px solid #00e5ff;
    border-left: 2px solid #00e5ff;
}

.hud-corner-bracket.tr {
    top: -1px; right: -1px;
    border-top: 2px solid #00e5ff;
    border-right: 2px solid #00e5ff;
}

.hud-panel-title {
    color: #00e5ff !important;
    font-family: monospace;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
    letter-spacing: 0.8px;
}

@media (max-width: 800px) {
    .hud-body-grid {
        display: none !important; /* On mobile screens hide side telemetry panels so the interactive world map is full width */
    }
    .hud-top-bar {
        flex-wrap: wrap;
        gap: 6px;
        padding: 4px 8px;
    }
    .hud-left, .hud-right {
        gap: 5px;
    }
    .hud-btn {
        padding: 4px 6px;
        font-size: 10px;
    }
}


/* ==========================================================================
   HOMEPAGE DESKTOP & FOOTER LAYOUT (ELIMINATE TOOLBAR/FOOTER OVERLAP)
   ========================================================================== */
body.home-page {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
    background-color: #000;
}

body.fullscreen-active.home-page,
:fullscreen body.home-page,
html.fullscreen-active body.home-page {
    overflow: hidden !important;
    height: 100vh !important;
}

body.home-page #desktop {
    position: relative !important;
    width: 100vw;
    height: calc(100vh - 44px);
    min-height: 640px;
    margin-top: 44px;
    overflow: hidden;
    pointer-events: none;
}

body.home-page #creatorControlsBar {
    position: absolute !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999 !important;
}

body.home-page .taskbar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 998 !important;
}

body.home-page #minimizedBar {
    position: absolute !important;
    bottom: 40px !important;
    left: 0 !important;
    z-index: 998 !important;
}

body.home-page .site-footer {
    position: relative !important;
    z-index: 20 !important;
    margin-top: 0 !important;
    clear: both !important;
}

:fullscreen body.home-page #creatorControlsBar,
:fullscreen body.home-page .taskbar,
:fullscreen body.home-page .site-footer,
body.fullscreen-active.home-page #creatorControlsBar,
body.fullscreen-active.home-page .taskbar,
body.fullscreen-active.home-page .site-footer {
    display: none !important;
}
