/* ==========================================================================
   DISCONNECTED: A DAY WITHOUT THE INTERNET
   CSS Design System & Navbar Styles
   Theme: Glitch & Clean
   ========================================================================== */

/* --- Custom Properties --- */
:root {
    /* Color Palette */
    --color-bg: #0a0a0c;
    --color-bg-alt: #121216;
    --color-text: #f3f3f6;
    --color-text-muted: #8a8a98;

    /* Accents */
    --color-accent-red: #ff003c;
    --color-accent-cyan: #00f0ff;
    --color-accent-magenta: #ff00c1;
    --color-accent-green: #00ff66;

    /* Grid & Layout */
    --navbar-height: 80px;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(0, 240, 255, 0.2);

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base & Resets --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-cyan);
}

/* Text Selection */
::selection {
    background: var(--color-accent-magenta);
    color: #fff;
}

/* --- Utilities --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
}

/* --- Header & Navbar Layout --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background-color: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    transition: border-color var(--transition-smooth);
}

.site-header:hover {
    border-bottom-color: var(--border-color-glow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

/* Logo & Brand */
.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--color-text);
    text-decoration: none;
    position: relative;
    text-transform: uppercase;
}

/* Glitch Effect on Brand Logo */
.nav-logo::before,
.nav-logo::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

.nav-logo::before {
    left: 2px;
    text-shadow: -1px 0 var(--color-accent-cyan);
    clip: rect(44px, 450px, 56px, 0);
    animation: logo-glitch-1 5s infinite linear alternate-reverse;
}

.nav-logo::after {
    left: -2px;
    text-shadow: -1px 0 var(--color-accent-magenta), 0 1px var(--color-accent-cyan);
    clip: rect(85px, 450px, 140px, 0);
    animation: logo-glitch-2 5s infinite linear alternate-reverse;
}

/* Logo Hover Glitch Accentuation */
.nav-logo:hover::before {
    animation: logo-glitch-1 1s infinite linear alternate-reverse;
}

.nav-logo:hover::after {
    animation: logo-glitch-2 1s infinite linear alternate-reverse;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 8px 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-num {
    font-size: 0.75rem;
    color: var(--color-accent-cyan);
    margin-right: 4px;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

/* Hover States for Navigation Links */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent-cyan);
    transition: width var(--transition-smooth);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link:hover .nav-num {
    opacity: 1;
    color: var(--color-accent-magenta);
}

.nav-link:hover::after {
    width: 100%;
}

/* Status Indicator */
.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: rgba(255, 0, 60, 0.05);
    border: 1px solid rgba(255, 0, 60, 0.15);
    border-radius: 2px;
    user-select: none;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-accent-red);
    box-shadow: 0 0 8px var(--color-accent-red);
    animation: status-pulse 2s infinite ease-in-out;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-accent-red);
}

/* Hamburger / Toggle Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
    outline: none;
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

/* Mobile Active States toggle */
.nav-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--color-accent-magenta);
}

.nav-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--color-accent-magenta);
}

/* --- Hero Section & Video Background --- */
.main-content {
    margin-top: var(--navbar-height);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.hero-section {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark radial gradient that dims the video to keep clean text legible, with screen edges darker */
    background: radial-gradient(circle, rgba(10, 10, 12, 0.4) 0%, rgba(10, 10, 12, 0.85) 100%);
    /* An extra linear dark layer to fade the video out towards the bottom */
    background-image:
        radial-gradient(circle at center, rgba(10, 10, 12, 0.3) 0%, rgba(10, 10, 12, 0.9) 100%),
        linear-gradient(to bottom, rgba(10, 10, 12, 0.2), rgba(10, 10, 12, 0.95));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 40px;
}

.hero-title {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 24px;
    text-transform: uppercase;
    position: relative;
    color: var(--color-text);
}

.hero-subtitle {
    font-family: var(--font-mono);
    color: var(--color-accent-cyan);
    font-size: clamp(0.95rem, 1.8vw, 1.25rem);
    letter-spacing: 0.08em;
    font-weight: 400;
}

/* --- Animations --- */

/* Glitch Keyframes 1 */
@keyframes logo-glitch-1 {
    0% {
        clip: rect(15px, 9999px, 66px, 0);
    }

    5% {
        clip: rect(40px, 9999px, 85px, 0);
    }

    10% {
        clip: rect(80px, 9999px, 5px, 0);
    }

    15% {
        clip: rect(110px, 9999px, 55px, 0);
    }

    20% {
        clip: rect(2px, 9999px, 120px, 0);
    }

    25% {
        clip: rect(65px, 9999px, 95px, 0);
    }

    30% {
        clip: rect(15px, 9999px, 30px, 0);
    }

    35% {
        clip: rect(80px, 9999px, 130px, 0);
    }

    40% {
        clip: rect(45px, 9999px, 60px, 0);
    }

    45% {
        clip: rect(112px, 9999px, 5px, 0);
    }

    50% {
        clip: rect(8px, 9999px, 88px, 0);
    }

    55% {
        clip: rect(95px, 9999px, 140px, 0);
    }

    60% {
        clip: rect(33px, 9999px, 77px, 0);
    }

    65% {
        clip: rect(115px, 9999px, 10px, 0);
    }

    70% {
        clip: rect(45px, 9999px, 99px, 0);
    }

    75% {
        clip: rect(70px, 9999px, 125px, 0);
    }

    80% {
        clip: rect(18px, 9999px, 45px, 0);
    }

    85% {
        clip: rect(100px, 9999px, 135px, 0);
    }

    90% {
        clip: rect(60px, 9999px, 90px, 0);
    }

    95% {
        clip: rect(5px, 9999px, 115px, 0);
    }

    100% {
        clip: rect(110px, 9999px, 40px, 0);
    }
}

/* Glitch Keyframes 2 */
@keyframes logo-glitch-2 {
    0% {
        clip: rect(110px, 9999px, 40px, 0);
    }

    5% {
        clip: rect(5px, 9999px, 115px, 0);
    }

    10% {
        clip: rect(60px, 9999px, 90px, 0);
    }

    15% {
        clip: rect(100px, 9999px, 135px, 0);
    }

    20% {
        clip: rect(18px, 9999px, 45px, 0);
    }

    25% {
        clip: rect(70px, 9999px, 125px, 0);
    }

    30% {
        clip: rect(45px, 9999px, 99px, 0);
    }

    35% {
        clip: rect(115px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(33px, 9999px, 77px, 0);
    }

    45% {
        clip: rect(95px, 9999px, 140px, 0);
    }

    50% {
        clip: rect(8px, 9999px, 88px, 0);
    }

    55% {
        clip: rect(112px, 9999px, 5px, 0);
    }

    60% {
        clip: rect(45px, 9999px, 60px, 0);
    }

    65% {
        clip: rect(80px, 9999px, 130px, 0);
    }

    70% {
        clip: rect(15px, 9999px, 30px, 0);
    }

    75% {
        clip: rect(65px, 9999px, 95px, 0);
    }

    80% {
        clip: rect(2px, 9999px, 120px, 0);
    }

    85% {
        clip: rect(110px, 9999px, 55px, 0);
    }

    90% {
        clip: rect(80px, 9999px, 5px, 0);
    }

    95% {
        clip: rect(40px, 9999px, 85px, 0);
    }

    100% {
        clip: rect(15px, 9999px, 66px, 0);
    }
}

/* Status Dot Pulse */
@keyframes status-pulse {
    0% {
        opacity: 0.4;
        box-shadow: 0 0 4px var(--color-accent-red);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 12px var(--color-accent-red);
    }

    100% {
        opacity: 0.4;
        box-shadow: 0 0 4px var(--color-accent-red);
    }
}

/* --- Media Queries --- */
@media (max-width: 900px) {
    .navbar {
        padding: 0 24px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 40px;
        gap: 40px;
        border-top: 1px solid var(--border-color);
        transform: translateX(-100%);
        transition: transform var(--transition-smooth);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-links {
        flex-direction: column;
        gap: 24px;
        width: 100%;
    }

    .nav-link {
        font-size: 1.2rem;
        display: block;
        width: 100%;
    }

    .nav-status {
        margin-top: auto;
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
}

/* --- Custom Cursor --- */
@media (hover: hover) {

    html,
    body,
    a,
    button,
    select,
    input,
    textarea {
        cursor: none !important;
    }

    .custom-cursor {
        width: 24px;
        height: 24px;
        border: 2px solid var(--color-accent-cyan);
        border-radius: 4px;
        /* Square outline for a high-tech/glitchy look */
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 10000;
        /* Smooth scale transition, but positions will be handled instantly by requestAnimationFrame */
        transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s, border-radius 0.2s, transform 0.05s ease-out;
        mix-blend-mode: difference;
    }

    .custom-cursor-dot {
        width: 4px;
        height: 4px;
        background-color: var(--color-accent-magenta);
        border-radius: 50%;
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 10001;
        mix-blend-mode: difference;
    }

    /* Hover States for Interactive Elements */
    .custom-cursor.cursor-hover {
        width: 36px;
        height: 36px;
        border-color: var(--color-accent-magenta);
        background-color: rgba(255, 0, 193, 0.1);
        border-radius: 50%;
        /* morphs into a circle when hovering! */
        animation: cursor-glitch-border 1.5s infinite linear;
    }

    .custom-cursor-dot.cursor-hover {
        background-color: var(--color-accent-cyan);
        width: 6px;
        height: 6px;
    }

    /* Click State */
    .custom-cursor.cursor-click {
        transform: translate(-50%, -50%) scale(0.8);
        border-color: var(--color-accent-green);
        background-color: rgba(0, 255, 102, 0.2);
    }
}

@keyframes cursor-glitch-border {

    0%,
    100% {
        border-color: var(--color-accent-magenta);
    }

    33% {
        border-color: var(--color-accent-cyan);
    }

    66% {
        border-color: var(--color-accent-green);
    }
}

@media (hover: none) {

    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }
}

/* --- Simulator Toggle Button --- */
.sim-toggle-btn {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-accent-cyan);
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    user-select: none;
}

.sim-toggle-btn:hover {
    border-color: var(--color-accent-cyan);
    background-color: rgba(0, 240, 255, 0.05);
}

.sim-toggle-btn.disabled {
    color: var(--color-text-muted);
    border-color: var(--border-color);
}

.sim-toggle-btn.disabled:hover {
    border-color: var(--color-text-muted);
    background-color: rgba(255, 255, 255, 0.02);
}

@media (max-width: 900px) {
    .sim-toggle-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 0.85rem;
    }
}

/* --- Disconnected Outage Simulation Screen --- */
.disconnected-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-bg);
    z-index: 9998;
    /* just below the custom cursor */
    display: none;
    /* controlled by JS */
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
}

.disconnected-overlay.active {
    display: flex;
    animation: crt-power-on 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.disconnected-overlay.power-off {
    animation: crt-power-off 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* CRT Screen Flicker overlay */
.outage-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10, 10, 12, 0.2) 0%, rgba(5, 5, 6, 0.95) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Outage Box Container */
.outage-box {
    position: relative;
    z-index: 2;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-accent-red);
    box-shadow: 0 0 35px rgba(255, 0, 60, 0.15);
    max-width: 650px;
    width: 100%;
    padding: 40px;
    border-radius: 4px;
    animation: box-flicker 0.15s infinite alternate;
}

.outage-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 0, 60, 0.2);
    padding-bottom: 16px;
}

.warning-icon {
    font-size: 2rem;
    color: var(--color-accent-red);
    animation: status-pulse 1s infinite alternate;
}

.outage-title {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-accent-red);
    letter-spacing: 0.05em;
    position: relative;
}

/* Chromatic aberration effect on warning title */
.outage-title::before,
.outage-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-alt);
}

.outage-title::before {
    left: 2px;
    text-shadow: -1px 0 var(--color-accent-cyan);
    clip: rect(10px, 9999px, 30px, 0);
    animation: logo-glitch-1 3s infinite linear alternate-reverse;
}

.outage-title::after {
    left: -2px;
    text-shadow: -1px 0 var(--color-accent-magenta);
    clip: rect(25px, 9999px, 50px, 0);
    animation: logo-glitch-2 3s infinite linear alternate-reverse;
}

/* Terminal Area */
.outage-terminal {
    background-color: #050507;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.8;
    margin-bottom: 30px;
    height: 250px;
    overflow-y: auto;
}

.term-line {
    color: var(--color-text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.term-line.green {
    color: var(--color-accent-green);
}

.term-line.red {
    color: var(--color-accent-red);
}

.reconnect-console {
    margin-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.console-log {
    margin-bottom: 6px;
    color: var(--color-accent-cyan);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.console-log.success {
    color: var(--color-accent-green);
}

/* Reconnect Button */
.reconnect-btn {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-bg);
    background-color: var(--color-text);
    border: 1px solid var(--color-text);
    padding: 16px;
    border-radius: 2px;
    cursor: pointer;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all var(--transition-fast);
    outline: none;
    position: relative;
    overflow: hidden;
}

.reconnect-btn:hover {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-text);
    box-shadow: 0 0 15px rgba(243, 243, 246, 0.15);
}

.reconnect-btn:active {
    transform: scale(0.98);
}

/* Animations */
@keyframes crt-power-on {
    0% {
        transform: scaleY(0.005) scaleX(0);
        opacity: 0;
    }

    50% {
        transform: scaleY(0.005) scaleX(1);
        opacity: 0.8;
    }

    100% {
        transform: scaleY(1) scaleX(1);
        opacity: 1;
    }
}

@keyframes crt-power-off {
    0% {
        transform: scaleY(1) scaleX(1);
        opacity: 1;
    }

    50% {
        transform: scaleY(0.005) scaleX(1);
        opacity: 0.5;
    }

    100% {
        transform: scaleY(0.005) scaleX(0);
        opacity: 0;
    }
}

@keyframes box-flicker {
    0% {
        opacity: 0.98;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.99;
    }
}

/* --- Chapter 00: Before the Outage Section --- */
.section-preoutage {
    position: relative;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 40px;
    border-top: 1px solid var(--border-color);
}

.preoutage-header {
    margin-bottom: 60px;
    text-align: left;
}

.preoutage-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent-green);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.preoutage-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 16px;
    position: relative;
}

.preoutage-desc {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    max-width: 700px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Dashboard Card */
.dashboard-card {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    height: 380px;
    overflow: hidden;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.dashboard-card:hover {
    border-color: rgba(0, 255, 102, 0.25);
    box-shadow: 0 0 25px rgba(0, 255, 102, 0.04);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
}

.card-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-text-muted);
    display: inline-block;
}

.card-status.active {
    background-color: var(--color-accent-green);
    box-shadow: 0 0 8px var(--color-accent-green);
    animation: status-pulse-green 2s infinite ease-in-out;
}

@keyframes status-pulse-green {

    0%,
    100% {
        opacity: 0.5;
        box-shadow: 0 0 4px var(--color-accent-green);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 10px var(--color-accent-green);
    }
}

.card-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.05em;
    flex-grow: 1;
    margin-left: 12px;
}

.card-speed {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent-green);
    letter-spacing: 0.05em;
}

.card-body {
    padding: 24px;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Panel 1: Social Feed */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.feed-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Webkit */
}

.chat-message {
    font-size: 0.82rem;
    line-height: 1.4;
    animation: fade-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.chat-author {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--color-accent-green);
    margin-right: 6px;
}

.chat-text {
    color: var(--color-text);
}

@keyframes fade-slide-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel 2: Uplink Sync */
.uplink-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.upload-progress-wrapper {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 2px;
}

.upload-filename {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 8px;
}

.progress-bar-bg {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--color-accent-green);
    width: 0%;
    transition: width 0.1s linear;
}

.upload-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-percent {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text);
}

.upload-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 1px;
}

.upload-status.green {
    background-color: rgba(0, 255, 102, 0.08);
    color: var(--color-accent-green);
    border: 1px solid rgba(0, 255, 102, 0.15);
}

.cloud-folders {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.folder-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.folder-name {
    color: var(--color-text-muted);
}

.folder-status {
    font-weight: 700;
}

.folder-status.success {
    color: var(--color-accent-green);
}

.folder-status.warning {
    color: var(--color-accent-cyan);
}

/* Panel 3: World Node Map */
.node-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.node-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    justify-items: center;
    align-items: center;
    padding: 10px 0;
}

.node-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.node-dot.active {
    background-color: var(--color-accent-green);
    box-shadow: 0 0 6px var(--color-accent-green);
}

.node-dot.pinging {
    background-color: var(--color-accent-cyan);
    box-shadow: 0 0 10px var(--color-accent-cyan);
}

.ping-diagnostics {
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.diag-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

.diag-row span:nth-child(2) {
    font-weight: 700;
}

/* Panel 4: Smart Control Panel */
.control-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.control-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.control-toggle:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.04);
}

.control-toggle.active {
    border-color: rgba(0, 255, 102, 0.2);
    background-color: rgba(0, 255, 102, 0.02);
}

.toggle-icon {
    font-size: 1.25rem;
}

.toggle-details {
    display: flex;
    flex-direction: column;
}

.toggle-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 700;
}

.toggle-state {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.toggle-state.green {
    color: var(--color-accent-green);
}

/* Audio Visualizer */
.audio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 36px;
    padding: 0 4px;
    opacity: 0.3;
    transition: opacity var(--transition-smooth);
}

.audio-visualizer.playing {
    opacity: 1;
}

.vis-bar {
    width: 5px;
    height: 4px;
    background-color: var(--color-accent-green);
    border-radius: 1px;
    transition: height 0.08s ease;
}

.audio-visualizer.playing .vis-bar {
    animation: bounce-visualizer 0.6s infinite alternate ease-in-out;
}

/* Apply random visualizer delays in CSS for simplicity and speed */
.vis-bar:nth-child(1) {
    animation-delay: 0.1s;
}

.vis-bar:nth-child(2) {
    animation-delay: 0.35s;
}

.vis-bar:nth-child(3) {
    animation-delay: 0.15s;
}

.vis-bar:nth-child(4) {
    animation-delay: 0.5s;
}

.vis-bar:nth-child(5) {
    animation-delay: 0.25s;
}

.vis-bar:nth-child(6) {
    animation-delay: 0.4s;
}

.vis-bar:nth-child(7) {
    animation-delay: 0.2s;
}

.vis-bar:nth-child(8) {
    animation-delay: 0.45s;
}

.vis-bar:nth-child(9) {
    animation-delay: 0.3s;
}

.vis-bar:nth-child(10) {
    animation-delay: 0.1s;
}

.vis-bar:nth-child(11) {
    animation-delay: 0.55s;
}

.vis-bar:nth-child(12) {
    animation-delay: 0.25s;
}

@keyframes bounce-visualizer {
    0% {
        height: 4px;
        background-color: var(--color-accent-green);
    }

    100% {
        height: 32px;
        background-color: var(--color-accent-cyan);
    }
}

@media (max-width: 600px) {
    .section-preoutage {
        padding: 60px 20px;
    }
}

/* --- Chapter 01: The Outage Section --- */
.section-outage {
    position: relative;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 40px;
    border-top: 1px solid var(--border-color);
}

.outage-section-header {
    margin-bottom: 60px;
    text-align: left;
}

.outage-section-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent-red);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.outage-section-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 16px;
    position: relative;
}

/* Chromatic aberration effect on Section Title (since it's glitched out!) */
.outage-section-title::before,
.outage-section-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

.outage-section-title::before {
    left: 2px;
    text-shadow: -1px 0 var(--color-accent-cyan);
    clip: rect(10px, 9999px, 30px, 0);
    animation: logo-glitch-1 4s infinite linear alternate-reverse;
}

.outage-section-title::after {
    left: -2px;
    text-shadow: -1px 0 var(--color-accent-magenta);
    clip: rect(25px, 9999px, 50px, 0);
    animation: logo-glitch-2 4s infinite linear alternate-reverse;
}

.outage-section-desc {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    max-width: 700px;
}

.outage-banner {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 350px;
    margin: 40px auto;
    border: 1px solid rgba(255, 0, 60, 0.15);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background-color: var(--color-bg-alt);
}

.outage-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.1) grayscale(20%);
    transition: transform 6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.8s ease;
}

.outage-banner:hover img {
    transform: scale(1.03);
    filter: brightness(0.7) contrast(1.15) grayscale(0%);
}

.banner-overlay-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 0, 60, 0.04) 50%, rgba(0, 0, 0, 0.15) 50%);
    background-size: 100% 4px;
    pointer-events: none;
}

/* Red-themed Outage Cards */
.dashboard-card.crashed {
    border-color: rgba(255, 0, 60, 0.15);
}

.dashboard-card.crashed:hover {
    border-color: rgba(255, 0, 60, 0.4);
    box-shadow: 0 0 25px rgba(255, 0, 60, 0.05);
}

.card-status.offline {
    background-color: var(--color-accent-red);
    box-shadow: 0 0 8px var(--color-accent-red);
    animation: status-pulse-red 1.5s infinite ease-in-out;
}

@keyframes status-pulse-red {

    0%,
    100% {
        opacity: 0.4;
        box-shadow: 0 0 4px var(--color-accent-red);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 12px var(--color-accent-red);
    }
}

.card-speed.red {
    color: var(--color-accent-red);
}

/* Stuck Upload styles */
.upload-progress-wrapper.crashed {
    border-color: rgba(255, 0, 60, 0.2);
    background-color: rgba(255, 0, 60, 0.01);
}

.progress-bar-fill.red {
    background-color: var(--color-accent-red);
    animation: bar-flicker 0.4s infinite alternate;
}

.upload-percent.red {
    color: var(--color-accent-red);
}

.upload-status.red {
    background-color: rgba(255, 0, 60, 0.08);
    color: var(--color-accent-red);
    border: 1px solid rgba(255, 0, 60, 0.15);
}

.folder-status.red {
    color: var(--color-accent-red);
}

/* Offline World Dots */
.node-dot.offline {
    background-color: rgba(255, 255, 255, 0.02);
}

.node-dot.offline.red-flash {
    background-color: var(--color-accent-red);
    box-shadow: 0 0 6px var(--color-accent-red);
}

/* Offline Smart Toggles */
.control-toggle.crashed {
    border-color: rgba(255, 0, 60, 0.1);
    background-color: rgba(255, 0, 60, 0.01);
    cursor: pointer;
}

.control-toggle.crashed:hover {
    border-color: rgba(255, 0, 60, 0.25);
    background-color: rgba(255, 0, 60, 0.03);
}

/* Active Warning flicker when user clicks offline toggle */
.control-toggle.crashed.error-shake {
    animation: error-shake 0.3s ease-in-out;
    border-color: var(--color-accent-red);
    background-color: rgba(255, 0, 60, 0.08);
}

@keyframes error-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-4px);
    }

    40%,
    80% {
        transform: translateX(4px);
    }
}

.toggle-state.red {
    color: var(--color-accent-red);
}

/* Dead flat visualizer */
.vis-bar.flat {
    height: 4px !important;
    background-color: rgba(255, 255, 255, 0.08);
    animation: none !important;
}

/* Dynamic CRT Screen Crash transition styles */
.section-outage.screen-crash::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    animation: crt-flash 0.4s ease-out;
}

@keyframes crt-flash {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes bar-flicker {
    0% {
        opacity: 0.85;
    }

    100% {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .section-outage {
        padding: 60px 20px;
    }
}

/* --- Chapter 02: Chaos Section --- */
.section-chaos {
    position: relative;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 40px;
    border-top: 1px solid var(--border-color);
}

.chaos-section-header {
    margin-bottom: 60px;
    text-align: left;
}

.chaos-section-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent-red);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.chaos-section-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 16px;
    position: relative;
}

.chaos-section-title::before,
.chaos-section-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

.chaos-section-title::before {
    left: 2px;
    text-shadow: -1px 0 var(--color-accent-cyan);
    clip: rect(10px, 9999px, 30px, 0);
    animation: logo-glitch-1 3s infinite linear alternate-reverse;
}

.chaos-section-title::after {
    left: -2px;
    text-shadow: -1px 0 var(--color-accent-magenta);
    clip: rect(25px, 9999px, 50px, 0);
    animation: logo-glitch-2 3s infinite linear alternate-reverse;
}

.chaos-section-desc {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    max-width: 700px;
}

/* Chaos layout */
.chaos-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    width: 100%;
}

.chaos-map-container {
    background-image: url('Asset/World Map.jpg');
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 0, 60, 0.15);
    border-radius: 4px;
    height: 450px;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

/* Coordinate Grid background pattern for map */
.map-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

.map-status-banner {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(10, 10, 12, 0.8);
    border: 1px solid rgba(255, 0, 60, 0.3);
    padding: 10px 16px;
    border-radius: 2px;
    z-index: 5;
}

.pulse-warning {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-accent-red);
    animation: status-pulse-red 1s infinite alternate;
}

.banner-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-accent-red);
    letter-spacing: 0.05em;
}

/* Sonar Wave alert ripples */
.sonar-ping {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 0, 60, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: sonar-expand 1.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes sonar-expand {
    0% {
        width: 1px;
        height: 1px;
        opacity: 1;
        box-shadow: 0 0 10px var(--color-accent-red);
    }

    100% {
        width: 140px;
        height: 140px;
        opacity: 0;
    }
}

.map-coordinate-label {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-accent-red);
    transform: translate(15px, -50%);
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 0 0 4px #000;
    animation: fade-out-label 1.8s ease-out forwards;
}

@keyframes fade-out-label {
    0% {
        opacity: 1;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

/* Sidebar log of Chaos alerts */
.chaos-sidebar {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    height: 450px;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-accent-red);
    box-shadow: 0 0 8px var(--color-accent-red);
    animation: status-pulse-red 1s infinite alternate;
}

.sidebar-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text);
}

.sidebar-terminal {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.8;
    background-color: #050507;
    scrollbar-width: none;
}

.sidebar-terminal::-webkit-scrollbar {
    display: none;
}

.chaos-log-line {
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

.chaos-log-line.alert {
    color: var(--color-accent-red);
}


/* --- Chapter 03: Silence Section --- */
.section-silence {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.silence-content {
    text-align: center;
    max-width: 750px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

/* Peaceful breathing circle */
.breathing-circle-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breathing-circle {
    width: 80px;
    height: 80px;
    border: 1px solid var(--color-text-muted);
    border-radius: 50%;
    animation: breathe 8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    opacity: 0.3;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.02);
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.5s ease;
}

.breathing-circle:hover {
    opacity: 0.85 !important;
}

.silence-circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(100%) brightness(0.75);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.breathing-circle:hover .silence-circle-img {
    filter: grayscale(0%) brightness(0.95);
    transform: scale(1.05);
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(0.85);
        opacity: 0.25;
        border-color: var(--color-text-muted);
    }

    50% {
        transform: scale(1.35);
        opacity: 0.6;
        border-color: #fff;
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
    }
}

.silence-text-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.silence-chapter {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.silence-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

.silence-p {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-muted);
}


/* --- Chapter 04: Recovery Section --- */
.section-recovery {
    position: relative;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 40px;
}

.recovery-section-header {
    margin-bottom: 60px;
    text-align: left;
}

.recovery-section-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent-green);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.recovery-section-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 16px;
    position: relative;
}

.recovery-section-title::before,
.recovery-section-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.recovery-section-title::before {
    left: 2px;
    text-shadow: -1px 0 var(--color-accent-cyan);
    clip: rect(10px, 9999px, 30px, 0);
    animation: logo-glitch-1 4s infinite linear alternate-reverse;
}

.recovery-section-title::after {
    left: -2px;
    text-shadow: -1px 0 var(--color-accent-green);
    clip: rect(25px, 9999px, 50px, 0);
    animation: logo-glitch-2 4s infinite linear alternate-reverse;
}

.recovery-section-desc {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    max-width: 700px;
}

.recovery-banner {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 350px;
    margin: 40px auto;
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background-color: var(--color-bg-alt);
}

.recovery-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.1) grayscale(20%);
    transition: transform 6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.8s ease;
}

.recovery-banner:hover img {
    transform: scale(1.03);
    filter: brightness(0.7) contrast(1.15) grayscale(0%);
}

.banner-overlay-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Recovery Layout */
.recovery-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
    align-items: center;
}

.boot-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.boot-step {
    display: flex;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--border-color);
    background-color: var(--color-bg-alt);
    padding: 16px 24px;
    border-radius: 4px;
    opacity: 0.15;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.boot-step.active {
    opacity: 1;
    transform: translateY(0);
    border-color: rgba(0, 255, 102, 0.25);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.03);
}

.step-num {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-accent-green);
}

.step-details {
    display: flex;
    flex-direction: column;
}

.step-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-accent-green);
    font-weight: 700;
    margin-bottom: 4px;
}

.step-info {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text);
}

/* Canvas Graph Card */
.recovery-graph-card {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    height: 340px;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.recovery-graph-card canvas {
    width: 100%;
    height: 180px;
    background-color: #060608;
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 2px;
}

.graph-diagnostics {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.diag-ping {
    color: var(--color-accent-cyan);
}

.diag-throughput {
    color: var(--color-accent-green);
    font-weight: 700;
}


/* --- Chapter 05: Moral of the Story Section --- */
.section-moral {
    position: relative;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 120px 40px;
    border-top: 1px solid var(--border-color);
}

.moral-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    width: 100%;
}

.moral-header {
    text-align: center;
}

.moral-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent-cyan);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.moral-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 20px;
}

.moral-desc {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    max-width: 800px;
    line-height: 1.8;
}

/* Moral drag card wrapper */
.moral-interactive-card {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    max-width: 700px;
    width: 100%;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.moral-card-inner {
    height: 280px;
    background-color: #060608;
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.moral-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

.moral-bg-noise {
    opacity: 1;
    filter: brightness(0.35) contrast(1.1);
}

.moral-bg-peace {
    opacity: 0;
    filter: brightness(0.6) contrast(1.0);
}

.moral-clean-prompt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-align: center;
    padding: 20px;
    opacity: 0;
    /* JS will adjust opacity based on slider value */
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.moral-clean-prompt h3 {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-accent-cyan);
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.moral-clean-prompt p {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Mock alert overlays representing digital noise */
.moral-alert-box {
    position: absolute;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-accent-magenta);
    padding: 10px 16px;
    border-radius: 3px;
    width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.moral-alert-box .alert-title {
    color: var(--color-accent-magenta);
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
}

.moral-alert-box .alert-body {
    color: var(--color-text);
}

/* Slider Controls */
.moral-slider-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.slider-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

.moral-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    border-radius: 2px;
}

.moral-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    background: var(--color-accent-cyan);
    border: 1px solid var(--color-bg);
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    transition: background-color var(--transition-fast);
}

.moral-slider::-webkit-slider-thumb:hover {
    background: var(--color-accent-magenta);
    box-shadow: 0 0 10px rgba(255, 0, 193, 0.4);
}


/* --- Footer Section --- */
.site-footer {
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--border-color);
    padding: 60px 40px 20px 40px;
    width: 100%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: 0.15em;
}

.footer-tagline {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent-cyan);
}

.footer-system-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: right;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

/* Mobile responsive styling overrides */
@media (max-width: 900px) {
    .chaos-content {
        grid-template-columns: 1fr;
    }

    .recovery-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-system-info {
        text-align: left;
    }
}

/* ==========================================================================
   SCROLL REVEAL & CHAPTER TRANSITIONS
   ========================================================================== */

/* --- Scroll Reveal Animations --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Chapter Spacers --- */
.chapter-spacer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 30vh;
    width: 100%;
    position: relative;
    pointer-events: none;
    user-select: none;
}

.spacer-line {
    width: 1px;
    height: calc(50% - 10px);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.15));
}

.spacer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-text-muted);
    opacity: 0.15;
    transition: background-color 0.8s ease, box-shadow 0.8s ease, opacity 0.8s ease;
}

.spacer-dot.green {
    background-color: var(--color-accent-green);
}

.spacer-dot.cyan {
    background-color: var(--color-accent-cyan);
}

.spacer-dot.red {
    background-color: var(--color-accent-red);
}

.spacer-dot.magenta {
    background-color: var(--color-accent-magenta);
}

.spacer-dot.white {
    background-color: var(--color-text);
}

.chapter-spacer.active .spacer-dot {
    opacity: 0.9;
}

.chapter-spacer.active .spacer-dot.green {
    box-shadow: 0 0 12px var(--color-accent-green);
    background-color: var(--color-accent-green);
}

.chapter-spacer.active .spacer-dot.cyan {
    box-shadow: 0 0 12px var(--color-accent-cyan);
    background-color: var(--color-accent-cyan);
}

.chapter-spacer.active .spacer-dot.red {
    box-shadow: 0 0 12px var(--color-accent-red);
    background-color: var(--color-accent-red);
}

.chapter-spacer.active .spacer-dot.magenta {
    box-shadow: 0 0 12px var(--color-accent-magenta);
    background-color: var(--color-accent-magenta);
}

.chapter-spacer.active .spacer-dot.white {
    box-shadow: 0 0 12px #fff;
    background-color: #fff;
}

/* --- Transition 00-01: Emergency Flash --- */
.transition-emergency {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: #050002;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.emergency-flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    animation: emergency-alarm-flash 2s infinite linear;
}

@keyframes emergency-alarm-flash {

    0%,
    100% {
        background-color: rgba(255, 0, 60, 0.02);
    }

    50% {
        background-color: rgba(255, 0, 60, 0.18);
        box-shadow: inset 0 0 120px rgba(255, 0, 60, 0.25);
    }
}

.emergency-hazard-bar {
    position: absolute;
    left: 0;
    width: 100%;
    height: 16px;
    background: repeating-linear-gradient(-45deg,
            var(--color-accent-red),
            var(--color-accent-red) 15px,
            #000 15px,
            #000 30px);
    z-index: 2;
    opacity: 0.6;
    top: 0;
}

.emergency-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    width: 100%;
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.emergency-warning-icon {
    font-size: 3rem;
    color: var(--color-accent-red);
    text-shadow: 0 0 20px var(--color-accent-red);
    animation: scale-bounce 0.8s infinite alternate ease-in-out;
}

@keyframes scale-bounce {
    0% {
        transform: scale(0.92);
    }

    100% {
        transform: scale(1.08);
    }
}

.emergency-title {
    font-family: var(--font-sans);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 800;
    color: var(--color-accent-red);
    letter-spacing: 0.05em;
    position: relative;
    text-shadow: 0 0 15px rgba(255, 0, 60, 0.5);
}

.emergency-title::before,
.emergency-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.emergency-title::before {
    left: 2px;
    text-shadow: -2px 0 var(--color-accent-cyan);
    clip: rect(10px, 9999px, 30px, 0);
    animation: logo-glitch-1 3s infinite linear alternate-reverse;
}

.emergency-title::after {
    left: -2px;
    text-shadow: -2px 0 var(--color-accent-magenta);
    clip: rect(25px, 9999px, 50px, 0);
    animation: logo-glitch-2 3s infinite linear alternate-reverse;
}

.emergency-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

.emergency-terminal {
    width: 100%;
    max-width: 600px;
    background-color: #030001;
    border: 1px solid rgba(255, 0, 60, 0.25);
    border-radius: 4px;
    padding: 20px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.6;
    box-shadow: 0 0 35px rgba(255, 0, 60, 0.04);
}

.emergency-ticker {
    width: 100%;
    position: absolute;
    bottom: 50px;
    left: 0;
    overflow: hidden;
    background-color: rgba(255, 0, 60, 0.08);
    border-top: 1px solid rgba(255, 0, 60, 0.15);
    border-bottom: 1px solid rgba(255, 0, 60, 0.15);
    padding: 12px 0;
    display: flex;
    z-index: 3;
}

.ticker-wrap {
    display: flex;
    width: max-content;
    animation: marquee-loop 12s infinite linear;
}

.ticker-content {
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent-red);
    letter-spacing: 0.25em;
    padding-right: 2rem;
}

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

    100% {
        transform: translateX(-50%);
    }
}

/* --- Transition 01-02: Glitch Text Wall --- */
.transition-glitch-wall {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: #050508;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.glitch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.22;
}

.glitch-wall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, #050508 95%);
    z-index: 2;
    pointer-events: none;
}

.glitch-wall-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.glitch-wall-title {
    font-family: var(--font-sans);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    animation: text-glitch-shake 0.8s infinite alternate;
}

@keyframes text-glitch-shake {

    0%,
    100% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-2px, 1px);
    }

    40% {
        transform: translate(1px, -2px);
    }

    60% {
        transform: translate(-1px, -1px);
    }

    80% {
        transform: translate(2px, 2px);
    }
}

.glitch-wall-title::before,
.glitch-wall-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.glitch-wall-title::before {
    left: 3px;
    text-shadow: -2px 0 var(--color-accent-cyan);
    clip: rect(15px, 9999px, 40px, 0);
    animation: logo-glitch-1 2s infinite linear alternate-reverse;
}

.glitch-wall-title::after {
    left: -3px;
    text-shadow: -2px 0 var(--color-accent-magenta);
    clip: rect(40px, 9999px, 80px, 0);
    animation: logo-glitch-2 2s infinite linear alternate-reverse;
}

.glitch-wall-subtitle {
    font-family: var(--font-mono);
    color: var(--color-accent-magenta);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.glitch-warning-boxes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}

.glitch-warning-box {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-accent-magenta);
    border: 1px solid rgba(255, 0, 193, 0.35);
    background-color: rgba(255, 0, 193, 0.02);
    padding: 6px 14px;
    border-radius: 2px;
    animation: tag-flicker 1.5s infinite ease-in-out;
}

.glitch-warning-box:nth-child(2) {
    animation-delay: 0.4s;
    color: var(--color-accent-cyan);
    border-color: rgba(0, 240, 255, 0.35);
    background-color: rgba(0, 240, 255, 0.02);
}

.glitch-warning-box:nth-child(3) {
    animation-delay: 0.8s;
}

@keyframes tag-flicker {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.97);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.glitch-error-card {
    position: absolute;
    width: 255px;
    background-color: #030002;
    border: 1px solid var(--color-accent-magenta);
    box-shadow: 0 8px 30px rgba(255, 0, 193, 0.25);
    border-radius: 4px;
    font-family: var(--font-mono);
    padding: 12px;
    z-index: 2;
    pointer-events: none;
    user-select: none;
    animation: popup-flicker 0.2s ease forwards;
}

@keyframes popup-flicker {
    0% {
        transform: scale(0.9) rotate(-3deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.05) rotate(1deg);
        opacity: 0.8;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.glitch-error-card .card-head {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 0, 193, 0.3);
    padding-bottom: 6px;
    margin-bottom: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-accent-magenta);
}

.glitch-error-card .card-head.cyan-head {
    color: var(--color-accent-cyan);
    border-bottom-color: rgba(0, 240, 255, 0.3);
}

.glitch-error-card.cyan-card {
    border-color: var(--color-accent-cyan);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.20);
}

.glitch-error-card .card-body {
    font-size: 0.65rem;
    color: var(--color-text);
    line-height: 1.4;
}

.chaos-stack-trace {
    position: absolute;
    bottom: 30px;
    right: 30px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(0, 240, 255, 0.22);
    z-index: 2;
    line-height: 1.6;
    pointer-events: none;
    user-select: none;
    text-align: right;
}

/* --- Transition 02-03: The Plug Pull --- */
.transition-plug-pull {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.plug-pull-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.transition-plug-pull.triggered .plug-pull-noise {
    opacity: 0.8;
    animation: static-noise-shake 0.08s infinite alternate;
}

@keyframes static-noise-shake {
    0% {
        transform: translate(1px, -1px);
        opacity: 0.5;
    }

    100% {
        transform: translate(-1px, 1px);
        opacity: 0.75;
    }
}

.plug-pull-crt-line {
    position: absolute;
    width: 100%;
    height: 4px;
    background-color: #fff;
    box-shadow: 0 0 20px #fff, 0 0 40px var(--color-accent-cyan);
    z-index: 3;
    opacity: 0;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
}

.transition-plug-pull.triggered .plug-pull-crt-line {
    animation: crt-collapse-line 1.2s cubic-bezier(0.25, 1, 0.2, 1) 1.5s forwards;
}

@keyframes crt-collapse-line {
    0% {
        opacity: 0;
        transform: translateY(-50%) scaleX(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-50%) scaleX(1) scaleY(1);
    }

    75% {
        opacity: 1;
        transform: translateY(-50%) scaleX(1) scaleY(0.04);
    }

    100% {
        opacity: 0;
        transform: translateY(-50%) scaleX(0) scaleY(0);
    }
}

.plug-pull-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-text);
    transition: opacity 0.4s ease;
}

.transition-plug-pull.triggered .plug-pull-content {
    animation: crt-hide-content 0.8s linear 1.2s forwards;
}

@keyframes crt-hide-content {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
        filter: blur(5px);
    }
}

.plug-pull-title {
    font-family: var(--font-sans);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.plug-pull-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

/* --- Transition 03-04: Reboot Init --- */
.transition-reboot {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: #060608;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.reboot-terminal-box {
    width: 90%;
    max-width: 600px;
    background-color: #020203;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.reboot-terminal-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
    display: flex;
    align-items: center;
    gap: 8px;
}

.term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.term-dot.red-dot {
    background-color: #ff5f56;
}

.term-dot.yellow-dot {
    background-color: #ffbd2e;
}

.term-dot.green-dot {
    background-color: #27c93f;
}

.term-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-left: auto;
}

.reboot-terminal-body {
    padding: 24px;
    height: 300px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--color-accent-green);
    text-align: left;
    scrollbar-width: none;
}

.reboot-terminal-body::-webkit-scrollbar {
    display: none;
}

.reboot-line {
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    animation: fade-line 0.1s ease forwards;
}

@keyframes fade-line {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reboot-line.white {
    color: var(--color-text);
}

.reboot-line.yellow {
    color: #ffbd2e;
}

.reboot-line.cyan {
    color: var(--color-accent-cyan);
}

.reboot-line.red {
    color: var(--color-accent-red);
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--color-accent-green);
    animation: terminal-blink 0.8s infinite step-end;
    vertical-align: middle;
}

@keyframes terminal-blink {

    from,
    to {
        background-color: transparent;
    }

    50% {
        background-color: var(--color-accent-green);
    }
}

/* --- Resolving Gradient Wrapper --- */
.resolving-gradient-wrapper {
    width: 100%;
    background: linear-gradient(to bottom, #0a0a0c 0%, #03140e 50%, #082619 100%) !important;
    display: flex;
    flex-direction: column;
    position: relative;
}

.resolving-gradient-wrapper .section-silence,
.resolving-gradient-wrapper .transition-reboot,
.resolving-gradient-wrapper .section-recovery,
.resolving-gradient-wrapper .section-moral,
.resolving-gradient-wrapper .chapter-spacer {
    background: transparent !important;
    background-image: none !important;
}

/* --- Cyber Footer Upgrades --- */
.site-footer {
    background-color: #060608 !important;
    border-top: 1px solid rgba(0, 240, 255, 0.1) !important;
    position: relative;
    padding: 60px 40px 20px 40px;
    width: 100%;
    overflow: hidden;
}

/* Neon cyan glowing divider strip */
.site-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-accent-cyan) 50%, transparent 100%);
    box-shadow: 0 0 12px var(--color-accent-cyan);
}

/* Make footer logo glitched out and animated on hover */
.site-footer .footer-logo {
    position: relative;
    display: inline-block;
    transition: color var(--transition-fast);
}

.site-footer .footer-logo:hover {
    color: var(--color-accent-cyan);
    text-shadow: 0 0 8px var(--color-accent-cyan);
}

/* Footer links style */
.site-footer .footer-links a {
    position: relative;
    transition: color 0.3s ease;
}

.site-footer .footer-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent-magenta);
    transition: width var(--transition-smooth);
}

.site-footer .footer-links a:hover {
    color: var(--color-accent-magenta) !important;
}

.site-footer .footer-links a:hover::after {
    width: 100%;
}

.site-footer .footer-system-info span {
    display: block;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    position: relative;
    padding-left: 14px;
    text-align: right;
}

.site-footer .footer-system-info span::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--color-accent-green);
    animation: status-pulse 1.5s infinite;
}

.site-footer .footer-system-info span#footer-uptime::before {
    color: var(--color-accent-cyan);
}

@media (max-width: 900px) {
    .site-footer .footer-system-info span {
        text-align: left;
    }
}

/* ==========================================================================
   IMAGE CAROUSEL SECTION (ABOVE CHAPTER 00)
   ========================================================================== */

.carousel-section {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 40px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 550px;
    border: 1px solid var(--border-color);
    background-color: var(--color-bg-alt);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-container:hover {
    border-color: rgba(0, 240, 255, 0.2);
}

.carousel-track-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.8s;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65) contrast(1.05);
    transition: transform 6s ease;
}

.carousel-slide.active img {
    transform: scale(1.03);
}

.slide-caption {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    background-color: rgba(10, 10, 12, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px 30px;
    border-radius: 2px;
    max-width: 550px;
    z-index: 3;
    animation: caption-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes caption-slide-up {
    from {
        transform: translateY(15px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-caption h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-accent-cyan);
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.slide-caption p {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.5;
    font-weight: 300;
}

/* Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(10, 10, 12, 0.8);
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
    font-size: 1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-fast);
    outline: none;
    user-select: none;
}

.carousel-btn:hover {
    color: var(--color-text);
    border-color: var(--color-accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    background-color: var(--color-bg);
}

.prev-btn {
    left: 24px;
}

.next-btn {
    right: 24px;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.indicator.active {
    background-color: var(--color-accent-cyan);
    box-shadow: 0 0 8px var(--color-accent-cyan);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .carousel-section {
        padding: 10px 20px;
    }

    .carousel-container {
        height: 400px;
    }

    .slide-caption {
        bottom: 24px;
        left: 24px;
        right: 24px;
        padding: 16px 20px;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .prev-btn {
        left: 12px;
    }

    .next-btn {
        right: 12px;
    }
}