/* -------------------------------------------------------------
   WaveLizard Main Stylesheet
   Theme: Worn Charcoal, Weathered Slate, Faded Rust, Oxidized Copper
   Aesthetics: Vintage Spares Catalog / Industrial Utility Showroom
   ------------------------------------------------------------- */

/* Reset & Variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --obsidian: #15171a;
    --panel: #23262b;
    --glass: rgba(35, 38, 43, 0.85);
    --glass-hover: rgba(43, 46, 52, 0.95);
    --cyan: #559aa3;       /* washed out cyan */
    --toxic: #728c69;      /* sage green */
    --purple: #8a7d9d;     /* faded slate purple */
    --rust: #b8684d;       /* iron rust orange */
    --yellow: #c4a54f;     /* popular mustard yellow */
    --text: #e2e5e9;       /* distressed white */
    --muted: #828b99;      /* worn slate grey */
    --border: #3e434c;     /* industrial seam */
    --border-hover: #5b626e;
    --glow-cyan: 0 1px 3px rgba(85, 154, 163, 0.15);
    --glow-toxic: 0 1px 3px rgba(114, 140, 105, 0.15);
    --glow-purple: 0 1px 3px rgba(138, 125, 157, 0.15);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
    background-color: var(--obsidian);
    color: var(--text);
    font-family: Monaco, Consolas, "Courier New", Inter, ui-sans-serif, system-ui, sans-serif;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--obsidian);
    /* Organic card/paper noise texture wash overlay */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--obsidian);
}
::-webkit-scrollbar-thumb {
    background: var(--panel);
    border: 1px solid var(--border);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* Grid & Scanlines Overlays */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    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: 32px 32px;
    pointer-events: none;
    z-index: -2;
}

.bg-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Soft white wash and subtle line texture */
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%),
                linear-gradient(rgba(255, 255, 255, 0.005) 50%, rgba(0, 0, 0, 0.04) 50%);
    background-size: 100% 100%, 100% 6px;
    pointer-events: none;
    z-index: -1;
}

/* Text & Colors Utilities */
.cyan-text { color: var(--cyan); }
.toxic-text { color: var(--toxic); }
.purple-text { color: var(--purple); }
.accent-glow {
    color: var(--cyan);
    text-shadow: none;
    border-bottom: 2px dashed var(--cyan);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(21, 23, 26, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cyan);
    text-decoration: none;
}

.logo-text {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--text);
    font-family: monospace;
}

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

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 4px;
}

.ecosystem-badge {
    background: rgba(114, 140, 105, 0.1);
    color: var(--toxic);
    border: 1px solid rgba(114, 140, 105, 0.3);
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 2px;
    font-family: monospace;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: monospace;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background: var(--cyan);
    color: var(--obsidian);
    border: 1px solid var(--cyan);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: #68aab2;
    border-color: #68aab2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(85, 154, 163, 0.05);
}

.btn-action {
    background: var(--panel);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 10px 18px;
    font-size: 11px;
    border-radius: 2px;
    font-family: monospace;
}

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

.btn-accent {
    background: rgba(138, 125, 157, 0.1);
    color: var(--purple);
    border-color: rgba(138, 125, 157, 0.3);
}

.btn-accent:hover {
    background: var(--purple);
    color: var(--obsidian);
    border-color: var(--purple);
}

.btn-highlight {
    background: rgba(114, 140, 105, 0.1);
    color: var(--toxic);
    border-color: rgba(114, 140, 105, 0.3);
}

.btn-highlight:hover {
    background: var(--toxic);
    color: var(--obsidian);
    border-color: var(--toxic);
}

.btn-disabled {
    width: 100%;
    background: rgba(255, 255, 255, 0.015);
    color: var(--muted);
    border: 1px solid var(--border);
    cursor: default;
    text-align: center;
    border-radius: 4px;
    font-family: monospace;
}

/* Sections Base */
section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-family: monospace;
}

.section-subtitle {
    color: var(--muted);
    font-size: 14px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Hero Section */
.hero-section {
    padding-top: 140px;
    padding-bottom: 64px;
    text-align: center;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.tagline {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--toxic);
    margin-bottom: 24px;
    text-shadow: none;
    background: rgba(114, 140, 105, 0.08);
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid rgba(114, 140, 105, 0.2);
    border-radius: 2px;
    font-family: monospace;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 64px;
}

.ecosystem-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: monospace;
}

.eco-item {
    transition: color 0.2s;
}

.eco-item.active {
    color: var(--cyan);
}

.eco-dot {
    width: 4px;
    height: 4px;
    background: var(--border);
    border-radius: 50%;
}

/* Scope Demo Section */
.scope-section {
    padding-top: 32px;
}

.scope-container {
    display: grid;
    grid-template-columns: 180px 1fr 280px;
    gap: 16px;
    background: #1c1f24; /* Steel industrial chassis */
    border: 3px solid #2d323b;
    border-radius: 6px;
    padding: 20px;
    position: relative;
    /* Rivets in four corners */
    background-image: 
        radial-gradient(circle at 8px 8px, #5b626e 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 8px) 8px, #5b626e 3px, transparent 4px),
        radial-gradient(circle at 8px calc(100% - 8px), #5b626e 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 8px) calc(100% - 8px), #5b626e 3px, transparent 4px);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Panels */
.sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modes-panel, .lenses-panel, .controls-panel {
    background: #15171a;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
    font-family: monospace;
}

/* Mode Buttons */
.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.mode-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    transition: all 0.15s ease;
}

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

.mode-btn.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--muted);
}

.mode-btn[data-mode="live"].active { box-shadow: inset 3px 0 0 var(--cyan); }
.mode-btn[data-mode="frozen"].active { box-shadow: inset 3px 0 0 var(--rust); }
.mode-btn[data-mode="ghost"].active { box-shadow: inset 3px 0 0 var(--purple); }
.mode-btn[data-mode="curve"].active { box-shadow: inset 3px 0 0 var(--toxic); }

/* Lens Buttons */
.lens-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lens-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 10px 14px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    transition: all 0.15s ease;
}

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

.lens-btn.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* Specific Lens active colors */
.lens-btn[data-lens="none"].active {
    border-color: var(--muted);
    box-shadow: inset 3px 0 0 var(--muted);
}

.lens-btn[data-lens="spike"].active {
    border-color: var(--rust);
    box-shadow: inset 3px 0 0 var(--rust);
}

.lens-btn[data-lens="density"].active {
    border-color: var(--toxic);
    box-shadow: inset 3px 0 0 var(--toxic);
}

.lens-btn[data-lens="body"].active {
    border-color: var(--rust);
    box-shadow: inset 3px 0 0 var(--rust);
}

.lens-btn[data-lens="flicker"].active {
    border-color: var(--purple);
    box-shadow: inset 3px 0 0 var(--purple);
}

.lens-btn[data-lens="venom"].active {
    border-color: var(--yellow);
    box-shadow: inset 3px 0 0 var(--yellow);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    border-top: 1px dashed var(--border);
    padding-top: 16px;
}

.indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.indicator.cyan { background: var(--cyan); }
.indicator.orange { background: var(--rust); }
.indicator.purple { background: var(--purple); }
.indicator.toxic { background: var(--toxic); }
.indicator.grey { background: var(--muted); }
.indicator.red { background: var(--rust); }
.indicator.green { background: var(--toxic); }
.indicator.yellow { background: var(--yellow); }

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--muted);
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    font-family: monospace;
}

.pulse-green {
    background: var(--toxic);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Central Display Panel */
.display-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scope-screen {
    position: relative;
    aspect-ratio: 1.77;
    background: #0d0f11;
    border: 3px solid #3e434c;
    border-radius: 4px;
    overflow: hidden;
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 80%);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.95);
}

#scopeCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Oscilloscope Grid overlay */
.scope-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Distressed technical alignment markings */
    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: 12.5% 25%; /* 8x4 Grid */
    pointer-events: none;
}

.scope-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

/* HUD elements inside scope screen */
.hud-top-left, .hud-top-right, .hud-bottom-left, .hud-bottom-right, .hud-bottom-left-lens {
    position: absolute;
    font-family: monospace;
    font-size: 9px;
    font-weight: bold;
    color: var(--muted);
    opacity: 0.8;
    pointer-events: none;
}

.hud-top-left { top: 8px; left: 10px; }
.hud-top-right { top: 8px; right: 10px; }
.hud-bottom-left { bottom: 8px; left: 10px; }
.hud-bottom-left-lens { bottom: 20px; left: 10px; }
.hud-bottom-right { bottom: 8px; right: 10px; }

/* HUD Connection notifications overlay */
.hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 23, 26, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 10;
}

.hud-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hud-overlay-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hud-overlay-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(85, 154, 163, 0.1);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hud-overlay-text {
    font-family: monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--cyan);
}

/* Action Bar below scope */
.action-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Controls Panel */
.controls-panel {
    gap: 20px;
}

.knob-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text);
    font-family: monospace;
}

.control-value {
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--cyan);
}

.control-help {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.4;
}

/* Custom styled range sliders - Vintage slide fader look */
.styled-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    outline: none;
}

.styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 12px;
    background: var(--muted);
    border: 1px solid var(--border-hover);
    border-radius: 2px;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 4px rgba(0,0,0,0.3);
    transition: background-color 0.1s;
}

.styled-slider::-webkit-slider-thumb:hover {
    background: var(--text);
}

.styled-slider:active::-webkit-slider-thumb {
    background: var(--cyan);
}

/* Features Section Cards */
.features-section {
    border-top: 1px solid var(--border);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.glass-card {
    background: var(--panel);
    border: 4px double var(--border);
    border-radius: 4px;
    padding: 24px;
    position: relative;
    /* Wash texture effect */
    background-image: radial-gradient(circle at top left, rgba(255, 255, 255, 0.03), transparent 65%);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.2), 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: inset 0 0 12px rgba(255,255,255,0.02), 0 8px 20px rgba(0,0,0,0.4);
}

.card-icon {
    margin-bottom: 20px;
    display: inline-block;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: monospace;
}

.card-description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* Chameleon Integration Section */
.integration-section {
    border-top: 1px solid var(--border);
}

.integration-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: center;
}

/* Visual Connector Animation */
.integration-visual {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 48px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.connection-node {
    background: var(--obsidian);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: 2px;
    text-align: center;
    z-index: 2;
    transition: border-color 0.3s;
    min-width: 140px;
    font-family: monospace;
}

.source-node {
    border-color: var(--cyan);
}

.target-node {
    border-color: var(--purple);
}

.node-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.node-sub {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
}

.connection-line {
    position: absolute;
    top: 50%;
    left: 172px;
    right: 172px;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    z-index: 1;
}

.animated-pulse {
    position: absolute;
    top: -4px;
    left: 0;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px #fff;
    animation: flow 2.5s linear infinite;
}

@keyframes flow {
    0% { left: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* Routing Table style */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.routing-table, .roadmap-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.routing-table th, .roadmap-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border);
    font-family: monospace;
}

.routing-table td, .roadmap-table td {
    padding: 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.routing-table tbody tr:hover, .roadmap-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: monospace;
}

.badge-cyan { background: rgba(85, 154, 163, 0.1); color: var(--cyan); border: 1px solid rgba(85, 154, 163, 0.2); }
.badge-purple { background: rgba(138, 125, 157, 0.1); color: var(--purple); border: 1px solid rgba(138, 125, 157, 0.2); }
.badge-toxic { background: rgba(114, 140, 105, 0.1); color: var(--toxic); border: 1px solid rgba(114, 140, 105, 0.2); }
.badge-rust { background: rgba(184, 104, 77, 0.1); color: var(--rust); border: 1px solid rgba(184, 104, 77, 0.2); }
.badge-white { background: rgba(255, 255, 255, 0.05); color: var(--text); border: 1px solid var(--border); }

/* Ecosystem Roadmap Section */
.roadmap-section {
    border-top: 1px solid var(--border);
}

.product-name {
    font-weight: 700;
    color: var(--cyan);
}

.status-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: monospace;
}

.status-planning {
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    border: 1px solid var(--border);
}

.status-dev {
    background: rgba(184, 104, 77, 0.1);
    color: var(--rust);
    border: 1px solid rgba(184, 104, 77, 0.3);
}

.status-active {
    background: rgba(114, 140, 105, 0.1);
    color: var(--toxic);
    border: 1px solid rgba(114, 140, 105, 0.3);
}

/* Formats Section */
.formats-section {
    border-top: 1px solid var(--border);
    text-align: center;
    background: rgba(21, 23, 26, 0.4);
}

.formats-container {
    max-width: 600px;
    margin: 0 auto;
}

.formats-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--muted);
    margin-bottom: 24px;
    font-family: monospace;
}

.formats-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.format-item {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text);
    opacity: 0.85;
    font-family: monospace;
}

.formats-note {
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
}

/* Footer */
.footer {
    background: #111215;
    border-top: 1px solid var(--border);
    padding: 32px 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

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

/* Media Queries for Mobile Responsiveness */
@media (max-width: 1024px) {
    .scope-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar-left {
        flex-direction: column;
        gap: 12px;
    }
    
    .modes-panel, .lenses-panel {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .modes-panel .panel-header, .lenses-panel .panel-header {
        margin-bottom: 0;
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .mode-buttons, .lens-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        flex-grow: 0;
    }
    
    .sidebar-footer {
        border-top: none;
        padding-top: 0;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .integration-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .hero-title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 12px 24px;
        gap: 8px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-bar {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .modes-panel {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mode-buttons {
        flex-direction: column;
        width: 100%;
    }
}

/* Showroom & Brands Styles */
.brands-section {
    padding: 30px 24px;
    background: rgba(21, 23, 26, 0.5);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 60px;
    /* Soft wash texture */
    background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.01), transparent);
}

.brands-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.brands-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: monospace;
}

.brands-logos {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.brand-logo {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    opacity: 0.6;
    text-transform: uppercase;
    text-decoration: none;
    font-family: monospace;
    transition: all 0.2s ease;
}

.brand-logo.highlighted {
    color: var(--cyan);
    opacity: 0.9;
}

.brand-logo.highlighted:hover {
    color: var(--rust);
    opacity: 1;
}

/* Showroom Section */
.showroom-section {
    padding: 80px 24px;
}

.filter-tabs-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-tab {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 2px; /* Drawer cabinet label pull styling */
    cursor: pointer;
    font-family: monospace;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.filter-tab.active {
    color: var(--toxic);
    background: rgba(114, 140, 105, 0.1);
    border-color: var(--toxic);
}

.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--panel);
    border: 4px double var(--border);
    border-radius: 4px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 420px;
    position: relative;
    background-image: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card.hidden {
    display: none;
}

.product-card::before {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-right: 1px solid var(--border);
    border-top: 1px solid var(--border);
    pointer-events: none;
}

/* Card Accent color washes (as parts tags/stickers) */
.product-card.box-cyan {
    border-top: 6px solid var(--cyan);
}
.product-card.box-orange {
    border-top: 6px solid var(--rust);
}
.product-card.box-yellow {
    border-top: 6px solid var(--yellow);
}
.product-card.box-green {
    border-top: 6px solid var(--toxic);
}
.product-card.box-purple {
    border-top: 6px solid var(--purple);
}

.product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.01), 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Inventory technical detailing */
.box-inventory-header {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 9px;
    color: var(--muted);
    border-bottom: 1px dashed var(--border);
    padding-bottom: 6px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.box-inventory-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}

.barcode {
    width: 80px;
    height: 18px;
    opacity: 0.35;
    background: repeating-linear-gradient(
        90deg,
        var(--muted),
        var(--muted) 1px,
        transparent 1px,
        transparent 3px,
        var(--muted) 3px,
        var(--muted) 4px,
        transparent 4px,
        transparent 6px
    );
    transition: opacity 0.2s ease;
}

.product-card:hover .barcode {
    opacity: 0.65;
}

.dept-no {
    font-family: monospace;
    font-size: 8px;
    color: var(--muted);
}

.product-meta {
    margin-bottom: 16px;
}

.product-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 800;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-family: monospace;
}

.tag-surgical {
    background: rgba(85, 154, 163, 0.1);
    color: var(--cyan);
    border: 1px solid rgba(85, 154, 163, 0.2);
}

.tag-partner-sweet {
    background: rgba(138, 125, 157, 0.1);
    color: var(--purple);
    border: 1px solid rgba(138, 125, 157, 0.2);
}

.tag-partner-venom {
    background: rgba(114, 140, 105, 0.1);
    color: var(--toxic);
    border: 1px solid rgba(114, 140, 105, 0.2);
}

.product-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 4px;
    text-transform: uppercase;
    font-family: monospace;
}

.product-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

.product-features span {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
}

.product-actions .btn {
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 10px;
}

/* Labs Header style */
.labs-header-section {
    padding: 60px 24px 20px;
    border-top: 1px solid var(--border);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Full Viewport Application Stage --- */
.page {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.stage {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    position: relative;
    overflow: hidden;
    container-type: size; /* Enable container query units cqw and cqh */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Stage Layout Blocks */
.stage-header {
    flex: 0 0 clamp(64px, 10cqh, 160px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(24px, 4cqw, 96px);
    box-sizing: border-box;
}

.stage-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    align-items: center;
    padding: 0 clamp(24px, 4cqw, 96px);
    box-sizing: border-box;
    gap: clamp(20px, 4cqw, 72px);
    overflow: hidden;
}

.stage-footer {
    flex: 0 0 clamp(48px, 8cqh, 120px);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 clamp(24px, 4cqw, 96px);
    box-sizing: border-box;
    font-size: 1.8cqh;
    color: var(--muted);
    border-top: 1px dashed var(--border);
}

.stage-logo {
    display: flex;
    align-items: center;
    gap: 1.2cqw;
    text-decoration: none;
    color: var(--cyan);
}

.stage-logo-text {
    font-family: monospace;
    font-weight: 800;
    font-size: 2.8cqh;
    letter-spacing: 4px;
    color: var(--text);
}

/* --- Plugin Deck & Viewport --- */
.deck-viewport {
    min-width: 0;
    height: 100%;
    background: #07090e;
    border: 1px solid var(--border);
    border-radius: 1.5cqh;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.screenshot-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.screenshot-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
}

.screenshot-container img.fade-out {
    opacity: 0;
    transform: scale(0.98);
}

/* Viewport Overlays */
.viewport-overlay-top {
    position: absolute;
    top: 2cqh;
    left: 2cqw;
    right: 2cqw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.viewport-status {
    display: flex;
    align-items: center;
    gap: 0.8cqw;
    font-family: monospace;
    font-size: 1.6cqh;
    color: var(--cyan);
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
    background: rgba(7, 9, 14, 0.7);
    padding: 0.5cqh 1.2cqw;
    border-radius: 4px;
    border: 1px solid rgba(85, 154, 163, 0.2);
}

.status-indicator-dot {
    width: 1cqh;
    height: 1cqh;
    border-radius: 50%;
    background: #444;
}

.status-indicator-dot.active {
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    animation: pulse-dot 1.5s infinite alternate;
}

@keyframes pulse-dot {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.viewport-code {
    font-family: monospace;
    font-size: 1.6cqh;
    color: var(--muted);
    background: rgba(7, 9, 14, 0.7);
    padding: 0.5cqh 1.2cqw;
    border-radius: 4px;
    border: 1px solid rgba(85, 154, 163, 0.2);
}

.viewport-overlay-bottom {
    position: absolute;
    bottom: 2cqh;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.interaction-deck {
    display: flex;
    gap: 1.5cqw;
    background: rgba(7, 9, 14, 0.85);
    padding: 1cqh 2cqw;
    border-radius: 30px;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.deck-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: monospace;
    font-size: 1.6cqh;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6cqw;
    padding: 0.6cqh 1.2cqw;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.deck-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--cyan);
}

.deck-btn.liked {
    color: #ff3e6c;
    text-shadow: 0 0 8px rgba(255, 62, 108, 0.3);
}

.deck-btn.faved {
    color: #ffb700;
    text-shadow: 0 0 8px rgba(255, 183, 0, 0.3);
}

.nav-overlay-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 5cqh;
    height: 5cqh;
    background: rgba(7, 9, 14, 0.6);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 2.2cqh;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.nav-overlay-btn:hover {
    background: var(--cyan);
    color: #000;
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.nav-overlay-btn.prev {
    left: 2cqw;
}

.nav-overlay-btn.next {
    right: 2cqw;
}

/* --- HUD Panel --- */
.hud-panel {
    min-width: 0;
    overflow: hidden;
    height: 100%;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 1.5cqh;
    padding: 3cqh 2.5cqw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hud-section {
    width: 100%;
}

.hud-maker-badge {
    align-self: flex-start;
    background: rgba(0, 243, 255, 0.08);
    color: var(--cyan);
    border: 1px solid rgba(0, 243, 255, 0.2);
    padding: 0.4cqh 1cqw;
    font-size: 1.4cqh;
    font-family: monospace;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 1.5cqh;
    display: inline-block;
    letter-spacing: 1px;
}

.hud-title {
    font-family: var(--font-heading);
    font-size: 3.4cqh;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 1cqh;
    line-height: 1.2;
}

.hud-desc {
    font-size: 1.8cqh;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Sort Bar */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 1cqw;
    font-family: monospace;
    font-size: 1.6cqh;
    color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1cqh 0;
    margin: 1cqh 0;
}

.sort-select {
    background: #0c0e14;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: monospace;
    font-size: 1.6cqh;
    padding: 0.4cqh 1cqw;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.sort-select:hover, .sort-select:focus {
    border-color: var(--cyan);
}

/* Telemetry Box */
.telemetry-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 1cqh 0;
    overflow: hidden;
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1cqh;
}

.section-title-bar h3 {
    font-family: monospace;
    font-size: 1.6cqh;
    color: var(--muted);
    letter-spacing: 1px;
    margin: 0;
}

.active-pulse {
    width: 0.8cqh;
    height: 0.8cqh;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
    animation: blink-pulse 2s infinite;
}

@keyframes blink-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.telemetry-logs {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5cqh 1.5cqw;
    overflow-y: auto;
    font-family: monospace;
    font-size: 1.6cqh;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 1cqh;
    max-height: 25cqh;
}

.log-entry {
    margin-bottom: 1cqh;
    padding-bottom: 1cqh;
    border-bottom: 1px solid rgba(85, 154, 163, 0.05);
}

.log-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.log-time {
    color: var(--cyan);
    margin-right: 0.8cqw;
}

.comments-form {
    display: flex;
    gap: 0.8cqw;
}

.comments-form input {
    flex: 1;
    background: #07090e;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8cqh 1.2cqw;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1.6cqh;
    outline: none;
}

.comments-form input:focus {
    border-color: var(--cyan);
}

.submit-comment-btn {
    background: var(--cyan);
    color: #000;
    border: none;
    padding: 0.8cqh 1.5cqw;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
    font-size: 1.6cqh;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-comment-btn:hover {
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

/* Nav & Auto Scan */
.hud-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5cqh;
    border-top: 1px dashed var(--border);
    padding-top: 2cqh;
}

.nav-row {
    display: flex;
    gap: 1cqw;
}

.nav-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: monospace;
    font-size: 1.6cqh;
    padding: 1cqh 0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.nav-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0, 243, 255, 0.03);
}

.scan-row {
    display: flex;
    align-items: center;
    gap: 1.5cqw;
}

.scan-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: monospace;
    font-size: 1.6cqh;
    padding: 0.8cqh 1.5cqw;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.scan-btn.active {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0, 243, 255, 0.05);
}

.scan-progress-container {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.scan-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
    transition: width 0.1s linear;
}

/* --- Webview Mode Styles --- */
.webview-mode .stage-header,
.webview-mode .stage-footer,
.webview-mode .bg-grid,
.webview-mode .bg-scanlines {
    display: none !important;
}

.webview-mode .page {
    width: 100vw;
    height: 100vh;
    padding: 0 !important;
    margin: 0 !important;
    background: #07090e;
}

.webview-mode .stage {
    width: 100vw;
    height: 100vh;
    max-width: 100% !important;
    max-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.webview-mode .stage-main {
    height: 100vh;
    padding: 0 !important;
    gap: 0 !important;
}

.webview-mode .deck-viewport {
    flex: 1;
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    height: 100%;
}

.webview-mode .hud-panel {
    position: absolute;
    right: 2cqw;
    top: 2cqh;
    bottom: 2cqh;
    width: 30cqw;
    height: auto;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    border: 1px solid rgba(85, 154, 163, 0.3);
    background: rgba(7, 9, 14, 0.85);
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.webview-mode .hud-panel.collapsed {
    transform: translateX(calc(100% + 4cqw));
}

/* Webview exit drawer */
.webview-drawer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6cqh;
    background: rgba(7, 9, 14, 0.9);
    border-top: 1px solid var(--border);
    z-index: 200;
    align-items: center;
    padding: 0 4cqw;
    justify-content: space-between;
    font-family: monospace;
}

.webview-mode .webview-drawer {
    display: flex;
}

.drawer-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--cyan);
    font-family: monospace;
    font-size: 1.5cqh;
    padding: 0.5cqh 1.2cqw;
    border-radius: 4px;
    cursor: pointer;
}

.drawer-btn:hover {
    background: var(--cyan);
    color: #000;
}

.drawer-meta {
    font-size: 1.5cqh;
    color: var(--muted);
}

/* --- Concerned Audio HUD and Single-Screenshot Browser Custom Styles --- */

.viewport-monitor {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.screenshot-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    z-index: 1;
}

.screenshot-image.fade-out {
    opacity: 0;
    transform: scale(0.98);
}

.viewport-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 2;
}

.viewport-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    z-index: 3;
    opacity: 0.85;
}

.viewport-glint {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 30%, rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
    z-index: 4;
}

.viewport-index-overlay {
    position: absolute;
    bottom: 2cqh;
    right: 3cqw;
    font-family: monospace;
    font-size: 1.6cqh;
    color: var(--cyan);
    background: rgba(7, 9, 14, 0.85);
    padding: 0.6cqh 1.2cqw;
    border-radius: 4px;
    border: 1px solid rgba(85, 154, 163, 0.25);
    z-index: 5;
    letter-spacing: 1px;
    pointer-events: none;
}

/* HUD Header & Auto Scan */
.hud-header {
    margin-bottom: 2cqh;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5cqh;
}

.hud-meta-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    row-gap: 0.6cqh;
    column-gap: 1.5cqw;
    font-family: monospace;
    font-size: 1.5cqh;
    margin-bottom: 2cqh;
}

.hud-meta-label {
    color: var(--muted);
}

.hud-meta-val {
    color: var(--text);
    font-weight: bold;
}

.hud-deck-navigator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5cqh;
}

.nav-arrow-btn {
    background: #1c1f24;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: monospace;
    font-size: 1.4cqh;
    padding: 0.6cqh 1.2cqw;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-arrow-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(85, 154, 163, 0.05);
}

.navigator-dots {
    display: flex;
    gap: 0.8cqw;
}

.navigator-dots .dot {
    width: 1cqh;
    height: 1cqh;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.2s ease;
}

.navigator-dots .dot.active {
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
}

.auto-scan-container {
    display: flex;
    align-items: center;
    gap: 1.5cqw;
}

.auto-scan-container .btn-action {
    font-size: 1.3cqh;
    padding: 0.5cqh 1.2cqw;
}

.scan-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.scan-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
    transition: width 0.1s linear;
}

/* Tabs */
.hud-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2cqh;
    gap: 1cqw;
}

.hud-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-family: monospace;
    font-size: 1.6cqh;
    padding: 1cqh 0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: bold;
}

.hud-tab:hover {
    color: var(--text);
}

.hud-tab.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
    text-shadow: 0 0 6px rgba(85, 154, 163, 0.3);
}

.hud-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hud-tab-content {
    display: none;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.hud-tab-content.active {
    display: flex;
}

/* Specs Tab Custom Styles */
.plugin-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5cqh;
}

.plugin-title {
    font-size: 2.8cqh;
    font-weight: 800;
    color: var(--text);
    font-family: monospace;
}

.plugin-status-badge {
    font-size: 1.3cqh;
    padding: 0.3cqh 0.8cqw;
    font-family: monospace;
    font-weight: bold;
    border-radius: 2px;
    text-transform: uppercase;
}

.plugin-maker {
    font-family: monospace;
    font-size: 1.5cqh;
    color: var(--muted);
    margin-bottom: 1.5cqh;
}

.plugin-desc {
    font-size: 1.6cqh;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 2cqh;
}

.features-group {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5cqh 1.5cqw;
}

.features-header {
    font-family: monospace;
    font-size: 1.4cqh;
    color: var(--muted);
    margin-bottom: 1cqh;
    font-weight: bold;
    letter-spacing: 1px;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8cqh;
}

.features-list li {
    font-size: 1.5cqh;
    line-height: 1.4;
    color: var(--text);
}

.features-list li strong {
    color: var(--cyan);
    font-family: monospace;
}

/* Telemetry Tab Styles */
.telemetry-header {
    font-family: monospace;
    font-size: 1.4cqh;
    color: var(--muted);
    margin-bottom: 1cqh;
    font-weight: bold;
    letter-spacing: 1px;
}

.telemetry-feed {
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5cqh 1.5cqw;
    overflow: hidden;
    max-height: 25cqh;
    margin-bottom: 1.5cqh;
    font-family: monospace;
    font-size: 1.5cqh;
}

.telemetry-feed::-webkit-scrollbar {
    width: 6px;
}

.telemetry-feed::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.comment-block {
    margin-bottom: 1.5cqh;
    line-height: 1.4;
}

.comment-block:last-child {
    margin-bottom: 0;
}

.comment-time {
    color: var(--cyan);
    margin-right: 0.8cqw;
}

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

.telemetry-input-container {
    display: flex;
    gap: 0.8cqw;
}

.styled-input {
    flex: 1;
    background: #07090e;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8cqh 1.2cqw;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1.5cqh;
    outline: none;
    transition: border-color 0.2s ease;
}

.styled-input:focus {
    border-color: var(--cyan);
}

/* Diagnostics Tab Styles */
.diagnostic-scope-container {
    width: 100%;
    height: 22cqh;
    background: #0d0f12;
    border: 1px solid var(--border);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-bottom: 1cqh;
}

.diagnostic-scope-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.diagnostic-status-bar {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 1.3cqh;
    color: var(--muted);
    padding: 0.5cqh 0.5cqw;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5cqh;
}

.action-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8cqh 0.8cqw;
    margin-bottom: 2cqh;
}

.action-bar .btn {
    font-size: 1.3cqh;
    padding: 0.8cqh 0.5cqw;
    text-align: center;
    width: 100%;
}

.controls-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1cqh 0.8cqw;
}

.controls-panel .knob-group {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    padding: 0.8cqh 1cqw;
}

.controls-panel .control-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5cqh;
}

.controls-panel .control-label {
    font-family: monospace;
    font-size: 1.3cqh;
    color: var(--muted);
    font-weight: bold;
}

.controls-panel .control-value {
    font-family: monospace;
    font-size: 1.3cqh;
    color: var(--cyan);
}

.controls-panel input[type="range"] {
    width: 100%;
}

/* Webview Optimizations */
.webview-mode .stage-main {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100vw;
    height: 100vh;
}

.webview-mode .deck-viewport {
    width: 100vw;
    height: 100vh;
    flex: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Floating toggles inside webview mode */
.webview-mode .hud-panel {
    position: absolute;
    right: 1.5vw;
    top: 1.5vh;
    bottom: 1.5vh;
    width: clamp(320px, 30vw, 640px);
    height: auto;
    z-index: 100;
    background: rgba(13, 15, 18, 0.92);
    border: 1px solid rgba(85, 154, 163, 0.4);
    box-shadow: 0 10px 40px rgba(0,0,0,0.85);
    border-radius: 8px;
    padding: 2.5vh 2vw;
}

/* Webview Switch Button custom hover */
#btnToggleWebview {
    font-size: 1.4cqh;
    padding: 0.6cqh 1.2cqw;
    letter-spacing: 1px;
}

#btnToggleWebview.active-webview {
    background: var(--cyan);
    color: var(--obsidian);
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(85, 154, 163, 0.4);
}
