:root {
  --bg-dark: #020817;
  --bg-deep: #041833;
  --accent-teal: #1dd4b0;
  --accent-blue: #3b82f6;
  --accent-gold: #facc15;
  --risk-low: #22c55e;
  --risk-med: #eab308;
  --risk-high: #f97316;
  --risk-very-high: #ef4444;
  --risk-extreme: #991b1b;
  --sphere-color: var(--accent-gold);
  --sphere-glow: rgba(250, 204, 21, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e7eb;
}

/* NAVY BACKGROUND YOU LIKED */
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(32, 62, 125, 0.55), rgba(10, 25, 54, 0.60)),
    linear-gradient(135deg, rgba(15, 40, 75, 0.85), rgba(5, 22, 45, 0.85)),
    linear-gradient(180deg, #0e1a2b, #0a1420);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 1200px;
  min-height: 650px;
  border-radius: 20px;
  overflow: hidden;
  padding: 24px;
  background: radial-gradient(circle at top, #020617 0, #020617 50%, #020814 100%);
  box-shadow:
    0 0 28px rgba(15, 23, 42, 0.55),
    0 0 80px rgba(17, 94, 163, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Subtle grid glow */
.app-shell::before {
  content: "";
  position: absolute;
  inset: -100px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  mix-blend-mode: screen;
  filter: blur(0.2px);
  animation: gridShift 40s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.app-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0, rgba(59, 130, 246, 0.22), transparent 45%),
    radial-gradient(circle at 90% 100%, rgba(34, 197, 94, 0.25), transparent 55%),
    radial-gradient(circle at 30% 100%, rgba(250, 204, 21, 0.13), transparent 55%);
  mix-blend-mode: lighten;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

@keyframes gridShift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-60px, -60px, 0); }
}

.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #9ca3af;
}

.brand-title span.logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #1dd4b0);
  box-shadow:
    0 0 12px rgba(34, 197, 94, 0.8),
    0 0 24px rgba(56, 189, 248, 0.7);
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.6));
  backdrop-filter: blur(8px);
}

.content main {
  display: grid;
  grid-template-columns: minmax(0, 55%) minmax(0, 45%);
  gap: 20px;
  flex: 1;
  min-height: 420px;
}

@media (max-width: 900px) {
  body { padding: 12px; }
  .app-shell { padding: 16px; }
  .content main { grid-template-columns: minmax(0, 1fr); }
}

.right-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* LEFT PANEL + FIELDS */

.panel {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background:
    radial-gradient(circle at top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.75));
  backdrop-filter: blur(14px);
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow:
    0 0 30px rgba(15, 23, 42, 0.8),
    0 0 60px rgba(30, 64, 175, 0.3);
}

.panel-title {
  font-size: 0.9rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-title .label-pill {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #9ca3af;
}

.section-group {
  border-radius: 14px;
  border: 1px solid rgba(75, 85, 99, 0.75);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.96),
    rgba(17, 24, 39, 0.9)
  );
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #9ca3af;
}

.section-header-title {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
}

.section-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  color: #9ca3af;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

@media (max-width: 700px) {
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #cbd5f5;
}

.field-label .key {
  display: flex;
  align-items: center;
  gap: 5px;
}

.field-label .mono {
  font-family: "JetBrains Mono", ui-monospace, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #9ca3af;
}

.field-label .badge {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* RANGE SLIDER – NEUTRAL BASE, JS SETS RISK COLOR */

.field input[type="range"] {
  width: 100%;
  cursor: pointer;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #475569, #475569); /* neutral slate */
  outline: none;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

.field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f9fafb;
  border: 2px solid #0f172a;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.45),
    0 0 10px rgba(15, 23, 42, 0.9);
}

.field input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f9fafb;
  border: 2px solid #0f172a;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.45),
    0 0 10px rgba(15, 23, 42, 0.9);
}

/* number + select */

.field input[type="number"],
.field select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  background: radial-gradient(circle at top, #020617, #020617);
  color: #e5e7eb;
  font-size: 0.8rem;
}

.field input[type="number"]:focus,
.field select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.9);
}

.field-value-display {
  font-size: 0.7rem;
  color: #9ca3af;
  text-align: right;
}


/* ===============================
   SCORE PILL – GLOBAL STYLE FIX
   =============================== */

#scoreNumber {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.22);   /* soft translucent pill */
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);

  box-shadow:
    0 0 10px var(--sphere-glow),
    0 0 18px rgba(10, 20, 40, 0.7),
    inset 0 0 6px rgba(255, 255, 255, 0.12);

  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.6px; 

}

#scoreNumber .unit {
  font-size: 0.95rem; 
  margin-left: 6px;
  opacity: 0.85;
 
}

/* Sphere small description text */
#sphereMeta {
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.98;
  letter-spacing: 0.2px;
  color: #e5e7eb;          /* fixed light slate for all bands */
  text-align: center;

  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 4px rgba(0, 0, 0, 0.25);
}


#scoreNumber {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}




