/* === AGENCY OS 4.0: COSMIC SINGULARITY EDITION === */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
    /* === CORE VOID === */
    --bg-void: #020204;
    /* Darker, deeper void */
    --bg-panel: #0a0d14;

    /* === NEON OVERDRIVE === */
    --neon-cyan: #00f3ff;
    --neon-cyan-dim: rgba(0, 243, 255, 0.1);
    --neon-cyan-glow: 0 0 20px rgba(0, 243, 255, 0.4);

    --neon-purple: #bc13fe;
    --neon-purple-glow: 0 0 25px rgba(188, 19, 254, 0.3);

    --neon-gold: #ffd700;
    --neon-gold-glow: 0 0 20px rgba(255, 215, 0, 0.4);

    /* === GLASS PHYSICS 2.0 === */
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-border-highlight: 1px solid rgba(255, 255, 255, 0.2);
    --glass-surface: linear-gradient(145deg, rgba(16, 20, 30, 0.7) 0%, rgba(5, 5, 8, 0.9) 100%);
    --glass-blur: blur(20px);

    /* === TYPOGRAPHY === */
    --font-heading: 'Cinzel Decorative', cursive;
    --font-ui: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;

    /* === ANIMATION === */
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

/* === GLOBAL === */
body {
    background-color: var(--bg-void);
    color: #e2e8f0;
    font-family: var(--font-body);
    overflow: hidden;
    height: 100vh;
    margin: 0;
    position: relative;
    /* Ensure stacking context */
}

/* Safety: Force Canvases to Background */
canvas {
    position: fixed !important;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* === GLASSMORPHISM & PANELS === */
.glass-panel,
.holo-card,
.holo-panel {
    background: var(--glass-surface);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-top: var(--glass-border-highlight);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

/* Grid Overlay Texture */
.glass-panel::before,
.holo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* === STANDARD AGENT CARD === */
.agent-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.agent-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(0, 243, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.agent-card.active {
    background: rgba(0, 243, 255, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.agent-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.7rem;
    position: relative;
}

.agent-avatar::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    border: 1px solid currentColor;
    opacity: 0.3;
}

/* Hover State - "Active Hologram" */
.glass-panel:hover,
.holo-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow:
        0 20px 50px -10px rgba(0, 0, 0, 0.7),
        0 0 15px rgba(0, 243, 255, 0.1);
}

/* === CYBER BUTTONS === */
.btn-cosmic {
    position: relative;
    padding: 0.8rem 2rem;
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
    overflow: hidden;
}

.btn-cosmic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--neon-cyan);
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-smooth);
    z-index: -1;
}

.btn-cosmic:hover {
    color: #000;
    box-shadow: var(--neon-cyan-glow);
    text-shadow: none;
}

.btn-cosmic:hover::before {
    transform: translateX(0);
}

/* === CYBER INPUTS === */
.cyber-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 1rem;
    color: white;
    font-family: var(--font-ui);
    transition: all 0.3s ease;
}

.cyber-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    background: rgba(0, 20, 30, 0.6);
}

/* === CLASS 3: ANIMATION ENGINE === */

/* Stagger Entry */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.animate-fade-in {
    animation: fadeInUp 0.6s var(--ease-out-expo) forwards;
}

/* === MARKDOWN TYPOGRAPHY === */
strong {
    font-weight: 700;
    color: var(--neon-cyan);
}

em {
    font-style: italic;
    color: #94a3b8;
}

ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
}

li {
    margin-bottom: 0.25rem;
}

code {
    font-family: var(--font-code);
}

pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

/* === YUGA THEMING === */

/* KALI YUGA: Chaos, Glitch, Red/Dark */
body.yuga-kali {
    --neon-cyan: #ff2a2a;
    /* Red override */
    --neon-blue: #550000;
}

body.yuga-kali .glass-panel {
    border-color: rgba(255, 42, 42, 0.3);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.1);
    animation: glitchBorder 4s infinite alternate;
}

body.yuga-kali h1,
body.yuga-kali h2,
body.yuga-kali h3 {
    font-family: 'Courier New', monospace;
    letter-spacing: -1px;
    text-shadow: 2px 0 red, -2px 0 blue;
}

@keyframes glitchBorder {
    0% {
        border-color: rgba(255, 42, 42, 0.3);
    }

    5% {
        border-color: rgba(255, 255, 255, 0.8);
        transform: translate(1px, 0);
    }

    10% {
        border-color: rgba(255, 42, 42, 0.3);
        transform: translate(-1px, 0);
    }

    100% {
        border-color: rgba(255, 42, 42, 0.3);
    }
}

/* SATYA YUGA: Truth, Light, Gold/White */
body.yuga-satya {
    --neon-cyan: #ffd700;
    /* Gold */
    --neon-blue: #ffffff;
    --bg-dark: #0f172a;
    /* Lighter dark */
}

body.yuga-satya .glass-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(20px);
}

body.yuga-satya h1,
body.yuga-satya h2 {
    font-weight: 200;
    letter-spacing: 0.2em;
    color: #ffd700;
    text-transform: uppercase;
}

/* === PAGE TRANSITION === */
.page-enter {
    animation: pageFadeIn 0.4s var(--ease-out-expo) forwards;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Stagger Children (Utility for JS injection or nth-child) */
.stagger-entry>* {
    opacity: 0;
    animation: fadeInUp 0.5s var(--ease-out-expo) forwards;
}

.stagger-entry>*:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-entry>*:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-entry>*:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger-entry>*:nth-child(4) {
    animation-delay: 0.2s;
}

.stagger-entry>*:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger-entry>*:nth-child(6) {
    animation-delay: 0.3s;
}

/* Pulse Glow */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 5px currentColor;
    }

    50% {
        box-shadow: 0 0 15px currentColor, 0 0 30px currentColor;

        50% {
            box-shadow: 0 0 15px currentColor, 0 0 30px currentColor;
        }
    }

    .animate-pulse-glow {
        animation: pulseGlow 3s infinite;
    }

    /* Mascot Pulse Logic */
    .pulsating img {
        filter: drop-shadow(0 0 25px var(--neon-purple));
        transform: scale(1.1);
        transition: all 0.5s ease-in-out;
        animation: rapidPulse 1s infinite alternate !important;
    }

    @keyframes rapidPulse {
        from {
            filter: drop-shadow(0 0 15px currentColor);
            transform: scale(1);
        }

        to {
            filter: drop-shadow(0 0 30px var(--neon-purple));
            transform: scale(1.05);
        }
    }

    /* New: RLHF Reactions */
    @keyframes mascotJoy {

        0%,
        100% {
            transform: translateY(0) scale(1);
        }

        25% {
            transform: translateY(-15px) scale(1.1) rotate(-5deg);
        }

        50% {
            transform: translateY(0) scale(1.05) rotate(0);
        }

        75% {
            transform: translateY(-10px) scale(1.1) rotate(5deg);
        }
    }

    @keyframes mascotConfused {

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

        20% {
            transform: translateX(-10px) rotate(-10deg);
        }

        40% {
            transform: translateX(10px) rotate(10deg);
        }

        60% {
            transform: translateX(-10px) rotate(-10deg);
        }

        80% {
            transform: translateX(10px) rotate(10deg);
        }
    }

    .mascot-joy img {
        animation: mascotJoy 1s ease-in-out infinite !important;
        filter: drop-shadow(0 0 25px var(--neon-gold)) !important;
    }

    .mascot-confused img {
        animation: mascotConfused 0.8s ease-in-out infinite !important;
        filter: drop-shadow(0 0 15px #ff4444) !important;
    }

    /* === CLASS 4: SPECIFIC MODULE ENHANCEMENTS === */

    /* Neural Dock (Sidebar) Specifics */
    .dock-item i {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
    }

    .dock-item:hover i {
        text-shadow: 0 0 15px var(--neon-cyan);
        transform: scale(1.1);
    }

    /* Loka Switcher (Header) */
    #hud-loka-text {
        text-shadow: 0 0 5px currentColor;
    }

    /* Typography Enhancements */
    h1,
    h2,
    h3 {
        font-family: var(--font-heading);
        text-transform: uppercase;
    }

    .text-shadow-cyan {
        text-shadow: 0 0 10px var(--neon-cyan);
    }

    .text-shadow-gold {
        text-shadow: 0 0 10px var(--neon-gold);
    }

    .text-shadow-purple {
        text-shadow: 0 0 10px var(--neon-purple);
    }

    /* === ZETTELKASTEN OVERRIDES === */
    #graph-container {
        background: radial-gradient(circle at center, #1a1a2e 0%, #000 100%) !important;
    }

    /* === MANDELBROT OVERRIDES === */
    #mandelbrot-container {
        box-shadow: inset 0 0 100px #000;
    }

    /* === CUSTOM SCROLLBAR UTILITY === */
    .custom-scrollbar::-webkit-scrollbar {
        width: 4px;
    }

    .custom-scrollbar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }


    /* === LEAFLET DARK MODE OVERRIDES === */
    .leaflet-container {
        background: #0b1221 !important;
        font-family: var(--font-ui) !important;
    }

    .leaflet-popup-content-wrapper,
    .leaflet-popup-tip {
        background: rgba(13, 17, 28, 0.9) !important;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        color: #fff !important;
        border: 1px solid var(--neon-gold);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
        border-radius: 8px !important;
    }

    .leaflet-popup-content {
        margin: 12px !important;
        font-size: 0.9rem;
    }

    .leaflet-popup-content h3 {
        color: var(--neon-gold);
        margin-bottom: 4px;
        font-weight: bold;
        font-family: var(--font-heading);
    }

    .leaflet-popup-content p {
        margin: 0;
        color: #cbd5e1;
    }

    /* Custom Marker Icon Animation */
    .temple-marker-icon {
        filter: drop-shadow(0 0 5px var(--neon-gold));
        transition: all 0.3s ease;
    }


    /* === RADAR SCANNER EFFECT (For Map HUD) === */
    .holo-scanner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(180deg, transparent 50%, rgba(0, 240, 255, 0.1) 50%, rgba(0, 240, 255, 0.3) 100%);
        background-size: 100% 200%;
        animation: radarScan 3s linear infinite;
        pointer-events: none;
        z-index: 10;
    }

    @keyframes radarScan {
        0% {
            background-position: 0% 0%;
        }

        100% {
            background-position: 0% 200%;
        }
    }

    /* GOD RAYS (For Solar Widget) */
    .god-rays {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 200%;
        height: 200%;
        transform: translate(-50%, -50%);
        background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
        animation: pulseRays 5s infinite ease-in-out;
        pointer-events: none;
        z-index: 0;
    }

    @keyframes pulseRays {
        0% {
            opacity: 0.3;
            transform: translate(-50%, -50%) scale(1);
        }

        50% {
            opacity: 0.6;
            transform: translate(-50%, -50%) scale(1.1);
        }

        100% {
            opacity: 0.3;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    /* === SOLAR SYSTEM WIDGET FIX === */
    #solar-system-widget {
        position: relative;
        width: 100%;
        height: 100%;
        min-height: 400px;
        /* Safety Safety: ensure it never collapses to 0 */
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #solar-system-widget canvas {
        display: block;
        width: 100% !important;
        height: 100% !important;
        outline: none;
    }

    /* === CLASS 5: SUTRA MODE (Mobile Responsive - Chakra Beads) === */

    @keyframes breathing {
        0% {
            transform: scale(1);
            box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        }

        50% {
            transform: scale(1.02);
            box-shadow: 0 0 15px var(--glow-color);
        }

        100% {
            transform: scale(1);
            box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        }
    }

    .sutra-card {
        --glow-color: var(--neon-cyan);
        /* Default */
        border-radius: 20px;
        /* Highly rounded, organic bead shape */
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(5, 7, 12, 0.95) 100%);
        box-shadow:
            0 4px 6px rgba(0, 0, 0, 0.3),
            inset 0 1px 1px rgba(255, 255, 255, 0.1);
        position: relative;
        overflow: hidden;
        backdrop-filter: blur(12px);
        transition: all 0.4s var(--ease-out-expo);
    }

    .sutra-card:active {
        transform: scale(0.96);
    }

    /* Chakra Theming */
    .sutra-agent {
        --glow-color: var(--neon-cyan);
    }

    .sutra-agent .sutra-icon {
        background: rgba(0, 240, 255, 0.1);
        color: var(--neon-cyan);
        border: 1px solid rgba(0, 240, 255, 0.2);
    }

    .sutra-story {
        --glow-color: #f472b6;
    }

    .sutra-story .sutra-icon {
        background: rgba(244, 114, 182, 0.1);
        color: #f472b6;
        border: 1px solid rgba(244, 114, 182, 0.2);
    }

    .sutra-wisdom {
        --glow-color: #fbbf24;
    }

    .sutra-wisdom .sutra-icon {
        background: rgba(251, 191, 36, 0.1);
        color: #fbbf24;
        border: 1px solid rgba(251, 191, 36, 0.2);
    }

    .sutra-net {
        --glow-color: #a78bfa;
    }

    .sutra-net .sutra-icon {
        background: rgba(167, 139, 250, 0.1);
        color: #a78bfa;
        border: 1px solid rgba(167, 139, 250, 0.2);
    }

    .sutra-world {
        --glow-color: #34d399;
    }

    .sutra-world .sutra-icon {
        background: rgba(52, 211, 153, 0.1);
        color: #34d399;
        border: 1px solid rgba(52, 211, 153, 0.2);
    }

    /* The "Sutra Thread" (Vertical Alignment Line) */
    .sutra-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 40%;
        background: var(--glow-color);
        box-shadow: 0 0 10px var(--glow-color);
    }


    /* === CLASS 10: AVASTHA THEMES (Consciousness States) === */

    /* SWAPNA (Dreaming) - Fluid, Surreal, Glassy */
    body.avastha-swapna {
        --bg-void: #1a0b2e;
        --bg-panel: rgba(25, 20, 40, 0.4);
        --neon-cyan: #d8b4fe;
        /* Lavender */
        --neon-purple: #f472b6;
        /* Pink */
        --glass-blur: blur(30px);
    }

    body.avastha-swapna .glass-panel {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 0 30px rgba(216, 180, 254, 0.2);
    }

    body.avastha-swapna #dream-overlay {
        opacity: 0.6;
        animation: driftDream 20s infinite alternate;
    }

    @keyframes driftDream {
        0% {
            transform: scale(1);
            filter: hue-rotate(0deg);
        }

        100% {
            transform: scale(1.1);
            filter: hue-rotate(30deg);
        }
    }

    /* SUSHUPTI (Deep Sleep) - Minimal, Dark, Restful */
    body.avastha-sushupti {
        --bg-void: #000000;
        --bg-panel: #050505;
        --neon-cyan: #334155;
        /* Slate */
        --neon-purple: #1e293b;
        --neon-gold: #475569;
    }

    body.avastha-sushupti .glass-panel {
        background: #0a0a0a;
        border: 1px solid #171717;
        box-shadow: none;
        backdrop-filter: none;
    }

    body.avastha-sushupti canvas {
        opacity: 0.2;
        /* Dim stars */
    }

    /* === ECONOMIC DASHBOARD (PHASE 6) === */
    @keyframes marquee {
        0% {
            transform: translateX(100%);
        }

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

    .animate-marquee {
        animation: marquee 20s linear infinite;
    }

    .text-neon-green {
        color: #4ade80;
        text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    }

    .text-shadow-green {
        text-shadow: 0 0 15px rgba(52, 211, 153, 0.6);
    }
}

body.avastha-sushupti .neural-dock,
body.avastha-sushupti #cosmic-command-bar {
    opacity: 0.3;
    /* Fade out UI */
    transition: opacity 0.5s;
}

body.avastha-sushupti .neural-dock:hover,
body.avastha-sushupti #cosmic-command-bar:hover {
    opacity: 1;
}

/* TURIYA (Transcendence) - Pure Light/Gold, Hidden UI */
body.avastha-turiya {
    --bg-void: #0f0502;
    --neon-cyan: #fbbf24;
    /* Amber */
    --neon-purple: #f59e0b;
    --neon-gold: #ffffff;
}

body.avastha-turiya #dream-overlay {
    background: radial-gradient(circle at center, rgba(251, 191, 36, 0.2) 0%, transparent 70%);
    opacity: 1;
    mix-blend-mode: screen;
}

/* Turiya specific overrides often handled by JS (entering visualizer) */

/* === AVASTHA COMPONENT OVERRIDES === */

/* SWAPNA - Dream Cards */
body.avastha-swapna .agent-card {
    background: rgba(216, 180, 254, 0.05);
    border-color: rgba(216, 180, 254, 0.1);
}

body.avastha-swapna .agent-card:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 0 20px rgba(216, 180, 254, 0.2);
}

body.avastha-swapna .agent-avatar {
    color: var(--neon-purple);
    border-color: rgba(244, 114, 182, 0.3);
    background: rgba(244, 114, 182, 0.1);
}

/* SUSHUPTI - Sleep Cards (Minimal) */
body.avastha-sushupti .agent-card {
    background: #0a0a0a;
    border-color: #262626;
    opacity: 0.5;
}

body.avastha-sushupti .agent-card:hover {
    opacity: 1;
    border-color: #404040;
}

body.avastha-sushupti .neural-line {
    color: #525252;
}

/* TURIYA - Golden Cards */
body.avastha-turiya .agent-card {
    border-color: rgba(251, 191, 36, 0.2);
}

body.avastha-turiya .agent-card:hover {
    border-color: var(--neon-gold);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.3);
}

/* === RIBBON ANIMATION === */
@keyframes floatWatermark {

    0%,
    100% {
        transform: translate(-50%, 0);
        opacity: 0.2;
    }

    50% {
        transform: translate(-50%, -10px);
        opacity: 0.4;
        text-shadow: 0 0 10px var(--neon-cyan);
    }
}

@keyframes floatHeader {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.9;
    }

    50% {
        transform: translateY(-3px);
        opacity: 1;
        text-shadow: 0 0 15px var(--neon-cyan);
    }
}

.animate-ribbon {
    /* Updated to stick to header physics by default or creating specific class */
    animation: floatHeader 4s ease-in-out infinite;
}

.animate-watermark {
    animation: floatWatermark 4s ease-in-out infinite;
}

/* === UTILITY: GRID BACKGROUND === */
/* === NEURAL LINK LOGGING === */
.neural-line {
    font-family: var(--font-code);
    font-size: 0.75rem;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.neural-line.system-info {
    color: #94a3b8;
}

.neural-line.system-success {
    color: #4ade80;
}

.neural-line.system-warn {
    color: #fbbf24;
}

.neural-line.system-error {
    color: #f87171;
}

.log-tag {
    font-weight: bold;
    margin-right: 0.5rem;
}

.log-tag.INFO {
    color: #60a5fa;
}

.log-tag.WARN {
    color: #fbbf24;
}

.log-tag.ERROR {
    color: #f87171;
}

.log-tag.SUCCESS {
    color: #4ade80;
}

.log-tag.THOUGHT {
    color: #d8b4fe;
}

/* Filter Controls */
.filter-btn {
    font-size: 0.6rem;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    color: #64748b;
    transition: all 0.2s;
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

/* === PHASE 22: THE COSMIC INTERFACE (Story Arcs) === */

/* Neon Text Variants */
.neon-text-amber {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.neon-text-emerald {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.neon-text-cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

/* Sacred Grid Background */
.sacred-grid {
    background-color: transparent;
    opacity: 0.1;
    background-image: radial-gradient(#f59e0b 0.5px, transparent 0.5px), radial-gradient(#f59e0b 0.5px, #0f172a 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

/* Hologram Card (Interactive) */
.hologram-card {
    background: rgba(16, 20, 30, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.1);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    transition: all 0.4s var(--ease-elastic);
    position: relative;
    overflow: hidden;
}

.hologram-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(0, 243, 255, 0.03),
            transparent);
    transform: rotate(45deg);
    animation: hologramSweep 6s linear infinite;
    pointer-events: none;
}

.hologram-card:hover {
    border-color: rgba(0, 243, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    transform: translateY(-2px) scale(1.01);
    background: rgba(16, 20, 30, 0.6);
}

.hologram-card.active {
    border-color: #f59e0b;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.1);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
}

@keyframes hologramSweep {
    0% {
        transform: translateY(-30%) rotate(45deg);
    }

    100% {
        transform: translateY(30%) rotate(45deg);
    }
}

/* Summoning Animation (Loading) */
@keyframes summonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.summoning-circle {
    animation: summonPulse 2s infinite;
    border: 2px solid #f59e0b;
    border-radius: 50%;
}

/* Mermaid Diagram Styling */
.mermaid .node rect,
.mermaid .node circle,
.mermaid .node polygon {
    fill: rgba(30, 41, 59, 0.8) !important;
    stroke: var(--neon-cyan) !important;
    stroke-width: 1.5px !important;
}

.mermaid .node .label {
    color: #e2e8f0 !important;
    font-family: var(--font-ui) !important;
}

.mermaid .edgePath .path {
    stroke: rgba(255, 255, 255, 0.3) !important;
    stroke-width: 2px !important;
}
/* === CLASS 12: LOKA THEMES (Cosmic Realms) === */

/* BHUR LOKA (Earth) - Grounded, Nature, Life */
body.loka-bhur {
    --bg-void: #0a100d;
    --neon-cyan: #22c55e; /* Green */
    --neon-purple: #3b82f6; /* Blue */
    --glass-surface: linear-gradient(145deg, rgba(10, 20, 15, 0.8) 0%, rgba(5, 10, 5, 0.95) 100%);
}

/* BHUVAR LOKA (Atmosphere) - Airy, ethereal */
body.loka-bhuvar {
    --bg-void: #0f172a;
    --neon-cyan: #bae6fd; /* Light Blue */
    --neon-purple: #e0f2fe; /* White Blue */
}

/* SWARGA LOKA (Heaven) - Divine, Pleasure, Gold */
body.loka-swarga {
    --bg-void: #1e1b4b;
    --neon-cyan: #ffd700; /* Gold */
    --neon-purple: #c084fc; /* Royal Purple */
    --glass-border: 1px solid rgba(255, 215, 0, 0.3);
}

/* MAHAR LOKA (Sages) - Wisdom, Silver, Clarity */
body.loka-mahar {
    --bg-void: #111827;
    --neon-cyan: #e5e7eb; /* Silver */
    --neon-purple: #9ca3af; /* Grey */
    --font-heading: 'Cinzel Decorative', serif;
}

/* JANA LOKA (Creators) - Creative Fire, Orange */
body.loka-jana {
    --bg-void: #270e05;
    --neon-cyan: #fb923c; /* Orange */
    --neon-purple: #fdba74; /* Light Orange */
}

/* TAPO LOKA (Ascetics) - Austerity, Fire, Intense */
body.loka-tapo {
    --bg-void: #1f0505;
    --neon-cyan: #ef4444; /* Red Fire */
    --neon-purple: #dc2626; /* Deep Red */
    --glass-blur: blur(5px); /* Sharp */
}

/* SATYA LOKA (Truth) - Absolute, Pure Light */
body.loka-satya {
    --bg-void: #ffffff; /* Rare Light Mode */
    --bg-panel: #f8fafc;
    --neon-cyan: #0ea5e9;
    --neon-purple: #6366f1;
    color: #0f172a; /* Dark text */
    --glass-surface: rgba(255, 255, 255, 0.8);
}
body.loka-satya h1, body.loka-satya h2 {
    color: #0f172a;
}
