:root {
    --bezel: #202020;
    --btn-face: #3a3a3a;
    --btn-border: #111;
    --screen: #050505;
    --text-primary: #3333FF;
    --text-dim: #1A1A4A;
    --led-off: #081108;
    --led-on: var(--text-primary);
    --rocker-body: #111;
}

:root[theme="red"] {
    --text-primary: #FF3333;
    --text-dim: #4A1A1A;
}

:root[theme="orange"] {
    --text-primary: #FF5F1F;
    --text-dim: #4A2E1A;
}

:root[theme="yellow"] {
    --text-primary: #FFFF33;
    --text-dim: #4A4A1A;
}

:root[theme="green"] {
    --text-primary: #33FF33;
    --text-dim: #1A4A1A;
}

:root[theme="blue"] {
    --text-primary: #3333FF;
    --text-dim: #1A1A4A;
}

:root[theme="indigo"] {
    --text-primary: #9933FF;
    --text-dim: #2E1A4A;
}

:root[theme="violet"] {
    --text-primary: #331A99;
    --text-dim: #1A142E;
}

:root[theme="red-orange"] {
    --text-primary: #FF6633;
    --text-dim: #4A241A;
}

:root[theme="orange-yellow"] {
    --text-primary: #FFCC33;
    --text-dim: #4A3A1A;
}

:root[theme="yellow-green"] {
    --text-primary: #99FF33;
    --text-dim: #334A1A;
}

:root[theme="green-blue"] {
    --text-primary: #33CC99;
    --text-dim: #1A334A;
}

:root[theme="blue-indigo"] {
    --text-primary: #6633FF;
    --text-dim: #241A4A;
}

:root[theme="indigo-violet"] {
    --text-primary: #6626CC;
    --text-dim: #241735;
}

:root[theme="violet-red"] {
    --text-primary: #992666;
    --text-dim: #321724;
}

body {
    background-color: #000;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.mfd-bezel {
    width: 1000px;
    height: 1000px;
    background-color: var(--bezel);
    border-radius: 20px;
    box-shadow: 0 0 50px #000, inset 0 0 50px rgba(0,0,0,0.8);
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    grid-template-rows: 80px 1fr 80px;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
}

.screw {
    width: 28px;
    height: 28px;
    border-radius: 70%;
    background: radial-gradient(circle at 30% 30%, #444, #111);
    border: 2px solid #000;
    position: absolute;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}
.screw::before, .screw::after {
    content: '';
    position: absolute;
    background: #080808;
    border-radius: 1px;
}
.screw::before { width: 14px; height: 3px; transform: rotate(45deg); }
.screw::after { width: 3px; height: 14px; transform: rotate(45deg); }

.screw.tl { top: 30px; left: 36px; }
.screw.tr { top: 30px; right: 36px; }
.screw.bl { bottom: 30px; left: 36px; }
.screw.br { bottom: 30px; right: 36px; }

.led {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--led-off);
    border: 1px solid #000;
    position: absolute;
    z-index: 5;
    box-shadow: inset 1px 1px 3px #000;
}
.led.on { background-color: var(--led-on); box-shadow: 0 0 8px var(--led-on); }

.led.pos-tl { top: 26px; left: 100px; }
.led.pos-tr { top: 26px; right: 100px; }
.led.pos-bl { bottom: 26px; left: 100px; }
.led.pos-br { bottom: 26px; right: 100px; }

.corner-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.corner-panel.top-left {
    align-items: flex-end;
    transform: translateY(80px);
}
.corner-panel.top-right {
    align-items: flex-end;
    transform: translateY(80px);
}
.corner-panel.bottom-left {
    align-items: flex-start;
    transform: translateY(-80px);
}
.corner-panel.bottom-right {
    align-items: flex-start;
    transform: translateY(-80px);
}

.rocker-container {
    width: 50px;
    height: 80px;
    background-color: #000;
    border: 1px solid #333;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 4px;
}

.rocker-switch {
    width: 40px;
    height: 70px;
    background: #1a1a1a;
    cursor: pointer;
    position: relative;
    border-radius: 2px;
    transform-style: preserve-3d;
    transition: transform 0.1s;
    box-shadow: inset 0 0 5px #000;
}

.rocker-switch[data-state="0"] {
    background: linear-gradient(to bottom, #333 0%, #111 50%, #000 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.rocker-switch[data-state="1"] {
    background: linear-gradient(to bottom, #000 0%, #111 50%, #333 100%);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.2);
}

.rocker-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    box-sizing: border-box;
    z-index: 5;
}

.rocker-mark { color: #666; font-size: 8px; transition: color 0.1s, text-shadow 0.1s; }

.rocker-switch[data-state="0"] .rocker-overlay .rocker-mark:last-child,
.rocker-switch[data-state="1"] .rocker-overlay .rocker-mark:first-child {
    color: var(--text-primary);
    text-shadow: 0 0 3px rgb(var(--text-primary) / 0.5);
}

.rocker-text {
    color: #ccc;
    font-size: 9px;
    font-weight: bold;
    text-shadow: 0 1px 1px #000;
}

.btn-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 5px;
}
.btn-strip-h { flex-direction: row; }
.btn-strip-v { flex-direction: column; }

.osb-housing {
    padding: 4px;
    border-radius: 4px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.05), inset -1px -1px 2px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.2s;
}

.osb-housing.active {
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.05),
    inset -1px -1px 2px rgba(0,0,0,0.5),
    inset 0 0 10px var(--text-primary);
}

.osb {
    width: 50px;
    height: 50px;
    background-color: var(--btn-face);
    border-top: 2px solid #555;
    border-left: 2px solid #555;
    border-right: 2px solid #111;
    border-bottom: 2px solid #111;
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.8);
    position: relative;
}
.osb.active {
    background-color: #4a4a4a;
    border-color: #666 #222 #222 #666;
}
.osb:active {
    border-top: 2px solid #111;
    border-left: 2px solid #111;
    border-right: 2px solid #555;
    border-bottom: 2px solid #555;
    transform: translateY(1px);
}

.screen-housing {
    background-color: var(--screen);
    border: 4px solid #151515;
    border-radius: 20px;
    box-shadow: inset 0 0 40px #000;
    overflow: hidden;
    position: relative;
}

.screen-ui {
    width: 100%; height: 100%;
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    grid-template-rows: 50px minmax(0, 1fr) 50px;
    padding: 5px;
    box-sizing: border-box;
}

.ui-labels {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
}
.ui-labels.col { flex-direction: column; height: 100%; }

.lbl {
    color: var(--text-dim);
    font-size: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-shadow: none;
    white-space: nowrap;
}

.lbl.active {
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(var(--text-primary), 0.6);
}

.screen-center {
    grid-column: 2; grid-row: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed #222;
    color: #222;
    font-family: monospace;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    min-height: 0;
}

#content-container {
    width: 100%;
    height: 100%;
    max-width: 700px;
    max-height: 700px;
    display: block;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(var(--text-primary), 0.6);
    text-align: center;
    word-break: break-word;
    padding: 10px;
    box-sizing: border-box;
}

#content-container::-webkit-scrollbar {
    display: none;
}

.placeholder-text {
    color: #222;
    text-shadow: none;
    display: flex !important;
    justify-content: center;
    align-items: center;
    height: 100% !important;
}

#scroll-overlay {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 12px;
    background: transparent;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    box-sizing: border-box;
    z-index: 20;
    pointer-events: none;
}

.scroll-arrow {
    color: var(--text-primary);
    font-size: 10px;
    line-height: 10px;
    height: 10px;
    font-weight: bold;
}

.scroll-track {
    width: 100%;
    flex: 1;
    position: relative;
    margin: 2px 0;
}

#scroll-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-primary);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    box-shadow: 0 0 5px rgba(var(--text-primary), 0.8);
}

.chart-container {
    font-family: 'Courier New', Courier, monospace;
    width: 650px;
    height: 400px;
}
.map-container {
    font-family: 'Courier New', Courier, monospace;
    width: 650px;
    height: 400px;
}
svg {
    overflow: visible;
    background: transparent;
}
text {
    fill: var(--text-primary);
    font-size: 10px;
    font-family: 'Courier New', monospace;
}
.axis path,
.axis line {
    stroke: var(--text-primary);
    stroke-width: 1px;
    shape-rendering: crispEdges;
}
.bar {
    stroke: var(--text-primary);
    stroke-width: 1px;
}
.line-series {
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 2px;
}
.state {
    stroke: var(--text-primary);
    stroke-width: 0.5px;
}
.county {
    stroke: var(--text-primary);
    stroke-width: 0.25px;
}
.state-boundary {
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 1px;
}
.inset-box {
    fill: none;
    stroke: var(--text-dim);
    stroke-width: 1px;
}