/* ============================================================
   NOVAK GLOBAL TELEMETRY CONSOLE — HOLO-GLASS THEME
   ============================================================ */

:root {
  --bg-main: #020511;
  --bg-panel: rgba(7, 20, 55, 0.86);
  --bg-panel-soft: rgba(10, 28, 78, 0.72);
  --bg-sidebar: rgba(3, 12, 32, 0.93);

  --border-soft: rgba(0, 210, 255, 0.30);
  --border-strong: rgba(0, 210, 255, 0.65);

  --txt-main: #e6f3ff;
  --txt-soft: #8aa3c6;
  --txt-accent: #61d6ff;
  --txt-alert: #ff6b81;
  --txt-safe: #7dffb3;

  --glow-main: rgba(0, 210, 255, 0.60);
  --glow-alert: rgba(255, 60, 100, 0.60);

  --radius-lg: 18px;
  --radius-md: 12px;

  --shadow-holo: 0 0 24px rgba(0, 210, 255, 0.45),
                 0 0 80px rgba(0, 34, 77, 0.85);
  --shadow-tile: 0 0 18px rgba(0, 162, 225, 0.35);

  --sidebar-width: 260px;
  --transition-fast: 160ms ease-out;
  --transition-med: 220ms ease-out;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, #071634 0, #020511 45%, #000104 100%);
  color: var(--txt-main);
  display: flex;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-soft);
  box-shadow: var(--shadow-holo);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 18px;
  gap: 18px;
  backdrop-filter: blur(18px);
  z-index: 20;
}

#sidebar-emblem img {
  max-width: 140px;
  height: auto;
  filter:
    drop-shadow(0 0 12px rgba(0, 210, 255, 0.75))
    drop-shadow(0 0 26px rgba(0, 80, 155, 0.9));
}

#sidebar-nav {
  width: 100%;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#sidebar-nav .nav-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 195, 255, 0.4);
  background: linear-gradient(
    135deg,
    rgba(3, 20, 60, 0.4),
    rgba(1, 9, 30, 0.9)
  );
  color: var(--txt-soft);
  font-size: 0.92rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition:
    background var(--transition-med),
    border-color var(--transition-med),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-med);
}

#sidebar-nav .nav-btn:hover {
  border-color: var(--border-strong);
  color: var(--txt-main);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.4);
  transform: translateY(-1px);
}

#sidebar-nav .nav-btn.active {
  background: radial-gradient(circle at 0% 0%, rgba(0, 210, 255, 0.25), rgba(0, 6, 22, 0.95));
  border-color: var(--border-strong);
  color: var(--txt-accent);
  box-shadow: var(--shadow-tile);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */

#main {
  margin-left: var(--sidebar-width);
  padding: 24px 26px 32px;
  flex: 1;
  min-height: 100vh;
}

/* ============================================================
   HEADER
   ============================================================ */

#page-header {
  margin-bottom: 18px;
  padding: 18px 20px 16px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0% 0%, rgba(0, 210, 255, 0.16), rgba(4, 16, 50, 0.9));
  border: 1px solid var(--border-soft);
  box-shadow: 0 0 26px rgba(0, 210, 255, 0.35);
}

.page-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#page-header h1 {
  margin: 0 0 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.3rem;
}

#page-header h2 {
  margin: 0;
  font-weight: 400;
  font-size: 0.94rem;
  color: var(--txt-soft);
}

.page-header-bottom {
  margin-top: 11px;
  font-size: 0.82rem;
  color: var(--txt-soft);
  opacity: 0.9;
}

.header-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
}

.badge-safe {
  border-color: rgba(125, 255, 179, 0.35);
  color: var(--txt-safe);
}

.badge-live {
  border-color: rgba(255, 105, 135, 0.45);
  color: #ff9ab0;
}

/* ============================================================
   REGION GRID
   ============================================================ */

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.region-card {
  position: relative;
  padding: 12px 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-panel-soft);
  border: 1px solid rgba(0, 210, 255, 0.35);
  box-shadow: 0 0 18px rgba(0, 210, 255, 0.25);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-med);
}

.region-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(0, 210, 255, 0.22), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(0, 80, 200, 0.24), transparent 68%);
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
}

.region-card:hover::before {
  opacity: 1;
}

.region-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-tile);
  border-color: var(--border-strong);
}

.region-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.region-main {
  display: flex;
  flex-direction: column;
}

.region-flag {
  font-size: 1.35rem;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.7));
}

.region-name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.region-code {
  font-size: 0.78rem;
  color: var(--txt-soft);
}

.region-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(125, 255, 179, 0.9);
  background: linear-gradient(135deg, #4af2a1, #96ffc8);
}

.status-dot.alert {
  background: linear-gradient(135deg, #ff6b81, #ffb3c0);
  box-shadow: 0 0 10px var(--glow-alert);
}

.region-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  margin-top: 6px;
}

.region-metric-label {
  font-size: 0.74rem;
  color: var(--txt-soft);
}

.region-metric-value {
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   PANELS
   ============================================================ */

.panel {
  padding: 18px 20px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  box-shadow: 0 0 24px rgba(0, 48, 100, 0.75);
  backdrop-filter: blur(16px);
}

.panel + .panel {
  margin-top: 18px;
}

.panel-header {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel-subtitle {
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: var(--txt-soft);
}

/* ============================================================
   MASONRY GRID + TILES
   ============================================================ */

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.tile {
  padding: 14px 14px 12px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 0 0, rgba(0, 210, 255, 0.1), rgba(2, 10, 35, 0.9));
  border: 1px solid rgba(0, 210, 255, 0.35);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
}

.tile-accent {
  background: radial-gradient(circle at 0 0, rgba(40, 255, 197, 0.1), rgba(2, 12, 42, 0.95));
}

.tile-alert {
  border-color: rgba(255, 99, 132, 0.7);
  box-shadow: 0 0 18px var(--glow-alert);
}

.tile-header {
  margin-bottom: 8px;
}

.tile-title {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tile-subtitle {
  font-size: 0.78rem;
  color: var(--txt-soft);
}

.tile-value {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--txt-accent);
}

.tile-footnote {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--txt-soft);
  opacity: 0.95;
}

.tile-meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(8, 23, 65, 0.9);
  overflow: hidden;
  margin-top: 6px;
}

.tile-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #46f0ff, #7dffb3);
  box-shadow: 0 0 10px rgba(70, 240, 255, 0.9);
  transition: width 260ms ease-out;
}

/* ============================================================
   BUTTONS / CONTROLS
   ============================================================ */

.pill-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 210, 255, 0.5);
  background: radial-gradient(circle at 0 0, rgba(0, 210, 255, 0.4), rgba(0, 8, 26, 0.9));
  color: var(--txt-main);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background var(--transition-med),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.pill-btn:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.45);
}

/* ============================================================
   MESH PANEL
   ============================================================ */

#mesh-toolbar {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mesh-label {
  font-size: 0.82rem;
  color: var(--txt-soft);
}

#mesh-container {
  margin-top: 4px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(0, 210, 255, 0.4);
  min-height: 220px;
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 210, 255, 0.16), rgba(1, 6, 26, 0.95));
  position: relative;
  overflow: hidden;
}

/* simple node dots */
.mesh-node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #46f0ff;
  box-shadow: 0 0 12px rgba(70, 240, 255, 0.9);
}

.mesh-link {
  position: absolute;
  background: linear-gradient(90deg, rgba(70, 240, 255, 0.7), rgba(125, 255, 179, 0.9));
  opacity: 0.85;
}

/* ============================================================
   NEX-X1 PANEL
   ============================================================ */

#nexx1-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.field-inline {
  font-size: 0.8rem;
  color: var(--txt-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-inline input[type="range"] {
  accent-color: #46f0ff;
}

.field-inline.toggle input {
  accent-color: #46f0ff;
}

#nexx1-container {
  min-height: 220px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(0, 210, 255, 0.45);
  padding: 10px 12px;
  background:
    linear-gradient(135deg, rgba(0, 210, 255, 0.17), rgba(1, 5, 18, 0.98));
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.nexx1-stage-label {
  font-size: 0.82rem;
  color: var(--txt-soft);
}

.nexx1-timeline {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--txt-soft);
  margin-top: 6px;
}

.nexx1-band {
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.nexx1-band-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(70, 240, 255, 0.8), rgba(125, 255, 179, 0.9));
  transform-origin: left;
  transform: scaleX(0.2);
  transition: transform 260ms ease-out;
}

.nexx1-bytecode {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ============================================================
   SETTINGS PANEL
   ============================================================ */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.settings-card {
  padding: 12px 12px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 210, 255, 0.35);
  background: rgba(3, 12, 40, 0.92);
}

.settings-card h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.settings-footnote {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--txt-soft);
}

/* ============================================================
   DEBUG MODE
   ============================================================ */

body.debug-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  :root {
    --sidebar-width: 220px;
  }
}

@media (max-width: 780px) {
  #sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 64px;
    padding: 8px 12px;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }

  #sidebar-emblem img {
    max-width: 90px;
  }

  #sidebar-nav {
    flex-direction: row;
    justify-content: flex-end;
    gap: 6px;
  }

  #sidebar-nav .nav-btn {
    font-size: 0.78rem;
    padding: 6px 8px;
  }

  #main {
    margin-left: 0;
    margin-top: 76px;
    padding: 16px 14px 20px;
  }

  .page-header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-badges {
    justify-content: flex-start;
  }
}

/* ============================================================
   NOVAK — SUBTLE POLISHED FX (OPTION B)
   Safe, non-breaking hologram effects
   ============================================================ */

/* Emblem container */
#sidebar-emblem {
  width: 110px;
  height: 110px;
  margin: 0 auto 14px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Emblem image */
#sidebar-emblem img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  transition: transform 0.25s ease, filter 0.35s ease;
  filter: drop-shadow(0 0 12px rgba(0, 210, 255, 0.5));
}

/* Hover tilt — tiny, safe */
#sidebar-emblem:hover img {
  transform: scale(1.04) rotateZ(1deg);
  filter: drop-shadow(0 0 18px rgba(0, 255, 255, 0.9));
}

/* Soft breathing glow behind emblem */
#sidebar-emblem::before {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 180, 255, 0.22),
    rgba(0, 110, 220, 0.10),
    transparent 70%
  );
  animation: emblemBreath 4.8s ease-in-out infinite;
  z-index: 0;
}

@keyframes emblemBreath {
  0%, 100% { opacity: 0.30; transform: scale(0.97); }
  50%      { opacity: 0.55; transform: scale(1.06); }
}

/* Sidebar button subtle neon shimmer */
#sidebar-nav .nav-btn {
  position: relative;
  overflow: hidden;
}

#sidebar-nav .nav-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(0, 210, 255, 0.25),
    transparent
  );
  transition: transform 0.45s ease;
}

#sidebar-nav .nav-btn:hover::after {
  transform: translateX(260%);
}

/* ============================================================
   LIVE TELEMETRY FX PACK — NON-BREAKING ADDITIVE EFFECTS
   ============================================================ */

/* Live number flash */
.live-number {
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.live-number.updated {
  color: #7dffb3 !important;
  text-shadow: 0 0 10px rgba(125,255,179,0.8);
}

/* Pulsing health dot */
.status-dot {
  animation: healthPulse 2.2s ease-in-out infinite;
}
@keyframes healthPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(125,255,179,0.9); }
  50%       { transform: scale(1.25); box-shadow: 0 0 20px rgba(125,255,179,1); }
}

/* Shockwave alert for drift spikes */
.tile-alert {
  position: relative;
}
.tile-alert.new-alert::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255,99,132,0.8);
  animation: driftShockwave 1.4s ease-out forwards;
}
@keyframes driftShockwave {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25); }
}

/* Global Consensus flowing bar */
.tile-meter-fill.flow {
  background-size: 200% 100%;
  animation: fluidBar 3.8s linear infinite;
}
@keyframes fluidBar {
  0%   { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}

/* Live Telemetry badge pulse */
.badge-live {
  animation: livePulse 2.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.1); }
}

/* Region card latency glow */
.region-card[data-latency="low"] {
  box-shadow: 0 0 18px rgba(0,210,255,0.25);
}
.region-card[data-latency="med"] {
  box-shadow: 0 0 22px rgba(0,150,255,0.35);
}
.region-card[data-latency="high"] {
  box-shadow: 0 0 26px rgba(200,80,255,0.4);
}

/* Emblem particle field */
#sidebar-emblem {
  position: relative;
  overflow: visible;
}
.novak-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(0,210,255,0.8);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0,210,255,1);
  animation: particleFloat 4s linear infinite;
}
@keyframes particleFloat {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(-10px,-45px) scale(0.3); opacity: 0; }
}

/* ============================================================
   LIVE TELEMETRY FX — NON BREAKING
   ============================================================ */

/* Flash numbers when updated */
.live-number.updated {
  color: #7dffb3 !important;
  text-shadow: 0 0 8px rgba(125, 255, 179, 0.9);
  transition: color 0.25s ease-out, text-shadow 0.25s ease-out;
}

/* Latency glow presets */
.region-card[data-latency="low"] {
  box-shadow: 0 0 14px rgba(0, 255, 180, 0.35);
  border-color: rgba(0, 255, 180, 0.55);
}

.region-card[data-latency="med"] {
  box-shadow: 0 0 14px rgba(255, 200, 0, 0.25);
  border-color: rgba(255, 200, 0, 0.55);
}

.region-card[data-latency="high"] {
  box-shadow: 0 0 14px rgba(255, 30, 60, 0.45);
  border-color: rgba(255, 30, 60, 0.65);
}

/* Drift shockwave on drift tile */
.new-alert {
  animation: driftShock 0.8s ease-out;
}

@keyframes driftShock {
  0%   { transform: scale(1);   box-shadow: 0 0 0px rgba(255, 80, 120, 0.0); }
  40%  { transform: scale(1.06); box-shadow: 0 0 22px rgba(255, 80, 120, 0.45); }
  100% { transform: scale(1);   box-shadow: 0 0 0px rgba(255, 80, 120, 0.0); }
}

/* Consensus bar flow */
#consensus-bar.flow {
  background: linear-gradient(90deg,
      rgba(70, 240, 255, 0.8),
      rgba(125, 255, 179, 0.9),
      rgba(70, 240, 255, 0.8)
  );
  background-size: 200% 100%;
  animation: barFlow 3.6s linear infinite;
}

@keyframes barFlow {
  0%   { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}

/* Tiny rising emblem particles */
.novak-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.85);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.9);
  opacity: 0.9;
  animation: particleRise ease-out forwards;
}

@keyframes particleRise {
  from { transform: translateY(0) scale(1); opacity: 0.9; }
  to   { transform: translateY(-40px) scale(0.4); opacity: 0; }
}

/* ============================================================
   LIVE TELEMETRY FX — FLASH, SHOCK, FLOW, LATENCY COLORS
   ============================================================ */

/* Numbers flash cyan when updated */
.live-number.updated {
  animation: flashNumber 0.4s ease-out;
}

@keyframes flashNumber {
  0% { color: #ffffff; text-shadow: 0 0 12px #00e6ff; }
  100% { color: var(--txt-accent); text-shadow: none; }
}

/* Drift spike tile shakes briefly on anomaly */
.new-alert {
  animation: driftShock 0.6s ease-in-out;
}

@keyframes driftShock {
  0% { transform: scale(1.00); }
  25% { transform: scale(1.03) rotate(1deg); }
  50% { transform: scale(0.97) rotate(-1deg); }
  75% { transform: scale(1.02); }
  100% { transform: scale(1.00); }
}

/* Consensus bar flow animation */
.tile-meter-fill.flow {
  animation: flowPulse 1.8s infinite ease-in-out;
}

@keyframes flowPulse {
  0% { opacity: 0.9; }
  50% { opacity: 0.45; }
  100% { opacity: 0.9; }
}

/* Region latency coloring */
.region-card[data-latency="low"] {
  border-color: rgba(0,255,160,0.55);
  box-shadow: 0 0 18px rgba(0,255,160,0.45);
}

.region-card[data-latency="med"] {
  border-color: rgba(255,200,0,0.5);
  box-shadow: 0 0 16px rgba(255,200,0,0.35);
}

.region-card[data-latency="high"] {
  border-color: rgba(255,70,70,0.7);
  box-shadow: 0 0 22px rgba(255,70,70,0.55);
}

/* ============================================================
   FX TOGGLES — MATCH SIDEBAR BUTTONS
   ============================================================ */

.sidebar-group {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-toggle {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 25, 40, 0.55);
  border: 1px solid rgba(0, 180, 255, 0.35);
  color: #bfeaff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.28s ease;
  text-align: left;
}

.sidebar-toggle:hover {
  border-color: rgba(0, 210, 255, 0.8);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.25);
}

/* OFF STATE */
.sidebar-toggle.off {
  opacity: 0.45;
  background: rgba(10, 20, 30, 0.45);
  border-color: rgba(120, 120, 120, 0.25);
  color: #7f9ab7;
  box-shadow: none;
}

/* ON STATE — strong glow */
.sidebar-toggle.on {
  background: rgba(0, 35, 60, 0.85);
  border-color: rgba(0, 225, 255, 0.85);
  color: #e6faff;
  box-shadow: 0 0 22px rgba(0, 225, 255, 0.45);
}

/* ============================================================
   FX TOGGLE PANEL + LED BUTTONS
   ============================================================ */

#fx-toggle-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

/* Base toggle button */
.fx-toggle {
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,210,255,0.40);
  background: rgba(0, 24, 50, 0.65);
  color: #d8f6ff;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  transition: 0.25s ease;
  position: relative;
}

/* LED DOT */
.fx-toggle::before {
  content: "●";
  font-size: 0.8rem;
  margin-right: 6px;
  transition: color 0.25s ease, opacity 0.25s ease;
}

/* ON STATE (green LED) */
.fx-toggle.on {
  border-color: rgba(0,255,180,0.55);
  color: #eaffff;
  box-shadow: 0 0 10px rgba(0,255,180,0.35);
}
.fx-toggle.on::before {
  color: #4aff9a;
  opacity: 1;
}

/* OFF STATE (red LED) */
.fx-toggle.off {
  opacity: 0.55;
  color: #9bb1c6;
  border-color: rgba(255, 90, 110, 0.35);
  box-shadow: none;
}
.fx-toggle.off::before {
  color: #ff5b6b;
  opacity: 0.8;
}

/* =========================================================
   FX Toggle Buttons – LED Indicators
   ========================================================= */
#fx-toggle-panel {
  width: 100%;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.fx-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 20, 40, 0.55);
  border: 1px solid rgba(0,210,255,0.35);
  border-radius: 14px;
  color: #c8ecff;
  cursor: pointer;
  transition: 0.25s ease;
  font-size: 0.88rem;
}

.fx-toggle:hover {
  background: rgba(0,210,255,0.12);
}

/* LED DOT */
.fx-toggle .led {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 6px #000;
  transition: 0.25s ease;
}

/* ON STATE — FUTURISTIC CYAN */
.fx-toggle.on .led {
  background: #4ffcff;
  box-shadow: 0 0 8px #4ffcff, 0 0 12px rgba(79,252,255,0.7);
}

/* OFF STATE — DIM RED */
.fx-toggle.off .led {
  background: #ff3b47;
  box-shadow: 0 0 6px rgba(255,0,0,0.45);
}

/* CLICK FEEDBACK */
.fx-toggle:active {
  transform: scale(0.97);
}

.fx-toggle .led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  background: red;
  box-shadow: 0 0 4px red;
  transition: 0.2s ease;
}

.fx-toggle.on .led {
  background: #00ff9c;
  box-shadow: 0 0 6px #00ff9c;
}
