/* ============================================================
   PHOSPHOR :: VISUAL SUBSYSTEM
   [RENDER ENGINE v0.1 // NASA-DASHBOARD DARK MODE]
   ============================================================ */

/* -- [DESIGN TOKENS :: PHOSPHOR COLOR MATRIX] -- */
:root {
  --phosphor-green:       #00ff41;
  --phosphor-green-dim:   #00cc33;
  --phosphor-green-faint: #003310;
  --phosphor-green-glow:  rgba(0, 255, 65, 0.25);
  --phosphor-amber:       #ffb300;
  --phosphor-red:         #ff3131;

  --bg-void:    #000000;
  --bg-surface: #0a0f0a;
  --bg-panel:   rgba(0, 10, 2, 0.85);

  --border-dim:    rgba(0, 255, 65, 0.15);
  --border-active: rgba(0, 255, 65, 0.55);

  --font-mono: 'JetBrains Mono', 'Courier New', Courier, monospace;
  --font-size-base: clamp(13px, 1.5vw, 18px);

  --entropy-threshold: 80; /* used by JS, mirrored here for documentation */
  --thermal-decay-alpha: 0.04; /* canvas fade per frame */
}

/* -- [RESET :: ZERO POINT CALIBRATION] -- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-void);
  color: var(--phosphor-green);
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  -webkit-font-smoothing: none; /* intentional: CRT feel */
}

body {
    user-select: none;
    touch-action: pan-x pan-y;
    overscroll-behavior: none;
}

/* -- [ENTROPY CANVAS :: PRIMARY THERMAL DISPLAY] -- */
#entropyCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  z-index: 0;
}

/* -- [SCANLINE OVERLAY :: CRT SIMULATION] -- */
#scanlineOverlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
  animation: scanlineFlicker 8s steps(1) infinite;
}

@keyframes scanlineFlicker {
  0%   { opacity: 1; }
  92%  { opacity: 1; }
  93%  { opacity: 0.92; }
  94%  { opacity: 1; }
  97%  { opacity: 0.95; }
  100% { opacity: 1; }
}

#scanlineOverlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 45%,
    color-mix(in srgb, var(--phosphor-green) 4%, transparent) 49%,
    color-mix(in srgb, var(--phosphor-green) 10%, transparent) 50%,
    color-mix(in srgb, var(--phosphor-green) 4%, transparent) 51%,
    transparent 55%,
    transparent 100%
  );
  animation: scanlineSweep 5s linear infinite;
  pointer-events: none;
}

@keyframes scanlineSweep {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* -- [TERMINAL OVERLAY :: COMMAND INTERFACE LAYER] -- */
#terminalOverlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  gap: 1rem;
}

/* Allow interactive children to receive pointer events */
#terminalOverlay button {
  pointer-events: auto;
}

/* -- [FOCUS INDICATORS :: KEYBOARD NAV] -- */
button:focus-visible,
input:focus-visible {
  outline: 1px solid var(--phosphor-green);
  outline-offset: 2px;
  box-shadow: 0 0 6px var(--phosphor-green-glow);
}

/* -- [SYSTEM HEADER] -- */
#systemHeader {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-dim);
  padding: 1.5rem 1.5rem 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sys-label {
  color: var(--phosphor-green-dim);
  font-size: 0.75em;
}

.sys-version {
  color: var(--phosphor-green-faint);
  font-size: 0.7em;
  flex: 1;
}

#systemClock {
  font-size: 0.75em;
}

.header-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

#settingsBtn {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--phosphor-green-dim);
  font-family: var(--font-mono);
  font-size: 0.65em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.75rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  #settingsBtn:hover {
    border-color: var(--border-active);
    color: var(--phosphor-green);
    box-shadow: 0 0 6px var(--phosphor-green-glow);
  }
}

/* -- [ENTROPY MONITOR :: THERMAL FLUX GAUGE] -- */
#entropyMonitor {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  padding: 0.8rem 1rem;
  width: min(800px, calc(100% - 3rem));
}

.monitor-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.label {
  font-size: 0.7em;
  letter-spacing: 0.1em;
  color: var(--phosphor-green-dim);
  white-space: nowrap;
  text-transform: uppercase;
}

.value {
  font-size: 0.75em;
  color: var(--phosphor-green);
  white-space: nowrap;
  min-width: 3ch;
  text-align: right;
}

/* Entropy progress bar */
#entropyBar {
  flex: 1;
  height: 8px;
  background: var(--phosphor-green-faint);
  border: 1px solid var(--border-dim);
  position: relative;
  overflow: hidden;
}

#entropyFill {
  height: 100%;
  width: 0%;
  background: var(--phosphor-green-dim);
  transition: width 0.3s ease, background 0.4s ease;
  box-shadow: 0 0 6px var(--phosphor-green-dim);
}

/* Surge state when entropy is high */
#entropyBar.surge #entropyFill {
  background: var(--phosphor-green);
  box-shadow: 0 0 12px var(--phosphor-green), 0 0 24px var(--phosphor-green-glow);
}

.status-line {
  font-size: 0.68em;
  color: var(--phosphor-green-dim);
  letter-spacing: 0.06em;
  min-height: 1.4em;
}

/* -- [CIPHER FORGE :: PASSWORD OUTPUT TERMINAL] -- */
#cipherForge {
  margin: 0 auto;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  padding: 1rem;
  width: min(800px, calc(100% - 3rem));
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

#cipherForge.locked {
  border-color: var(--border-dim);
}

#cipherForge.armed {
  border-color: var(--border-active);
  box-shadow: 0 0 20px var(--phosphor-green-glow), inset 0 0 10px rgba(0, 255, 65, 0.04);
}

.forge-label {
  font-size: 0.65em;
  letter-spacing: 0.15em;
  color: var(--phosphor-green-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.4rem;
}

#cipherDisplay {
  font-size: clamp(17px, 3vw, 28px);
  letter-spacing: 0.25em;
  color: var(--phosphor-green);
  word-break: break-all;
  min-height: 1.8em;
  text-shadow: 0 0 8px var(--phosphor-green-glow);
  transition: color 0.3s, text-shadow 0.3s;
}

#cipherForge.locked #cipherDisplay {
  color: var(--phosphor-green-faint);
  text-shadow: none;
}

/* -- [CIPHER REVEAL ANIMATION :: SCRAMBLE DECODE SEQUENCE] -- */
#cipherDisplay.cipher-animating {
  color: var(--phosphor-green);
  text-shadow: 0 0 14px var(--phosphor-green-glow), 0 0 2px #fff;
  animation: cipherFlicker 0.07s linear infinite;
}

@keyframes cipherFlicker {
  0%   { opacity: 1; }
  50%  { opacity: 0.85; }
  100% { opacity: 1; }
}

/* -- [FORGE BUTTON] -- */
.forge-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#forgeBtn,
#copyBtn,
#resetBtn {
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.75em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.75rem 1.1rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border-dim);
  color: var(--phosphor-green-dim);
  cursor: pointer;
}

#forgeBtn {
  cursor: not-allowed;
}

#copyBtn {
  cursor: not-allowed;
}

#copyBtn:not(:disabled) {
  cursor: pointer;
  border-color: var(--border-active);
  color: var(--phosphor-green);
  box-shadow: 0 0 8px var(--phosphor-green-glow);
}

@media (hover: hover) {
  #copyBtn:not(:disabled):hover {
    background: var(--phosphor-green-glow);
    box-shadow: 0 0 16px var(--phosphor-green), 0 0 32px var(--phosphor-green-glow);
  }
}

#copyBtn:not(:disabled):active {
  box-shadow: none;
  background: rgba(0, 255, 65, 0.1);
}

#forgeBtn:not(:disabled) {
  cursor: pointer;
  border-color: var(--border-active);
  color: var(--phosphor-green);
  box-shadow: 0 0 8px var(--phosphor-green-glow);
}

@media (hover: hover) {
  #forgeBtn:not(:disabled):hover {
    background: var(--phosphor-green-glow);
    box-shadow: 0 0 16px var(--phosphor-green), 0 0 32px var(--phosphor-green-glow);
  }
}

#forgeBtn:not(:disabled):active {
  box-shadow: none;
  background: rgba(0, 255, 65, 0.1);
}

#resetBtn {
  cursor: not-allowed;
}

#resetBtn:not(:disabled) {
  cursor: pointer;
  border-color: var(--border-active);
  color: var(--phosphor-green);
  box-shadow: 0 0 8px var(--phosphor-green-glow);
}

@media (hover: hover) {
  #resetBtn:not(:disabled):hover {
    background: var(--phosphor-green-glow);
    box-shadow: 0 0 16px var(--phosphor-green), 0 0 32px var(--phosphor-green-glow);
  }
}

#resetBtn:not(:disabled):active {
  background: rgba(0, 255, 65, 0.1);
  box-shadow: none;
}

/* -- [SYSTEM FOOTER] -- */
#systemFooter {
  display: flex;
  gap: 2rem;
  border-top: 1px solid var(--border-dim);
  padding: 0.6rem 1.5rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68em;
}

.status-ok    { color: var(--phosphor-green); }
.status-warn  { color: var(--phosphor-amber); }
.status-alert { color: var(--phosphor-red); }

/* -- [UTILITIES :: BLINK ANIMATION] -- */
.blink {
  animation: blink 1.1s step-end infinite;
}

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

/* -- [LOW-POWER STATE :: UNSTABLE UI MODE] -- */
body.low-power #terminalOverlay {
  animation: lowPowerFlicker 3s steps(2) infinite;
}

@keyframes lowPowerFlicker {
  0%   { opacity: 1; }
  85%  { opacity: 1; }
  87%  { opacity: 0.7; }
  89%  { opacity: 1; }
  100% { opacity: 1; }
}

/* ============================================================
   SETTINGS MODAL :: CIPHER CONFIGURATION INTERFACE
   ============================================================ */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.80);
  align-items: center;
  justify-content: center;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-panel {
  background: #030a03;
  border: 1px solid var(--border-active);
  box-shadow: 0 0 40px var(--phosphor-green-glow), inset 0 0 20px rgba(0, 255, 65, 0.02);
  width: min(480px, 92vw);
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
}

/* -- Modal Header -- */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-dim);
}

.modal-title {
  font-size: 0.72em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--phosphor-green);
}

.modal-close {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--phosphor-green-dim);
  font-family: var(--font-mono);
  font-size: 1em;
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

@media (hover: hover) {
  .modal-close:hover {
    border-color: var(--phosphor-green);
    color: var(--phosphor-green);
    box-shadow: 0 0 8px var(--phosphor-green-glow);
  }

  body.theme-orange .modal-close:hover {
    border-color: var(--phosphor-amber);
    color: var(--phosphor-amber);
    box-shadow: 0 0 8px rgba(255, 179, 0, 0.35);
  }
}

/* -- Modal Body -- */
.modal-body {
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.setting-label {
  font-size: 0.62em;
  letter-spacing: 0.14em;
  color: var(--phosphor-green-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.3rem;
}

/* Range slider */
.setting-control {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--phosphor-green-faint);
  outline: none;
  cursor: pointer;
  border: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--phosphor-green);
  box-shadow: 0 0 6px var(--phosphor-green-glow);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--phosphor-green);
  border: none;
  box-shadow: 0 0 6px var(--phosphor-green-glow);
  cursor: pointer;
}

.setting-value {
  font-size: 1em;
  color: var(--phosphor-green);
  min-width: 2ch;
  text-align: right;
}

.setting-unit {
  font-size: 0.6em;
  color: var(--phosphor-green-dim);
  letter-spacing: 0.1em;
}

/* Toggle switches */
.setting-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.toggle-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 32px;
  height: 16px;
  flex-shrink: 0;
  background: var(--phosphor-green-faint);
  border: 1px solid var(--border-dim);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  background: var(--phosphor-green-dim);
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle-item input:checked ~ .toggle-track {
  background: rgba(0, 255, 65, 0.10);
  border-color: var(--border-active);
}

.toggle-item input:checked ~ .toggle-track::after {
  transform: translateX(16px);
  background: var(--phosphor-green);
  box-shadow: 0 0 4px var(--phosphor-green-glow);
}

.toggle-label {
  font-size: 0.72em;
  letter-spacing: 0.07em;
  color: var(--phosphor-green-dim);
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.toggle-item input:checked ~ .toggle-track ~ .toggle-label {
  color: var(--phosphor-green);
}

/* -- Modal Footer -- */
.modal-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-dim);
}

.setting-warning {
  flex: 1;
  font-size: 0.62em;
  letter-spacing: 0.05em;
  color: var(--phosphor-amber);
  min-height: 1.2em;
}

#settingsApply,
#settingsCancel {
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.7em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

#settingsApply {
  border: 1px solid var(--border-active);
  color: var(--phosphor-green);
}

@media (hover: hover) {
  #settingsApply:hover {
    background: var(--phosphor-green-glow);
    box-shadow: 0 0 10px var(--phosphor-green-glow);
  }
}

#settingsCancel {
  border: 1px solid var(--border-dim);
  color: var(--phosphor-green-dim);
}

@media (hover: hover) {
  #settingsCancel:hover {
    border-color: var(--border-active);
    color: var(--phosphor-green);
  }
}

/* ============================================================
   THEME :: ORANGE PHOSPHOR
   [DISPLAY MATRIX OVERRIDE — AMBER/ORANGE WAVELENGTH]
   ============================================================ */

body.theme-orange {
  --phosphor-green:       #ff8c00;
  --phosphor-green-dim:   #cc6600;
  --phosphor-green-faint: #150800;
  --phosphor-green-glow:  rgba(255, 140, 0, 0.25);
  --bg-surface: #100800;
  --bg-panel:   rgba(10, 4, 0, 0.85);
  --border-dim:    rgba(255, 140, 0, 0.15);
  --border-active: rgba(255, 140, 0, 0.55);
  color: var(--phosphor-green);
}

body.theme-orange .modal-panel {
  background: #0a0300;
  box-shadow: 0 0 40px var(--phosphor-green-glow), inset 0 0 20px rgba(255, 140, 0, 0.02);
}

body.theme-orange .toggle-item input:checked ~ .toggle-track {
  background: rgba(255, 140, 0, 0.10);
}

/* ============================================================
   THEME SELECTOR :: DISPLAY MATRIX TOGGLE
   ============================================================ */

.theme-selector {
  display: flex;
  gap: 0.6rem;
}

.theme-option {
  flex: 1;
  cursor: pointer;
  user-select: none;
}

.theme-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.65em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid;
  transition: all 0.2s ease;
}

.theme-swatch::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.theme-swatch--green {
  border-color: rgba(0, 255, 65, 0.20);
  color: #00cc33;
}

.theme-swatch--green::before {
  background: #00ff41;
  box-shadow: 0 0 4px rgba(0, 255, 65, 0.60);
}

.theme-swatch--orange {
  border-color: rgba(255, 140, 0, 0.20);
  color: #cc6600;
}

.theme-swatch--orange::before {
  background: #ff8c00;
  box-shadow: 0 0 4px rgba(255, 140, 0, 0.60);
}

/* Focus indicators for keyboard nav */
.theme-option input:focus-visible ~ .theme-swatch {
  outline: 1px dotted currentColor;
  outline-offset: 2px;
}

/* Selected states */
.theme-option input:checked ~ .theme-swatch--green {
  border-color: rgba(0, 255, 65, 0.60);
  color: #00ff41;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.20);
}

.theme-option input:checked ~ .theme-swatch--orange {
  border-color: rgba(255, 140, 0, 0.60);
  color: #ff8c00;
  box-shadow: 0 0 8px rgba(255, 140, 0, 0.20);
}

/* ============================================================
   WELCOME MODAL :: SYSTEM OVERVIEW INTERFACE
   ============================================================ */

.modal-panel--wide {
  width: min(580px, 92vw);
}

.welcome-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.welcome-section[hidden] {
  display: none;
}

.welcome-text {
  font-size: 0.78em;
  line-height: 1.7;
  color: var(--phosphor-green);
  letter-spacing: 0.03em;
}

.welcome-steps {
  list-style: none;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-dim);
  background: rgba(0, 255, 65, 0.02);
}

.welcome-steps li {
  counter-increment: step-counter;
  font-size: 0.72em;
  line-height: 1.6;
  color: var(--phosphor-green-dim);
  padding-left: 2.2em;
  position: relative;
  letter-spacing: 0.03em;
}

.welcome-steps li::before {
  content: counter(step-counter) '.';
  position: absolute;
  left: 0;
  color: var(--phosphor-green);
  font-weight: bold;
  letter-spacing: 0;
}

.welcome-steps strong {
  color: var(--phosphor-green);
}

.welcome-note {
  font-size: 0.65em;
  letter-spacing: 0.07em;
  color: var(--phosphor-green-dim);
  border-top: 1px solid var(--border-dim);
  padding-top: 0.65rem;
}

/* Technical detail panel */
.welcome-technical {
  border: 1px solid var(--border-dim);
  background: rgba(0, 255, 65, 0.02);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.welcome-technical[hidden] {
  display: none;
}

.welcome-technical .setting-label {
  border-bottom-color: var(--border-dim);
  padding-bottom: 0.4rem;
}

.welcome-tech-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 0;
}

.welcome-tech-list li {
  font-size: 0.68em;
  line-height: 1.6;
  color: var(--phosphor-green-dim);
  padding-left: 1.4em;
  position: relative;
  letter-spacing: 0.03em;
}

.welcome-tech-list li::before {
  content: '//';
  position: absolute;
  left: 0;
  color: var(--phosphor-green-faint);
  font-size: 0.9em;
  line-height: 1.8;
}

.welcome-tech-list strong,
.welcome-tech-list code {
  color: var(--phosphor-green);
  font-family: var(--font-mono);
}

/* Welcome footer layout */
.welcome-footer {
  flex-wrap: wrap;
}

.welcome-footer-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

/* Ghost button (Technical Detail toggle) */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--phosphor-green-dim);
  font-family: var(--font-mono);
  font-size: 0.7em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .btn-ghost:hover {
    border-color: var(--border-active);
    color: var(--phosphor-green);
  }
}

/* Dismiss button (matches settingsApply style) */
#welcomeDismiss {
  background: transparent;
  border: 1px solid var(--border-active);
  color: var(--phosphor-green);
  font-family: var(--font-mono);
  font-size: 0.7em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  #welcomeDismiss:hover {
    background: var(--phosphor-green-glow);
    box-shadow: 0 0 10px var(--phosphor-green-glow);
  }
}

/* ============================================================
   ABOUT MODAL :: OPERATOR PROFILE INTERFACE
   ============================================================ */

/* -- About button (matches settingsBtn style) -- */
#aboutBtn {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--phosphor-green-dim);
  font-family: var(--font-mono);
  font-size: 0.65em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.75rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  #aboutBtn:hover {
    border-color: var(--border-active);
    color: var(--phosphor-green);
    box-shadow: 0 0 6px var(--phosphor-green-glow);
  }
}

/* -- About panel -- */
.modal-panel--about {
  width: min(560px, 92vw);
}

/* -- About modal body -- */
.about-body {
  gap: 1.2rem;
}

/* -- Profile row -- */
.about-profile {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

/* -- Avatar -- */
.about-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}

.about-avatar-ring {
  position: absolute;
  inset: -4px;
  border: 1px solid var(--border-active);
  box-shadow:
    0 0 10px var(--phosphor-green-glow),
    0 0 24px var(--phosphor-green-glow),
    inset 0 0 10px rgba(0, 255, 65, 0.06);
  animation: aboutRingPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes aboutRingPulse {
  0%, 100% { box-shadow: 0 0 10px var(--phosphor-green-glow), 0 0 24px var(--phosphor-green-glow), inset 0 0 10px rgba(0, 255, 65, 0.06); }
  50%       { box-shadow: 0 0 18px var(--phosphor-green-glow), 0 0 40px var(--phosphor-green-glow), inset 0 0 16px rgba(0, 255, 65, 0.10); }
}

.about-avatar {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.95) sepia(0.08) hue-rotate(60deg);
  transition: filter 0.4s ease;
}

@media (hover: hover) {
  .about-avatar-wrap:hover .about-avatar {
    filter: saturate(1.1) brightness(1.05) sepia(0) hue-rotate(0deg);
  }
}

/* Scan line sweeping the avatar */
.about-avatar-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 45%,
    color-mix(in srgb, var(--phosphor-green) 12%, transparent) 49%,
    color-mix(in srgb, var(--phosphor-green) 22%, transparent) 50%,
    color-mix(in srgb, var(--phosphor-green) 12%, transparent) 51%,
    transparent 55%,
    transparent 100%
  );
  animation: aboutAvatarScan 4s linear infinite;
  pointer-events: none;
  overflow: hidden;
}

@keyframes aboutAvatarScan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* -- Meta block -- */
.about-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.about-ident {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.about-ident-label {
  font-size: 0.58em;
  letter-spacing: 0.18em;
  color: var(--phosphor-green-dim);
  text-transform: uppercase;
}

.about-name {
  font-size: 1.15em;
  letter-spacing: 0.12em;
  color: var(--phosphor-green);
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--phosphor-green-glow);
}

.about-bio {
  font-size: 0.72em;
  line-height: 1.7;
  color: var(--phosphor-green-dim);
  letter-spacing: 0.03em;
}

/* -- Homepage link styled as terminal command -- */
.about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-decoration: none;
  font-size: 0.7em;
  letter-spacing: 0.08em;
  color: var(--phosphor-green);
  border: 1px solid var(--border-dim);
  padding: 0.4rem 0.7rem;
  transition: all 0.2s ease;
  align-self: flex-start;
  text-transform: lowercase;
}

@media (hover: hover) {
  .about-link:hover {
    border-color: var(--border-active);
    box-shadow: 0 0 10px var(--phosphor-green-glow);
    color: var(--phosphor-green);
    background: rgba(0, 255, 65, 0.04);
  }
}

.about-link-prompt {
  color: var(--phosphor-green-dim);
  font-size: 0.9em;
}

.about-link-url {
  color: inherit;
}

.about-link-arrow {
  font-size: 0.9em;
  color: var(--phosphor-green-dim);
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .about-link:hover .about-link-arrow {
    transform: translate(2px, -2px);
    color: var(--phosphor-green);
  }
}

/* -- System info block -- */
.about-sys-block {
  border: 1px solid var(--border-dim);
  background: rgba(0, 255, 65, 0.02);
  padding: 0.7rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.about-sys-row {
  display: flex;
  gap: 1.5rem;
  font-size: 0.62em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-sys-key {
  color: var(--phosphor-green-dim);
  min-width: 7ch;
  flex-shrink: 0;
}

.about-sys-key::after {
  content: ' //';
  color: var(--phosphor-green-faint);
}

.about-sys-val {
  color: var(--phosphor-green);
}

/* -- About footer -- */
.about-footer {
  justify-content: space-between;
}

.about-footer-note {
  font-size: 0.58em;
  letter-spacing: 0.06em;
  color: var(--phosphor-green-faint);
  flex: 1;
}

#aboutDismiss {
  background: transparent;
  border: 1px solid var(--border-active);
  color: var(--phosphor-green);
  font-family: var(--font-mono);
  font-size: 0.7em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

@media (hover: hover) {
  #aboutDismiss:hover {
    background: var(--phosphor-green-glow);
    box-shadow: 0 0 10px var(--phosphor-green-glow);
  }
}

/* -- Responsive: stack on small screens -- */
@media (max-width: 420px) {
  .about-profile {
    flex-direction: column;
    align-items: center;
  }

  .about-meta {
    align-items: center;
    text-align: center;
  }

  .about-link {
    align-self: center;
  }

  .about-footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  #aboutDismiss {
    width: 100%;
  }
}

/* ============================================================
   THEME :: MY LITTLE PONY
   [DISPLAY MATRIX OVERRIDE — RAINBOW SPARKLE MODE]
   ============================================================ */

body.theme-pony {
  --phosphor-green:       #d63af9;
  --phosphor-green-dim:   #a020d0;
  --phosphor-green-faint: #f0e0ff;
  --phosphor-green-glow:  rgba(214, 58, 249, 0.30);
  --phosphor-amber:       #ff6eb4;
  --phosphor-red:         #ff3d7f;

  --bg-void:    #fdf0ff;
  --bg-surface: #f8e8ff;
  --bg-panel:   rgba(255, 240, 255, 0.90);

  --border-dim:    rgba(214, 58, 249, 0.22);
  --border-active: rgba(214, 58, 249, 0.65);

  background: linear-gradient(135deg, #fdf0ff 0%, #fff0fb 40%, #f0f4ff 100%);
  color: var(--phosphor-green);
  -webkit-font-smoothing: auto;
}

/* Animated rainbow gradient for the body background */
body.theme-pony::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    125deg,
    #ffe0f7 0%,
    #f0e8ff 16%,
    #e0eeff 32%,
    #e8fff4 48%,
    #fffbe0 64%,
    #ffe8e0 80%,
    #ffe0f7 100%
  );
  background-size: 400% 400%;
  animation: ponyRainbowShift 8s ease infinite;
}

@keyframes ponyRainbowShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* Scanline overlay — sparkle dots instead of scan lines */
body.theme-pony #scanlineOverlay {
  background-image: none;
  animation: none;
  opacity: 1;
}

body.theme-pony #scanlineOverlay::after {
  background: none;
  animation: none;
}

/* Floating sparkle pseudo-elements */
body.theme-pony #scanlineOverlay::before {
  content: '✦ ✧ ⭑ ✦ ✧ ⭑ ✦ ✧ ⭑ ✦ ✧ ⭑ ✦ ✧ ⭑ ✦ ✧ ⭑ ✦ ✧ ⭑ ✦ ✧';
  position: absolute;
  inset: 0;
  font-size: 1.1rem;
  color: rgba(214, 58, 249, 0.10);
  word-break: break-all;
  line-height: 2.2;
  letter-spacing: 0.5em;
  padding: 1rem;
  pointer-events: none;
  animation: ponySparkleFloat 12s linear infinite;
}

@keyframes ponySparkleFloat {
  0%   { transform: translateY(0) rotate(0deg);    opacity: 0.10; }
  50%  { transform: translateY(-20px) rotate(4deg); opacity: 0.18; }
  100% { transform: translateY(0) rotate(0deg);    opacity: 0.10; }
}

/* Low-power flicker — gentle wobble instead of flicker */
body.theme-pony.low-power #terminalOverlay {
  animation: ponyWobble 2s ease-in-out infinite;
}

@keyframes ponyWobble {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-2px); }
  75%       { transform: translateX(2px); }
}

/* Header */
body.theme-pony #systemHeader {
  border-bottom-color: var(--border-dim);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}

/* Panels */
body.theme-pony #entropyMonitor,
body.theme-pony #cipherForge {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  border-color: var(--border-dim);
  box-shadow: 0 2px 18px rgba(214, 58, 249, 0.10);
}

/* Armed forge glow */
body.theme-pony #cipherForge.armed {
  border-color: var(--border-active);
  box-shadow:
    0 0 0 2px rgba(214, 58, 249, 0.18),
    0 0 28px rgba(214, 58, 249, 0.22),
    0 4px 32px rgba(100, 180, 255, 0.18),
    inset 0 0 10px rgba(214, 58, 249, 0.06);
}

/* Rainbow entropy bar */
body.theme-pony #entropyBar {
  background: rgba(214, 58, 249, 0.08);
  border-color: rgba(214, 58, 249, 0.22);
}

body.theme-pony #entropyFill {
  background: linear-gradient(
    90deg,
    #f94141 0%,
    #f97941 14%,
    #f9d941 28%,
    #5cf941 42%,
    #41e4f9 57%,
    #415bf9 71%,
    #d241f9 85%,
    #f94194 100%
  );
  background-size: 200% 100%;
  animation: ponyRainbowBar 3s linear infinite;
  box-shadow: 0 0 8px rgba(214, 58, 249, 0.40);
}

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

body.theme-pony #entropyBar.surge #entropyFill {
  box-shadow: 0 0 16px rgba(214, 58, 249, 0.60), 0 0 32px rgba(100, 180, 255, 0.30);
  animation: ponyRainbowBar 1.5s linear infinite;
}

/* Cipher display — rainbow gradient text */
body.theme-pony #cipherDisplay {
  background: linear-gradient(
    90deg,
    #f94141, #f97941, #f9d941, #5cf941,
    #41e4f9, #415bf9, #d241f9, #f941a0
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  animation: ponyTextRainbow 4s linear infinite;
  filter: drop-shadow(0 0 6px rgba(214, 58, 249, 0.35));
}

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

body.theme-pony #cipherForge.locked #cipherDisplay {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: rgba(160, 32, 208, 0.28);
  background-clip: unset;
  color: rgba(160, 32, 208, 0.28);
  animation: none;
  filter: none;
}

body.theme-pony #cipherDisplay.cipher-animating {
  animation: ponyTextRainbow 1.5s linear infinite, ponyCipherFlicker 0.07s linear infinite;
}

@keyframes ponyCipherFlicker {
  0%   { filter: drop-shadow(0 0 8px rgba(214, 58, 249, 0.50)) brightness(1.1); }
  50%  { filter: drop-shadow(0 0 4px rgba(100, 180, 255, 0.50)) brightness(1.0); }
  100% { filter: drop-shadow(0 0 8px rgba(214, 58, 249, 0.50)) brightness(1.1); }
}

/* Forge action buttons */
body.theme-pony #forgeBtn,
body.theme-pony #copyBtn,
body.theme-pony #resetBtn {
  border-color: rgba(214, 58, 249, 0.25);
  color: var(--phosphor-green-dim);
  background: rgba(255, 255, 255, 0.50);
}

body.theme-pony #forgeBtn:not(:disabled),
body.theme-pony #copyBtn:not(:disabled),
body.theme-pony #resetBtn:not(:disabled) {
  border-color: var(--border-active);
  color: var(--phosphor-green);
  box-shadow: 0 0 8px rgba(214, 58, 249, 0.28);
  background: rgba(255, 255, 255, 0.65);
}

@media (hover: hover) {
  body.theme-pony #forgeBtn:not(:disabled):hover,
  body.theme-pony #copyBtn:not(:disabled):hover,
  body.theme-pony #resetBtn:not(:disabled):hover {
    background: rgba(214, 58, 249, 0.10);
    box-shadow: 0 0 18px rgba(214, 58, 249, 0.40), 0 0 36px rgba(100, 180, 255, 0.20);
    color: var(--phosphor-green);
  }
}

/* Footer */
body.theme-pony #systemFooter {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  border-top-color: var(--border-dim);
}

/* Status colours */
body.theme-pony .status-ok    { color: #7c3aed; }
body.theme-pony .status-warn  { color: #db2777; }
body.theme-pony .status-alert { color: #dc2626; }

/* Blink — gentle pulse */
body.theme-pony .blink {
  animation: ponyPulse 1.6s ease-in-out infinite;
}

@keyframes ponyPulse {
  0%, 100% { opacity: 1;    color: var(--phosphor-green); }
  50%       { opacity: 0.5; color: #ff6eb4; }
}

/* Focus ring */
body.theme-pony button:focus-visible,
body.theme-pony input:focus-visible {
  outline: 2px solid #d63af9;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(214, 58, 249, 0.18);
}

/* Modal panels */
body.theme-pony .modal-backdrop {
  background: rgba(200, 160, 240, 0.45);
  backdrop-filter: blur(4px);
}

body.theme-pony .modal-panel {
  background: rgba(255, 252, 255, 0.96);
  border: 1.5px solid rgba(214, 58, 249, 0.45);
  box-shadow:
    0 0 0 1px rgba(214, 58, 249, 0.12),
    0 8px 40px rgba(214, 58, 249, 0.18),
    0 2px 8px rgba(100, 180, 255, 0.12);
}

body.theme-pony .modal-header {
  border-bottom-color: rgba(214, 58, 249, 0.18);
  background: linear-gradient(90deg, rgba(255, 240, 255, 0.8) 0%, rgba(240, 240, 255, 0.8) 100%);
}

body.theme-pony .modal-title {
  background: linear-gradient(90deg, #d63af9, #415bf9, #f94194);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ponyTextRainbow 5s linear infinite;
}

body.theme-pony .modal-close {
  border-color: rgba(214, 58, 249, 0.25);
  color: var(--phosphor-green-dim);
  background: rgba(255, 255, 255, 0.60);
}

@media (hover: hover) {
  body.theme-pony .modal-close:hover {
    border-color: #d63af9;
    color: #d63af9;
    box-shadow: 0 0 8px rgba(214, 58, 249, 0.35);
    background: rgba(214, 58, 249, 0.08);
  }
}

body.theme-pony .modal-footer {
  border-top-color: rgba(214, 58, 249, 0.18);
  background: linear-gradient(90deg, rgba(255, 240, 255, 0.5) 0%, rgba(240, 240, 255, 0.5) 100%);
}

body.theme-pony .setting-label {
  color: #a020d0;
  border-bottom-color: rgba(214, 58, 249, 0.18);
}

body.theme-pony .label,
body.theme-pony .sys-label,
body.theme-pony .sys-version,
body.theme-pony .value {
  color: var(--phosphor-green-dim);
}

/* Range slider */
body.theme-pony input[type="range"] {
  background: rgba(214, 58, 249, 0.12);
}

body.theme-pony input[type="range"]::-webkit-slider-thumb {
  background: #d63af9;
  box-shadow: 0 0 6px rgba(214, 58, 249, 0.50);
}

body.theme-pony input[type="range"]::-moz-range-thumb {
  background: #d63af9;
  box-shadow: 0 0 6px rgba(214, 58, 249, 0.50);
}

body.theme-pony .setting-value {
  color: var(--phosphor-green);
}

/* Toggle switches */
body.theme-pony .toggle-track {
  background: rgba(214, 58, 249, 0.08);
  border-color: rgba(214, 58, 249, 0.22);
}

body.theme-pony .toggle-track::after {
  background: rgba(160, 32, 208, 0.40);
}

body.theme-pony .toggle-item input:checked ~ .toggle-track {
  background: rgba(214, 58, 249, 0.14);
  border-color: rgba(214, 58, 249, 0.55);
}

body.theme-pony .toggle-item input:checked ~ .toggle-track::after {
  background: #d63af9;
  box-shadow: 0 0 6px rgba(214, 58, 249, 0.50);
}

body.theme-pony .toggle-label {
  color: rgba(160, 32, 208, 0.65);
}

body.theme-pony .toggle-item input:checked ~ .toggle-track ~ .toggle-label {
  color: var(--phosphor-green);
}

/* Buttons in modal footer */
body.theme-pony #settingsApply,
body.theme-pony #welcomeDismiss,
body.theme-pony #aboutDismiss,
body.theme-pony #entropyDataDismiss {
  border-color: rgba(214, 58, 249, 0.55);
  color: var(--phosphor-green);
  background: rgba(214, 58, 249, 0.06);
}

@media (hover: hover) {
  body.theme-pony #settingsApply:hover,
  body.theme-pony #welcomeDismiss:hover,
  body.theme-pony #aboutDismiss:hover,
  body.theme-pony #entropyDataDismiss:hover {
    background: rgba(214, 58, 249, 0.14);
    box-shadow: 0 0 12px rgba(214, 58, 249, 0.35);
  }
}

body.theme-pony #settingsCancel,
body.theme-pony .btn-ghost {
  border-color: rgba(214, 58, 249, 0.22);
  color: rgba(160, 32, 208, 0.65);
  background: transparent;
}

@media (hover: hover) {
  body.theme-pony #settingsCancel:hover,
  body.theme-pony .btn-ghost:hover {
    border-color: rgba(214, 58, 249, 0.55);
    color: var(--phosphor-green);
  }
}

body.theme-pony .setting-warning {
  color: #db2777;
}

/* Welcome modal text */
body.theme-pony .welcome-text {
  color: #7c3aed;
}

body.theme-pony .welcome-steps {
  background: rgba(214, 58, 249, 0.04);
  border-color: rgba(214, 58, 249, 0.18);
}

body.theme-pony .welcome-steps li {
  color: #a020d0;
}

body.theme-pony .welcome-steps li::before {
  color: #d63af9;
}

body.theme-pony .welcome-steps strong {
  color: #d63af9;
}

body.theme-pony .welcome-note {
  color: rgba(160, 32, 208, 0.60);
  border-top-color: rgba(214, 58, 249, 0.18);
}

body.theme-pony .welcome-technical {
  background: rgba(214, 58, 249, 0.04);
  border-color: rgba(214, 58, 249, 0.18);
}

body.theme-pony .welcome-tech-list li {
  color: #a020d0;
}

body.theme-pony .welcome-tech-list li::before {
  color: rgba(214, 58, 249, 0.30);
}

body.theme-pony .welcome-tech-list strong,
body.theme-pony .welcome-tech-list code {
  color: #d63af9;
}

/* About modal */
body.theme-pony .about-avatar-ring {
  border-color: rgba(214, 58, 249, 0.55);
  box-shadow:
    0 0 12px rgba(214, 58, 249, 0.28),
    0 0 28px rgba(100, 180, 255, 0.18),
    inset 0 0 8px rgba(214, 58, 249, 0.08);
  animation: ponyRingPulse 2.5s ease-in-out infinite;
}

@keyframes ponyRingPulse {
  0%, 100% {
    box-shadow:
      0 0 12px rgba(214, 58, 249, 0.28),
      0 0 28px rgba(100, 180, 255, 0.18);
  }
  33% {
    box-shadow:
      0 0 18px rgba(255, 110, 180, 0.40),
      0 0 36px rgba(214, 58, 249, 0.22);
  }
  66% {
    box-shadow:
      0 0 14px rgba(65, 91, 249, 0.30),
      0 0 30px rgba(100, 220, 255, 0.22);
  }
}

body.theme-pony .about-avatar {
  filter: saturate(1.1) brightness(1.05) hue-rotate(0deg);
}

body.theme-pony .about-avatar-scan {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 45%,
    rgba(214, 58, 249, 0.14) 49%,
    rgba(214, 58, 249, 0.24) 50%,
    rgba(214, 58, 249, 0.14) 51%,
    transparent 55%,
    transparent 100%
  );
}

body.theme-pony .about-ident-label {
  color: rgba(160, 32, 208, 0.65);
}

body.theme-pony .about-name {
  background: linear-gradient(90deg, #d63af9, #415bf9, #f94194);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ponyTextRainbow 5s linear infinite;
  text-shadow: none;
}

body.theme-pony .about-bio {
  color: #7c3aed;
}

body.theme-pony .about-link {
  border-color: rgba(214, 58, 249, 0.28);
  color: #d63af9;
  background: rgba(214, 58, 249, 0.04);
}

@media (hover: hover) {
  body.theme-pony .about-link:hover {
    border-color: rgba(214, 58, 249, 0.60);
    box-shadow: 0 0 10px rgba(214, 58, 249, 0.28);
    background: rgba(214, 58, 249, 0.08);
    color: #d63af9;
  }
}

body.theme-pony .about-link-prompt,
body.theme-pony .about-link-arrow {
  color: rgba(160, 32, 208, 0.55);
}

body.theme-pony .about-sys-block {
  background: rgba(214, 58, 249, 0.04);
  border-color: rgba(214, 58, 249, 0.18);
}

body.theme-pony .about-sys-key {
  color: rgba(160, 32, 208, 0.65);
}

body.theme-pony .about-sys-key::after {
  color: rgba(214, 58, 249, 0.25);
}

body.theme-pony .about-sys-val {
  color: #d63af9;
}

body.theme-pony .about-footer-note {
  color: rgba(160, 32, 208, 0.45);
}

/* Theme swatch for MLP option */
.theme-swatch--pony {
  border-color: rgba(214, 58, 249, 0.25);
  color: #a020d0;
  background: linear-gradient(90deg, #ffe0f7, #f0e8ff, #e0eeff);
}

.theme-swatch--pony::before {
  background: linear-gradient(135deg, #f94141, #f9d941, #5cf941, #41e4f9, #d241f9);
  box-shadow: 0 0 5px rgba(214, 58, 249, 0.60);
}

.theme-option input:checked ~ .theme-swatch--pony {
  border-color: rgba(214, 58, 249, 0.70);
  color: #d63af9;
  box-shadow: 0 0 10px rgba(214, 58, 249, 0.25);
}

/* Settings ABOUT button */
body.theme-pony #settingsBtn,
body.theme-pony #aboutBtn {
  border-color: rgba(214, 58, 249, 0.22);
  color: rgba(160, 32, 208, 0.75);
  background: rgba(255, 255, 255, 0.40);
}

@media (hover: hover) {
  body.theme-pony #settingsBtn:hover,
  body.theme-pony #aboutBtn:hover {
    border-color: rgba(214, 58, 249, 0.65);
    color: #d63af9;
    box-shadow: 0 0 8px rgba(214, 58, 249, 0.28);
    background: rgba(255, 255, 255, 0.60);
  }
}

/* ============================================================
   RESPONSIVE :: MOBILE FONT SCALING
   [UPSCALE BASE FONT FOR SMALL VIEWPORTS]
   ============================================================ */

@media (max-width: 600px) {
  :root {
    --font-size-base: clamp(15px, 4vw, 18px);
  }

  #systemClock {
    display: none;
  }
}

/* ============================================================
   ENTROPY DATA MODAL :: POOL VISUALISATION INTERFACE
   ============================================================ */

#entropyDataBtn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--phosphor-green-dim);
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  #entropyDataBtn:hover {
    border-color: var(--border-active);
    color: var(--phosphor-green);
    box-shadow: 0 0 6px var(--phosphor-green-glow);
  }
}

.modal-panel--entropy {
  width: min(640px, 95vw);
}

.entropy-modal-body {
  gap: 1rem;
  padding: 1rem;
}

/* -- Stats grid -- */
.entropy-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

@media (max-width: 480px) {
  .entropy-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.entropy-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: rgba(0, 255, 65, 0.03);
  border: 1px solid var(--border-dim);
  padding: 0.4rem 0.6rem;
}

.entropy-stat-key {
  font-size: 0.55em;
  letter-spacing: 0.12em;
  color: var(--phosphor-green-dim);
  text-transform: uppercase;
}

.entropy-stat-val {
  font-size: 0.8em;
  color: var(--phosphor-green);
  letter-spacing: 0.06em;
}

/* -- Hex dump area -- */
.entropy-hex-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.entropy-hex-label {
  font-size: 0.58em;
  letter-spacing: 0.1em;
  color: var(--phosphor-green-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.3rem;
}

.entropy-hex-dump {
  font-family: var(--font-mono);
  font-size: 0.6em;
  line-height: 1.6;
  color: var(--phosphor-green);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dim);
  padding: 0.6rem 0.8rem;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 260px;
  white-space: pre;
  letter-spacing: 0.04em;
}

.entropy-trunc {
  font-size: 0.58em;
  letter-spacing: 0.1em;
  color: var(--phosphor-amber);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.entropy-footer-note {
  font-size: 0.6em;
  letter-spacing: 0.08em;
  color: var(--phosphor-green-dim);
  text-transform: uppercase;
  flex: 1;
}

#entropyDataDismiss {
  background: transparent;
  border: 1px solid var(--border-active);
  color: var(--phosphor-green);
  font-family: var(--font-mono);
  font-size: 0.7em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

@media (hover: hover) {
  #entropyDataDismiss:hover {
    background: var(--phosphor-green-glow);
    box-shadow: 0 0 10px var(--phosphor-green-glow);
  }
}

/* -- Theme: orange -- */
body.theme-orange #entropyDataBtn {
  border-color: rgba(255, 140, 0, 0.22);
  color: rgba(255, 140, 0, 0.6);
}

@media (hover: hover) {
  body.theme-orange #entropyDataBtn:hover {
    border-color: var(--phosphor-amber);
    color: var(--phosphor-amber);
    box-shadow: 0 0 6px rgba(255, 179, 0, 0.35);
  }
}

/* -- Theme: pony -- */
body.theme-pony #entropyDataBtn {
  border-color: rgba(214, 58, 249, 0.22);
  color: rgba(160, 32, 208, 0.75);
  background: rgba(255, 255, 255, 0.40);
}

@media (hover: hover) {
  body.theme-pony #entropyDataBtn:hover {
    border-color: rgba(214, 58, 249, 0.65);
    color: #d63af9;
    box-shadow: 0 0 8px rgba(214, 58, 249, 0.28);
    background: rgba(255, 255, 255, 0.60);
  }
}
