/* ==========================================================================
   meshbook — RETRO theme tokens
   --------------------------------------------------------------------------
   CRT amber terminal vibe. Near-black background, amber/phosphor text, all
   fonts forced to monospace, subtle scanline overlay on body. Unashamedly
   novelty but genuinely usable — works great for activity-log viewing and
   late-night dashboard watching.
   ========================================================================== */

:root[data-theme="retro"] {
    /* BOTH sans and mono map to JetBrains Mono — the whole UI goes monospace
       on this theme. That's the biggest visual shift the theme makes and
       it's what sells the CRT feel. */
    --nv-font-sans:   'JetBrains Mono', ui-monospace, monospace;
    --nv-font-mono:   'JetBrains Mono', ui-monospace, monospace;

    /* Surfaces */
    --nv-bg:               #0a0600;
    --nv-bg-image:         radial-gradient(
                               900px 600px at 50% 50%,
                               rgba(255, 176, 0, 0.08),
                               transparent 70%
                           );
    --nv-bg-elevated:      #120b00;
    --nv-surface:          rgba(26, 16, 0, 0.88);
    --nv-surface-solid:    #1a1000;
    --nv-surface-hover:    rgba(45, 28, 0, 0.92);
    --nv-surface-active:   rgba(61, 40, 0, 0.98);
    --nv-border:           rgba(255, 176, 0, 0.18);
    --nv-border-strong:    rgba(255, 176, 0, 0.38);

    /* Amber phosphor text */
    --nv-text:             #ffb000;
    --nv-text-secondary:   #cc8a00;
    --nv-text-tertiary:    #996700;
    --nv-text-muted:       #664500;
    --nv-text-inverse:     #0a0600;

    /* Accents — within the amber family + accent green for "healthy" states */
    --nv-accent:           #ffcc00;
    --nv-accent-hover:     #ffd633;
    --nv-accent-strong:    #e6b800;
    --nv-accent-2:         #33ff99;    /* phosphor green */
    --nv-accent-3:         #ff6b35;    /* warning orange */
    --nv-accent-4:         #ffb000;

    /* Semantic */
    --nv-success:          #33ff99;
    --nv-success-bg:       rgba(51, 255, 153, 0.14);
    --nv-warning:          #ffcc00;
    --nv-warning-bg:       rgba(255, 204, 0, 0.18);
    --nv-danger:           #ff3030;
    --nv-danger-bg:        rgba(255, 48, 48, 0.16);
    --nv-info:             #33ccff;
    --nv-info-bg:          rgba(51, 204, 255, 0.14);

    --nv-gradient-accent:  linear-gradient(135deg, #ffcc00 0%, #ff6b35 100%);

    --nv-glass-blur:       10px;
    --nv-shadow-window:    0 25px 60px -20px rgba(0, 0, 0, 0.90),
                           0 0 1px rgba(255, 176, 0, 0.18);
    --nv-shadow-card:      0 10px 30px -12px rgba(0, 0, 0, 0.75),
                           0 0 1px rgba(255, 176, 0, 0.12);
    --nv-glow-accent:      0 0 20px rgba(255, 204, 0, 0.45),
                           0 0 42px rgba(255, 176, 0, 0.20);
    --nv-glow-accent-2:    0 0 18px rgba(51, 255, 153, 0.40);

    --nv-ease-spring:      cubic-bezier(0.16, 1, 0.3, 1);
    --nv-duration-fast:    0.12s;
    --nv-duration-medium:  0.22s;
    --nv-duration-slow:    0.45s;

    --nv-scrollbar-thumb:       rgba(255, 176, 0, 0.28);
    --nv-scrollbar-thumb-hover: rgba(255, 176, 0, 0.48);

    --nv-selection-bg:     rgba(255, 204, 0, 0.32);
    --nv-selection-fg:     #0a0600;

    /* Sharper corners — retro CRTs and early GUIs didn't have soft radii. */
    --nv-radius-sm:        0.125rem;
    --nv-radius-md:        0.25rem;
    --nv-radius-lg:        0.375rem;
    --nv-radius-xl:        0.5rem;
    --nv-radius-pill:      9999px;
}

/* ---- Scanline overlay ----
   Draws faint horizontal lines over the whole body using a fixed
   positioned pseudo-element. Pointer-events: none so it never blocks
   interaction. Low enough z-index that modals still float above.         */
html[data-theme="retro"] body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 176, 0, 0.035) 0px,
        rgba(255, 176, 0, 0.035) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: screen;
}

/* Subtle text glow on retro headings — a soft amber halo. */
html[data-theme="retro"] h1,
html[data-theme="retro"] h2,
html[data-theme="retro"] .nv-gradient-text {
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.45);
}
