/* ═══════════════════════════════════════════════════════════════════════════
   FUZZY — Broadcast Control Room
   A video shader pipeline that feels like sitting in front of a 1987
   broadcast control desk: VU meters, CRT warmth, chunky hardware switches
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   FONTS — IBM Plex + Orbitron for that control room feel
   ───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* ─────────────────────────────────────────────────────────────────────────────
   CUSTOM PROPERTIES
   ───────────────────────────────────────────────────────────────────────────── */

:root {
    /* CRT-inspired palette - warm phosphor glow */
    --bg-void: #08080a;
    --bg-chassis: #101014;
    --bg-panel: #16161c;
    --bg-inset: #0c0c0e;
    --bg-raised: #1c1c24;
    --bg-hover: #22222c;

    /* Text hierarchy */
    --text-bright: #f0f0f4;
    --text-primary: #c8c8d0;
    --text-secondary: #787888;
    --text-muted: #484858;
    --text-dim: #2c2c38;

    /* Signal colors - phosphor-inspired */
    --signal-red: #ff3b4e;
    --signal-red-dim: #aa2838;
    --signal-green: #2eff6e;
    --signal-green-dim: #1aa848;
    --signal-blue: #38c8ff;
    --signal-blue-dim: #2088aa;
    --signal-amber: #ffb830;
    --signal-amber-dim: #aa7820;
    --signal-white: #f8f8ff;

    /* VU meter gradient */
    --vu-green: #2eff6e;
    --vu-yellow: #ffdd30;
    --vu-red: #ff3b4e;

    /* Semantic colors */
    --warp-signal: #a855f7;
    --warp-bg: rgba(168, 85, 247, 0.08);
    --color-signal: #38c8ff;
    --color-bg: rgba(56, 200, 255, 0.08);

    /* Hardware accents */
    --chrome: linear-gradient(180deg, #888 0%, #444 50%, #666 100%);
    --brushed-metal: linear-gradient(90deg, #333 0%, #444 50%, #333 100%);
    --led-glow-red: 0 0 12px rgba(255, 59, 78, 0.6), 0 0 4px rgba(255, 59, 78, 0.9);
    --led-glow-green: 0 0 12px rgba(46, 255, 110, 0.5), 0 0 4px rgba(46, 255, 110, 0.8);
    --led-glow-blue: 0 0 12px rgba(56, 200, 255, 0.5), 0 0 4px rgba(56, 200, 255, 0.8);
    --led-glow-amber: 0 0 12px rgba(255, 184, 48, 0.5), 0 0 4px rgba(255, 184, 48, 0.8);

    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Spacing - chunky hardware feel */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Borders - hardware bevels */
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 14px;

    /* Panel styling */
    --panel-bevel:
        inset 0 1px 0 rgba(255,255,255,0.04),
        inset 0 -1px 0 rgba(0,0,0,0.3),
        0 2px 8px rgba(0,0,0,0.4);
    --inset-bevel:
        inset 0 2px 4px rgba(0,0,0,0.5),
        inset 0 0 0 1px rgba(0,0,0,0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BASE STYLES & RESET
   ───────────────────────────────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    background: var(--bg-void);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* CRT phosphor scan effect (disabled) */
/*
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 1px,
        rgba(0, 0, 0, 0.15) 1px,
        rgba(0, 0, 0, 0.15) 2px
    );
    z-index: 10000;
}
*/

/* Subtle vignette for CRT edge falloff */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 9999;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MAIN LAYOUT - Control Desk Configuration
   ───────────────────────────────────────────────────────────────────────────── */

.app-container {
    display: grid;
    grid-template-columns: 200px 1fr 480px;
    gap: 0;
    min-height: 100vh;
    background: var(--bg-chassis);
}

/* Library panel - Effects library on the left */
.library-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-chassis);
    border-right: 2px solid #000;
    height: 100vh;
    overflow: hidden;
}

/* Center panel - Applied effects */
.center-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.center-panel .pipeline {
    flex: 1;
    min-height: 0;
}

/* Right panel - Video monitors */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: linear-gradient(180deg, var(--bg-void) 0%, #0a0a0e 100%);
    min-width: 0;
    border-left: 2px solid #000;
    height: 100vh;
    overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────────────────────
   VIDEO CONTAINER & PREVIEW - Broadcast Monitors
   ───────────────────────────────────────────────────────────────────────────── */

.video-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    width: 100%;
    height: 100%;
    min-height: 0;
}

.video-box {
    position: relative;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex: 1;
    min-height: 0;
    max-height: calc(50vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;

    /* Monitor bezel effect */
    border: 3px solid #1a1a20;
    box-shadow:
        inset 0 0 20px rgba(0,0,0,0.8),
        0 0 0 1px #000,
        0 2px 10px rgba(0,0,0,0.6);
}

/* Monitor power LED */
.video-box::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: 10px;
    width: 5px;
    height: 5px;
    background: var(--signal-green);
    border-radius: 50%;
    box-shadow: var(--led-glow-green);
    z-index: 5;
}

/* Empty state - static noise pattern (disabled) */
/*
.video-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}
*/

.video-container .video-element {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.video-container .gl-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.gl-canvas {
    background-color: transparent;
    cursor: pointer;
}

.gl-canvas-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.snapshot-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.1s ease;
    z-index: 10;
}

.gl-canvas-wrapper:hover .snapshot-btn {
    opacity: 1;
}

.snapshot-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.snapshot-btn:active {
    background: rgba(0, 0, 0, 0.9);
}

.video-element {
    cursor: pointer;
    transform: scaleX(-1);
}

/* Monitor label - broadcast style */
.video-box-label {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    font-family: var(--font-display);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--signal-amber);
    background: rgba(0, 0, 0, 0.8);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 184, 48, 0.3);
    z-index: 4;
    text-shadow: 0 0 8px rgba(255, 184, 48, 0.5);
}

/* ─────────────────────────────────────────────────────────────────────────────
   VIDEO SCRUBBER - Transport Controls
   ───────────────────────────────────────────────────────────────────────────── */

.video-scrubber {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-panel);
    border-radius: var(--radius-md);
    box-shadow: var(--panel-bevel);
    border: 1px solid rgba(255,255,255,0.03);
}

.play-pause-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(180deg, #2a2a34 0%, #1a1a22 100%);
    color: var(--signal-green);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -2px 0 rgba(0,0,0,0.3),
        0 2px 4px rgba(0,0,0,0.3);
    flex-shrink: 0;
    text-shadow: var(--led-glow-green);
}

.play-pause-btn:hover {
    background: linear-gradient(180deg, #323240 0%, #222230 100%);
}

.play-pause-btn:active {
    background: linear-gradient(180deg, #1a1a22 0%, #2a2a34 100%);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.4),
        0 1px 0 rgba(255,255,255,0.05);
}

.play-pause-btn:disabled {
    background: var(--bg-inset);
    color: var(--text-dim);
    box-shadow: var(--inset-bevel);
    cursor: not-allowed;
    text-shadow: none;
}

.mute-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(180deg, #2a2a34 0%, #1a1a22 100%);
    color: var(--signal-amber);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -2px 0 rgba(0,0,0,0.3),
        0 2px 4px rgba(0,0,0,0.3);
    flex-shrink: 0;
    text-shadow: var(--led-glow-amber);
}

.mute-btn:hover {
    background: linear-gradient(180deg, #323240 0%, #222230 100%);
}

.mute-btn:active {
    background: linear-gradient(180deg, #1a1a22 0%, #2a2a34 100%);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.4),
        0 1px 0 rgba(255,255,255,0.05);
}

.mute-btn.muted {
    color: var(--text-dim);
    text-shadow: none;
}

.mute-btn:disabled {
    background: var(--bg-inset);
    color: var(--text-dim);
    box-shadow: var(--inset-bevel);
    cursor: not-allowed;
    text-shadow: none;
}

.time-display {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    color: var(--signal-amber);
    min-width: 44px;
    text-align: center;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(255, 184, 48, 0.4);
}

.scrubber-hint {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.6;
    text-align: right;
    line-height: 1.3;
}

/* Custom range slider - VU meter style */
.scrubber-slider {
    flex: 1;
    height: 8px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-inset);
    border-radius: 4px;
    outline: none;
    box-shadow: var(--inset-bevel);
}

.scrubber-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(180deg, #eee 0%, #888 100%);
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #333;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.5);
}

.scrubber-slider::-webkit-slider-thumb:hover {
    background: linear-gradient(180deg, #fff 0%, #aaa 100%);
}

.scrubber-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(180deg, #eee 0%, #888 100%);
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #333;
}

.scrubber-slider:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Trim scrubber track */
.scrubber-track {
    flex: 1;
    min-width: 150px;
    height: 24px;
    position: relative;
    background: var(--bg-inset);
    border-radius: 6px;
    cursor: pointer;
    box-shadow: var(--inset-bevel);
    overflow: hidden;
}

.scrubber-dimmed {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.scrubber-active {
    position: absolute;
    top: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(56, 200, 255, 0.3) 0%,
        rgba(56, 200, 255, 0.15) 100%
    );
    border-top: 2px solid rgba(56, 200, 255, 0.6);
    border-bottom: 2px solid rgba(56, 200, 255, 0.6);
    pointer-events: none;
}

.trim-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12px;
    background: linear-gradient(180deg, #eee 0%, #888 100%);
    cursor: ew-resize;
    z-index: 2;
    border-radius: 3px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: background 0.1s ease;
}

/* Larger hit area for trim handles */
.trim-handle::before {
    content: '';
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 24px;
}

.trim-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1px;
}

.trim-handle:hover,
.trim-handle.dragging {
    background: linear-gradient(180deg, #fff 0%, #aaa 100%);
}

.trim-handle.trim-start {
    transform: translateX(-100%);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.trim-handle.trim-start::before {
    left: -12px;
}

.trim-handle.trim-end {
    transform: translateX(0);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.trim-handle.trim-end::before {
    right: -12px;
}

/* Larger hit areas when handles are at default edge positions */
.trim-handle.trim-start.at-edge::before {
    width: 36px;
    left: -6px;
}

.trim-handle.trim-end.at-edge::before {
    width: 36px;
    right: -6px;
}

.scrubber-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #fff;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 3;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.scrubber-playhead::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PIPELINE PANEL - Equipment Rack
   ───────────────────────────────────────────────────────────────────────────── */

.pipeline {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-panel);
    overflow: hidden;
}

/* Brand header - Equipment label plate */
.pipeline-brand {
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    background: linear-gradient(180deg, var(--bg-raised) 0%, var(--bg-panel) 100%);
    border-bottom: 1px solid rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--signal-white) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--signal-amber);
    text-shadow: 0 0 8px rgba(255, 184, 48, 0.3);
}

/* VU meter accent strip */
.pipeline::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--vu-green) 0%,
        var(--vu-green) 60%,
        var(--vu-yellow) 60%,
        var(--vu-yellow) 80%,
        var(--vu-red) 80%,
        var(--vu-red) 100%
    );
    box-shadow: 0 0 12px rgba(46, 255, 110, 0.3);
}

.pipeline-header {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-chassis);
    border-bottom: 2px solid #000;
    flex-wrap: wrap;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.03);
}

/* ─────────────────────────────────────────────────────────────────────────────
   EFFECTS LIBRARY - Left sidebar
   ───────────────────────────────────────────────────────────────────────────── */

.effects-library {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.effects-library-header {
    padding: var(--space-md);
    background: linear-gradient(180deg, var(--bg-raised) 0%, var(--bg-panel) 100%);
    border-bottom: 1px solid rgba(0,0,0,0.5);
}

.effects-library-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-bright);
}

.effects-library-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Custom scrollbar for effects library */
.effects-library-list::-webkit-scrollbar {
    width: 6px;
}

.effects-library-list::-webkit-scrollbar-track {
    background: var(--bg-inset);
}

.effects-library-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #444 0%, #333 100%);
    border-radius: 3px;
}

.effects-library-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #555 0%, #444 100%);
}

.effects-library-list .preset-category {
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

.effects-library-list .preset-category:last-child {
    border-bottom: none;
}

.effects-library-list .preset-option {
    padding: var(--space-sm) var(--space-md);
}

.effects-library-list .preset-option:hover {
    background: var(--bg-hover);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTONS - Hardware Switches
   ───────────────────────────────────────────────────────────────────────────── */

button {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.1s ease;
}

/* Base hardware button style */
.upload-button,
.webcam-button,
.export-button,
.record-button {
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
}

.upload-button {
    background: linear-gradient(180deg, #4a3a60 0%, #2a2238 100%);
    color: var(--warp-signal);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.upload-button:hover {
    background: linear-gradient(180deg, #5a4a70 0%, #3a3248 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(168, 85, 247, 0.3),
        0 2px 4px rgba(0,0,0,0.3);
}

.upload-button:active {
    background: linear-gradient(180deg, #2a2238 0%, #4a3a60 100%);
}

.webcam-button {
    min-width: 105px;
    text-align: center;
    background: linear-gradient(180deg, #4a4030 0%, #2a2820 100%);
    color: var(--signal-amber);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 184, 48, 0.3);
}

.webcam-button:hover {
    background: linear-gradient(180deg, #5a5040 0%, #3a3830 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(255, 184, 48, 0.3),
        0 2px 4px rgba(0,0,0,0.3);
}

.webcam-button.active {
    /* Keep amber color when active - just add glow */
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 16px rgba(255, 184, 48, 0.4),
        0 2px 4px rgba(0,0,0,0.3);
}

.export-button {
    min-width: 70px;
    background: linear-gradient(180deg, #4a2028 0%, #2a1018 100%);
    color: var(--signal-red);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 59, 78, 0.3);
}

.export-button:hover {
    background: linear-gradient(180deg, #5a3038 0%, #3a2028 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(255, 59, 78, 0.3),
        0 2px 4px rgba(0,0,0,0.3);
}

.export-button:disabled {
    background: var(--bg-inset);
    color: var(--text-dim);
    border-color: transparent;
    box-shadow: var(--inset-bevel);
    cursor: not-allowed;
}

.record-button {
    min-width: 105px;
    text-align: center;
    background: linear-gradient(180deg, #4a2028 0%, #2a1018 100%);
    color: var(--signal-red);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 59, 78, 0.3);
}

.record-button:hover {
    background: linear-gradient(180deg, #5a3038 0%, #3a2028 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(255, 59, 78, 0.3),
        0 2px 4px rgba(0,0,0,0.3);
}

.record-button.recording {
    animation: record-pulse 1s ease-in-out infinite;
}

@keyframes record-pulse {
    0%, 100% {
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.1),
            inset 0 -2px 0 rgba(0,0,0,0.2),
            0 0 8px rgba(255, 59, 78, 0.4),
            0 2px 4px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.1),
            inset 0 -2px 0 rgba(0,0,0,0.2),
            0 0 24px rgba(255, 59, 78, 0.7),
            0 2px 4px rgba(0,0,0,0.3);
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   PROGRESS BAR - VU Meter Style
   ───────────────────────────────────────────────────────────────────────────── */

.progress-bar {
    width: 100%;
    height: 8px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-inset);
    border: none;
    display: block;
    box-shadow: var(--inset-bevel);
}

.progress-bar::-webkit-progress-bar {
    background: var(--bg-inset);
}

.progress-bar::-webkit-progress-value {
    background: linear-gradient(
        90deg,
        var(--vu-green) 0%,
        var(--vu-green) 60%,
        var(--vu-yellow) 80%,
        var(--vu-red) 100%
    );
    box-shadow: 0 0 8px rgba(46, 255, 110, 0.4);
}

.progress-bar::-moz-progress-bar {
    background: linear-gradient(
        90deg,
        var(--vu-green) 0%,
        var(--vu-green) 60%,
        var(--vu-yellow) 80%,
        var(--vu-red) 100%
    );
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRESET PICKER - Channel Selector
   ───────────────────────────────────────────────────────────────────────────── */

.preset-picker {
    position: relative;
    flex: 1;
    min-width: 130px;
}

.add-effect-btn {
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(180deg, #303040 0%, #202030 100%);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
}

.add-effect-btn:hover {
    background: linear-gradient(180deg, #404050 0%, #303040 100%);
    border-color: var(--signal-blue);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(56, 200, 255, 0.2),
        0 2px 4px rgba(0,0,0,0.3);
}

.preset-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0,0,0,0.5);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.preset-category {
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

.preset-category:last-child {
    border-bottom: none;
}

.preset-category-header {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    background: var(--bg-chassis);
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

.preset-category.warp .preset-category-header {
    color: var(--warp-signal);
    background: var(--warp-bg);
    border-left: 3px solid var(--warp-signal);
}

.preset-category.uv-to-color .preset-category-header {
    color: var(--signal-green);
    background: rgba(46, 255, 110, 0.1);
    border-left: 3px solid var(--signal-green);
}

.preset-category.color .preset-category-header {
    color: var(--color-signal);
    background: var(--color-bg);
    border-left: 3px solid var(--color-signal);
}

.preset-option {
    display: block;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s ease;
}

.preset-option:hover {
    background: var(--bg-hover);
}

.preset-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-bright);
    letter-spacing: 0.02em;
}

.preset-desc {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PIPELINE EFFECTS LIST - Module Bay
   ───────────────────────────────────────────────────────────────────────────── */

.pipeline-effects {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 39px,
            rgba(255,255,255,0.02) 39px,
            rgba(255,255,255,0.02) 40px
        );
}

/* Custom scrollbar - brushed metal */
.pipeline-effects::-webkit-scrollbar {
    width: 8px;
}

.pipeline-effects::-webkit-scrollbar-track {
    background: var(--bg-inset);
    border-radius: 4px;
}

.pipeline-effects::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #555 0%, #333 100%);
    border-radius: 4px;
    border: 1px solid #222;
}

.pipeline-effects::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #666 0%, #444 100%);
}

.pipeline-empty {
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg-inset);
    border-radius: var(--radius-md);
    box-shadow: var(--inset-bevel);
}

.pipeline-empty::before {
    content: '◇';
    display: block;
    font-size: 28px;
    margin-bottom: var(--space-md);
    color: var(--text-dim);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PIPELINE ITEM (Effect Card) - Hardware Module
   ───────────────────────────────────────────────────────────────────────────── */

.pipeline-item {
    background: var(--bg-raised);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--panel-bevel);
    border: 1px solid rgba(255,255,255,0.03);
    flex-shrink: 0;
}

/* Module type indicator - LED strip */
.pipeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--text-muted);
}

.pipeline-item.effect-type-uv::before {
    background: var(--warp-signal);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.pipeline-item.effect-type-uv-to-color::before {
    background: var(--signal-green);
    box-shadow: 0 0 8px rgba(46, 255, 110, 0.4);
}

.pipeline-item.effect-type-color::before {
    background: var(--color-signal);
    box-shadow: 0 0 8px rgba(56, 200, 255, 0.4);
}

/* Separator between effect categories */
.pipeline-separator {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.08) 80%,
        transparent 100%
    );
    margin: var(--space-xs) 0;
}

.pipeline-item:hover {
    background: var(--bg-hover);
    border-color: rgba(255,255,255,0.06);
}

.pipeline-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.pipeline-item.drag-over {
    border-color: var(--signal-blue);
    box-shadow:
        var(--panel-bevel),
        0 0 0 1px var(--signal-blue),
        0 0 16px rgba(56, 200, 255, 0.2);
}

.pipeline-item.disabled {
    opacity: 0.4;
}

.pipeline-item.disabled::before {
    background: var(--text-dim);
    box-shadow: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PIPELINE ITEM HEADER
   ───────────────────────────────────────────────────────────────────────────── */

.pipeline-item-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.drag-handle {
    cursor: grab;
    color: var(--text-dim);
    user-select: none;
    font-size: 14px;
    padding: 2px;
    transition: color 0.1s ease;
}

.drag-handle:hover {
    color: var(--text-secondary);
}

.drag-handle:active {
    cursor: grabbing;
}

.effect-name {
    flex: 1;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-bright);
    letter-spacing: 0.03em;
}

.effect-tag {
    font-family: var(--font-display);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.effect-tag.uv {
    background: var(--warp-bg);
    color: var(--warp-signal);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.effect-tag.uv-to-color {
    background: rgba(46, 255, 110, 0.1);
    color: var(--signal-green);
    border: 1px solid rgba(46, 255, 110, 0.3);
}

.effect-tag.color {
    background: var(--color-bg);
    color: var(--color-signal);
    border: 1px solid rgba(56, 200, 255, 0.3);
}

/* Toggle checkbox - Hardware switch */
.enable-toggle {
    display: flex;
    align-items: center;
}

.enable-toggle input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--bg-inset);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    box-shadow: var(--inset-bevel);
    transition: all 0.1s ease;
    margin: 0;
}

.enable-toggle input[type="checkbox"]:checked {
    background: var(--signal-green);
    box-shadow:
        var(--inset-bevel),
        var(--led-glow-green);
}

.enable-toggle input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 12px;
    font-weight: bold;
}

.enable-toggle input[type="checkbox"]:hover {
    background: var(--bg-hover);
}

.enable-toggle input[type="checkbox"]:checked:hover {
    background: var(--signal-green);
}

/* Small icon buttons - Panel controls */
.reset-btn,
.remove-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    background: var(--bg-inset);
    box-shadow: var(--inset-bevel);
}

.reset-btn {
    color: var(--text-secondary);
}

.reset-btn:hover {
    background: var(--bg-hover);
    color: var(--signal-amber);
    box-shadow:
        var(--inset-bevel),
        0 0 8px rgba(255, 184, 48, 0.2);
}

.remove-btn {
    color: var(--text-muted);
}

.remove-btn:hover {
    background: rgba(255, 59, 78, 0.15);
    color: var(--signal-red);
    box-shadow:
        var(--inset-bevel),
        0 0 8px rgba(255, 59, 78, 0.2);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PARAMETER CONTROLS - Faders and Knobs
   ───────────────────────────────────────────────────────────────────────────── */

.pipeline-item-params {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.04);
}

.param-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.param-row:last-child {
    margin-bottom: 0;
}

.param-row label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    min-width: 90px;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

/* Custom range slider - Fader style */
.param-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-inset);
    border-radius: 3px;
    outline: none;
    box-shadow: var(--inset-bevel);
}

.param-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(180deg, #ddd 0%, #888 100%);
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid #333;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.param-row input[type="range"]::-webkit-slider-thumb:hover {
    background: linear-gradient(180deg, #fff 0%, #aaa 100%);
}

.param-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(180deg, #ddd 0%, #888 100%);
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid #333;
}

.param-value {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    color: var(--signal-amber);
    min-width: 48px;
    text-align: right;
    letter-spacing: 0.05em;
    text-shadow: 0 0 6px rgba(255, 184, 48, 0.3);
    cursor: pointer;
}

.param-value:hover {
    text-decoration: underline;
}

.param-value-input {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    color: var(--signal-amber);
    background: var(--bg-inset);
    border: 1px solid var(--signal-amber);
    border-radius: var(--radius-sm);
    width: 56px;
    padding: 2px 4px;
    text-align: right;
    letter-spacing: 0.05em;
    outline: none;
    box-shadow: 0 0 6px rgba(255, 184, 48, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CODE TOGGLE & EDITOR - Terminal Interface
   ───────────────────────────────────────────────────────────────────────────── */

.toggle-code-btn {
    margin-top: var(--space-sm);
    padding: 6px 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    transition: all 0.1s ease;
}

.toggle-code-btn:hover {
    background: var(--bg-inset);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-secondary);
}

.pipeline-item-code {
    margin-top: var(--space-sm);
}

/* Code Editor - Terminal style */
.code-editor {
    position: relative;
    width: 100%;
    min-height: 80px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #0a0a0c;
}

.code-editor.has-error {
    border-color: var(--signal-red);
    box-shadow: 0 0 8px rgba(255, 59, 78, 0.2);
}

.code-editor-highlight,
.code-editor-textarea {
    margin: 0;
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    tab-size: 4;
}

.code-editor-highlight {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: #0a0a0c;
    overflow: auto;
}

.code-editor-highlight code {
    display: block;
    color: var(--text-secondary);
}

.code-editor-textarea {
    position: relative;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    color: transparent;
    caret-color: var(--signal-green);
    resize: none;
    outline: none;
    overflow: auto;
}

.code-editor-textarea::selection {
    background: rgba(56, 200, 255, 0.2);
}

/* Syntax highlighting tokens - Phosphor colors */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #4a4a58;
    font-style: italic;
}

.token.punctuation {
    color: var(--text-muted);
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
    color: var(--signal-amber);
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin {
    color: var(--signal-green);
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.token.variable {
    color: var(--signal-blue);
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: var(--warp-signal);
}

.token.function,
.token.class-name {
    color: var(--signal-blue);
}

.token.regex,
.token.important {
    color: var(--signal-red);
}

/* Compile error - Warning display */
.compile-error {
    color: var(--signal-red);
    background: rgba(255, 59, 78, 0.08);
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 10px;
    white-space: pre-wrap;
    border-left: 3px solid var(--signal-red);
    box-shadow: 0 0 8px rgba(255, 59, 78, 0.1);
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE ADJUSTMENTS
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .app-container {
        grid-template-columns: 180px 1fr 380px;
    }
}

@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }

    .library-panel {
        height: auto;
        max-height: 200px;
        border-right: none;
        border-bottom: 2px solid #000;
    }

    .center-panel {
        height: auto;
        max-height: 300px;
        border-bottom: 2px solid #000;
    }

    .right-panel {
        height: auto;
        min-height: 300px;
        border-left: none;
    }

    .pipeline {
        max-height: none;
    }

    .effects-library-list {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-xs);
        padding: var(--space-sm);
    }

    .effects-library-list .preset-category {
        flex: 1;
        min-width: 150px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   LEGACY/UNUSED (kept for compatibility)
   ───────────────────────────────────────────────────────────────────────────── */

.label {
    display: block;
    margin-bottom: var(--space-sm);
}

.shader-textarea {
    width: 100%;
    height: 300px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.shader-label {
    display: block;
    margin-bottom: var(--space-sm);
    margin-top: var(--space-lg);
}

.video-container .video-scrubber {
    width: 100%;
    margin: 0;
}

.effect-category {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-inset);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

/* ─────────────────────────────────────────────────────────────────────────────
   NOTIFICATION TOAST
   ───────────────────────────────────────────────────────────────────────────── */

.notification {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    color: var(--signal-amber);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 12px;
    border: 1px solid rgba(255, 184, 48, 0.3);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.5),
        0 0 12px rgba(255, 184, 48, 0.2);
    z-index: 1000;
    animation: notification-fade-in 0.2s ease-out;
}

@keyframes notification-fade-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   COMBO CONTROLS - Preset Selector
   ───────────────────────────────────────────────────────────────────────────── */

.combo-controls {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.combo-select {
    padding: 8px 28px 8px 12px;
    background: var(--bg-inset);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 11px;
    cursor: pointer;
    min-width: 120px;
    box-shadow: var(--inset-bevel);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.combo-select:hover {
    border-color: rgba(255,255,255,0.15);
    background-color: var(--bg-hover);
}

.combo-select:focus {
    outline: none;
    border-color: var(--signal-blue);
    box-shadow: var(--inset-bevel), 0 0 8px rgba(56, 200, 255, 0.2);
}

.combo-select option {
    background: var(--bg-panel);
    color: var(--text-bright);
    font-size: 13px;
    font-weight: 500;
    padding: 8px;
}

.combo-select optgroup {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.combo-save-btn {
    padding: 8px 12px;
    background: linear-gradient(180deg, #283848 0%, #182838 100%);
    color: var(--signal-blue);
    border: 1px solid rgba(56, 200, 255, 0.3);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
}

.combo-save-btn:hover {
    background: linear-gradient(180deg, #384858 0%, #283848 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(56, 200, 255, 0.3),
        0 2px 4px rgba(0,0,0,0.3);
}

.combo-delete-btn {
    padding: 8px 12px;
    background: linear-gradient(180deg, #3a2028 0%, #2a1018 100%);
    color: var(--signal-red);
    border: 1px solid rgba(255, 59, 78, 0.3);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
}

.combo-delete-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #4a3038 0%, #3a2028 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(255, 59, 78, 0.3),
        0 2px 4px rgba(0,0,0,0.3);
}

.combo-delete-btn:disabled {
    background: var(--bg-inset);
    color: var(--text-dim);
    border-color: transparent;
    box-shadow: var(--inset-bevel);
    cursor: not-allowed;
}

.combo-copy-btn {
    padding: 8px 12px;
    background: linear-gradient(180deg, #383838 0%, #282828 100%);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
}

.combo-copy-btn:hover {
    background: linear-gradient(180deg, #484848 0%, #383838 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(255, 255, 255, 0.1),
        0 2px 4px rgba(0,0,0,0.3);
}

.combo-copy-btn.copied {
    color: var(--signal-green);
}

/* ─────────────────────────────────────────────────────────────────────────────
   COMBO DIALOG - Modal overlay
   ───────────────────────────────────────────────────────────────────────────── */

.combo-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.combo-dialog {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    min-width: 320px;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.combo-dialog-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: var(--space-md);
    letter-spacing: 0.02em;
}

.combo-dialog-message {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.combo-dialog-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-inset);
    color: var(--text-bright);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: var(--space-lg);
    box-shadow: var(--inset-bevel);
    outline: none;
}

.combo-dialog-input:focus {
    border-color: var(--signal-blue);
    box-shadow: var(--inset-bevel), 0 0 8px rgba(56, 200, 255, 0.2);
}

.combo-dialog-input::placeholder {
    color: var(--text-muted);
}

.combo-dialog-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

.combo-dialog-cancel,
.combo-dialog-confirm {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.1s ease;
}

.combo-dialog-cancel {
    background: var(--bg-inset);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--inset-bevel);
}

.combo-dialog-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.combo-dialog-confirm {
    background: linear-gradient(180deg, #283848 0%, #182838 100%);
    color: var(--signal-blue);
    border: 1px solid rgba(56, 200, 255, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
}

.combo-dialog-confirm:hover {
    background: linear-gradient(180deg, #384858 0%, #283848 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(56, 200, 255, 0.3),
        0 2px 4px rgba(0,0,0,0.3);
}

.combo-dialog-confirm.combo-dialog-delete {
    background: linear-gradient(180deg, #4a2028 0%, #2a1018 100%);
    color: var(--signal-red);
    border: 1px solid rgba(255, 59, 78, 0.3);
}

.combo-dialog-confirm.combo-dialog-delete:hover {
    background: linear-gradient(180deg, #5a3038 0%, #3a2028 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 0 12px rgba(255, 59, 78, 0.3),
        0 2px 4px rgba(0,0,0,0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   HELP OVERLAY
   ───────────────────────────────────────────────────────────────────────────── */

.brand-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.help-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--text-muted);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}

.help-btn:hover {
    border-color: var(--signal-blue);
    color: var(--signal-blue);
    box-shadow: 0 0 8px rgba(56, 200, 255, 0.3);
}

.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.help-dialog {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.help-close-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    box-shadow: var(--inset-bevel);
}

.help-close-btn:hover {
    background: rgba(255, 59, 78, 0.15);
    color: var(--signal-red);
}

.help-content h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 0 0 var(--space-md) 0;
    letter-spacing: 0.02em;
}

.help-content h3 {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--signal-amber);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: var(--space-lg) 0 var(--space-sm) 0;
}

.help-content p {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 var(--space-md) 0;
    line-height: 1.6;
}

.help-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-content li {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-primary);
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
}

.help-content li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--signal-blue);
}

.help-content kbd {
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--bg-inset);
    color: var(--text-bright);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--inset-bevel);
    margin-right: var(--space-sm);
}
