/* Tron aesthetic – neon grid, cyan/amber on dark */
@font-face {
    font-family: "Press Start 2P";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/presstart2p.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --theme-font-family: "Orbitron", "Press Start 2P", system-ui, sans-serif;
    --tron-bg: #0a0a0f;
    --tron-bg-elevated: #0f0f16;
    --tron-surface: #14141c;
    --tron-cyan: #00d4ff;
    --tron-cyan-dim: #00a8cc;
    --tron-amber: #ffb347;
    --tron-amber-dim: #e69500;
    --tron-text: #c8d0e0;
    --tron-text-muted: #8890a0;
    --tron-border: rgba(0, 212, 255, 0.35);
    --tron-glow: 0 0 12px rgba(0, 212, 255, 0.4);
    --tron-glow-strong: 0 0 20px rgba(0, 212, 255, 0.6);
    --theme-grid-line: rgba(0, 212, 255, 0.03);
    --theme-page-backdrop: radial-gradient(circle at top, rgba(0, 212, 255, 0.06), transparent 40%);
}

html, body {
    font-family: var(--theme-font-family);
    background-color: var(--tron-bg);
    color: var(--tron-text);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--theme-page-backdrop),
    linear-gradient(var(--theme-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--theme-grid-line) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

.tron-theme, .tron-theme html, .tron-theme body {
    --theme-font-family: "Orbitron", "Press Start 2P", system-ui, sans-serif;
    background-color: var(--tron-bg);
    color: var(--tron-text);
}

.tg16-theme, .tg16-theme html, .tg16-theme body {
    --theme-font-family: "Press Start 2P", "Orbitron", system-ui, sans-serif;
    --tron-bg: #120f1d;
    --tron-bg-elevated: #181424;
    --tron-surface: #221b33;
    --tron-cyan: #ff6cf3;
    --tron-cyan-dim: #c93dc0;
    --tron-amber: #ffd166;
    --tron-amber-dim: #e0a800;
    --tron-text: #f3e9ff;
    --tron-text-muted: #b6a7d1;
    --tron-border: rgba(255, 108, 243, 0.32);
    --tron-glow: 0 0 12px rgba(255, 108, 243, 0.32);
    --tron-glow-strong: 0 0 20px rgba(255, 108, 243, 0.5);
    --theme-grid-line: rgba(255, 108, 243, 0.02);
    --theme-page-backdrop: radial-gradient(circle at top, rgba(255, 108, 243, 0.08), transparent 40%);
    background-color: var(--tron-bg);
    color: var(--tron-text);
}

.health-theme, .health-theme html, .health-theme body {
    --theme-font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --tron-bg: #08110f;
    --tron-bg-elevated: #0f1c18;
    --tron-surface: #142722;
    --tron-cyan: #8cf7ba;
    --tron-cyan-dim: #5fd19a;
    --tron-amber: #f5d37b;
    --tron-amber-dim: #d9b85b;
    --tron-text: #eefcf4;
    --tron-text-muted: #9eb8ab;
    --tron-border: rgba(140, 247, 186, 0.24);
    --tron-glow: 0 0 12px rgba(140, 247, 186, 0.24);
    --tron-glow-strong: 0 0 20px rgba(140, 247, 186, 0.4);
    --theme-grid-line: rgba(140, 247, 186, 0.02);
    --theme-page-backdrop: radial-gradient(circle at top, rgba(140, 247, 186, 0.08), transparent 42%);
    background-color: var(--tron-bg);
    color: var(--tron-text);
}

.tron-theme a, .tron-theme .btn-link {
    color: var(--tron-cyan);
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}

.tron-theme a:hover, .tron-theme .btn-link:hover {
    color: var(--tron-cyan-dim);
    text-shadow: var(--tron-glow);
}

.tron-theme .btn-primary {
    background: transparent;
    color: var(--tron-cyan);
    border: 1px solid var(--tron-cyan);
    font-family: "Orbitron", "Press Start 2P", system-ui, sans-serif;
    border-radius: 2px;
    padding: 0.5rem 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: box-shadow 0.2s, background 0.2s;
}

.tron-theme .btn-primary:hover {
    box-shadow: var(--tron-glow);
    background: rgba(0, 212, 255, 0.08);
}

.tron-theme .btn-secondary {
    background: var(--tron-surface);
    color: var(--tron-text);
    border: 1px solid var(--tron-border);
    font-family: "Orbitron", "Press Start 2P", system-ui, sans-serif;
    border-radius: 2px;
    padding: 0.5rem 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tron-theme .btn-secondary:hover {
    border-color: var(--tron-cyan);
    box-shadow: var(--tron-glow);
}

.tron-theme .glow-text {
    text-shadow: 0 0 12px var(--tron-cyan), 0 0 24px rgba(0, 212, 255, 0.4);
}

.tron-theme .card {
    background: var(--tron-bg-elevated);
    color: var(--tron-text);
    border: 1px solid var(--tron-border);
    border-radius: 2px;
    box-shadow: var(--tron-glow);
}

.tron-theme .card-header {
    background: var(--tron-surface);
    border-bottom: 1px solid var(--tron-border);
    color: var(--tron-cyan);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.tron-theme .pixel-border, .tron-theme .card-body {
    border-color: var(--tron-border);
}

.tron-theme .navbar.navbar-dark, .tron-theme .top-row.navbar {
    background: var(--tron-surface) !important;
    border-bottom: 1px solid var(--tron-cyan);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
}

.tron-theme .navbar .nav-link, .tron-theme .nav-link {
    color: var(--tron-text);
    transition: color 0.2s, text-shadow 0.2s;
}

.tron-theme .navbar .nav-link:hover, .tron-theme .nav-link:hover, .tron-theme .nav-link.active {
    color: var(--tron-cyan);
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.tron-theme .form-control {
    background: var(--tron-bg);
    color: var(--tron-text);
    border: 1px solid var(--tron-border);
    border-radius: 2px;
}

.tron-theme .form-control:focus {
    border-color: var(--tron-cyan);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2), var(--tron-glow);
    outline: none;
}

.tron-theme .sidebar {
    background: var(--tron-surface);
    border-right: 1px solid var(--tron-border);
    box-shadow: 4px 0 20px rgba(0, 212, 255, 0.08);
}

.tron-theme .content {
    position: relative;
    z-index: 1;
}

.tg16-theme a, .tg16-theme .btn-link {
    color: var(--tron-cyan);
}

.tg16-theme .btn-primary {
    background: transparent;
    color: var(--tron-cyan);
    border: 1px solid var(--tron-cyan);
}

.tg16-theme .btn-primary:hover {
    box-shadow: var(--tron-glow);
    background: rgba(0, 212, 255, 0.08);
}

.tg16-theme .btn-secondary {
    background: var(--tron-surface);
    color: var(--tron-text);
    border: 1px solid var(--tron-border);
}

.tg16-theme .btn-secondary:hover {
    border-color: var(--tron-cyan);
    box-shadow: var(--tron-glow);
}

.tg16-theme .card {
    background: var(--tron-bg-elevated);
    border: 1px solid var(--tron-border);
    box-shadow: var(--tron-glow);
}

.tg16-theme .navbar.navbar-dark, .tg16-theme .top-row.navbar {
    background: var(--tron-surface) !important;
    border-bottom: 1px solid var(--tron-cyan);
}

.tg16-theme .nav-link {
    color: var(--tron-text);
}

.tg16-theme .nav-link:hover, .tg16-theme .nav-link.active {
    color: var(--tron-cyan);
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.tg16-theme .form-control {
    background: var(--tron-bg);
    color: var(--tron-text);
    border: 1px solid var(--tron-border);
}

.tg16-theme .form-control:focus {
    border-color: var(--tron-cyan);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.tg16-theme .sidebar {
    background: var(--tron-surface);
    border-right: 1px solid var(--tron-border);
}

.tg16-theme .flicker {
    animation: tron-pulse 2s ease-in-out infinite;
}

@keyframes tron-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

.tron-theme .flicker {
    animation: tron-pulse 2s ease-in-out infinite;
}

.tron-theme .mud-main-content,
.tg16-theme .mud-main-content,
.health-theme .mud-main-content {
    background: transparent;
}

.tron-theme .mud-paper,
.tron-theme .mud-card,
.tron-theme .mud-table,
.tron-theme .mud-popover,
.tron-theme .mud-dialog,
.tg16-theme .mud-paper,
.tg16-theme .mud-card,
.tg16-theme .mud-table,
.tg16-theme .mud-popover,
.tg16-theme .mud-dialog,
.health-theme .mud-paper,
.health-theme .mud-card,
.health-theme .mud-table,
.health-theme .mud-popover,
.health-theme .mud-dialog {
    color: var(--tron-text);
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.06), transparent 38%),
    var(--tron-bg-elevated);
    border: 1px solid var(--tron-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.tron-theme .mud-paper-outlined,
.tron-theme .mud-card-outlined,
.tg16-theme .mud-paper-outlined,
.tg16-theme .mud-card-outlined,
.health-theme .mud-paper-outlined,
.health-theme .mud-card-outlined {
    border-color: var(--tron-border);
}

.tron-theme .mud-input-slot,
.tron-theme .mud-select-input,
.tron-theme .mud-input-label,
.tron-theme .mud-input-helper-text,
.tron-theme .mud-typography,
.tg16-theme .mud-input-slot,
.tg16-theme .mud-select-input,
.tg16-theme .mud-input-label,
.tg16-theme .mud-input-helper-text,
.tg16-theme .mud-typography,
.health-theme .mud-input-slot,
.health-theme .mud-select-input,
.health-theme .mud-input-label,
.health-theme .mud-input-helper-text,
.health-theme .mud-typography {
    color: var(--tron-text);
}

.tron-theme .mud-input.mud-input-outlined,
.tg16-theme .mud-input.mud-input-outlined,
.health-theme .mud-input.mud-input-outlined {
    background: rgba(6, 10, 18, 0.78);
    border-radius: 8px;
}

.tron-theme .mud-input-outlined-border,
.tg16-theme .mud-input-outlined-border,
.health-theme .mud-input-outlined-border {
    border-color: var(--tron-border);
}

.tron-theme .mud-input-control:hover .mud-input-outlined-border,
.tron-theme .mud-input-control.mud-input-focused .mud-input-outlined-border,
.tg16-theme .mud-input-control:hover .mud-input-outlined-border,
.tg16-theme .mud-input-control.mud-input-focused .mud-input-outlined-border,
.health-theme .mud-input-control:hover .mud-input-outlined-border,
.health-theme .mud-input-control.mud-input-focused .mud-input-outlined-border {
    border-color: var(--tron-cyan);
}

.tron-theme .mud-switch span,
.tron-theme .mud-switch-label,
.tg16-theme .mud-switch span,
.tg16-theme .mud-switch-label,
.health-theme .mud-switch span,
.health-theme .mud-switch-label {
    color: var(--tron-text);
}

.tron-theme .mud-alert,
.tg16-theme .mud-alert,
.health-theme .mud-alert {
    color: var(--tron-text);
    border: 1px solid var(--tron-border);
    background: rgba(0, 212, 255, 0.08);
}

.tron-theme .mud-button-root,
.tg16-theme .mud-button-root,
.health-theme .mud-button-root {
    letter-spacing: 0.05em;
}

.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
}

.page {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.dev-context-gem {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1300;
    font-family: var(--theme-font-family, "Orbitron", "Press Start 2P", system-ui, sans-serif);
}

.dev-context-gem__trigger {
    border: 1px solid rgba(0, 212, 255, 0.45);
    border-radius: 999px;
    background: rgba(10, 10, 15, 0.85);
    color: var(--tron-cyan, #00d4ff);
    width: 2.2rem;
    height: 2.2rem;
    line-height: 1rem;
    cursor: pointer;
    box-shadow: var(--tron-glow);
    font-size: 1rem;
}

.dev-context-gem__trigger:hover,
.dev-context-gem__trigger:focus {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: var(--tron-glow-strong);
    outline: none;
}

.dev-context-gem__menu {
    position: absolute;
    top: 2.45rem;
    right: 0;
    width: 250px;
    background: rgba(10, 10, 15, 0.96);
    border: 1px solid rgba(0, 212, 255, 0.45);
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.4rem;
}

.dev-context-gem__menu.is-open {
    display: flex;
}

.dev-context-gem__heading {
    color: var(--tron-cyan, #00d4ff);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.15rem;
}

.dev-context-gem__item {
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    color: var(--tron-text, #c8d0e0);
    border-radius: 4px;
    padding: 0.35rem 0.4rem;
    cursor: pointer;
}

.dev-context-gem__item:hover,
.dev-context-gem__item:focus {
    border-color: rgba(0, 212, 255, 0.35);
    background: rgba(0, 212, 255, 0.08);
    outline: none;
}

.dev-context-gem__meta,
.dev-context-gem__status {
    color: var(--tron-text-muted, #8890a0);
    font-size: 0.72rem;
    line-height: 1.2;
    margin-top: 0.25rem;
    word-break: break-word;
}
