/*
 * ilbarone.net theme override for JSTMSimulator
 * Palette aligned with the main site (style.css :root vars)
 */

:root {
  --ib-bg:     #0d1117;
  --ib-bg2:    #161b22;
  --ib-bg3:    #1e2430;
  --ib-accent: #10ffb4;
  --ib-purple: #a855f7;
  --ib-text:   #e6edf3;
  --ib-muted:  #8b949e;
  --ib-border: rgba(255,255,255,.08);
}

html, body {
  background: var(--ib-bg) !important;
  color: var(--ib-text);
}

body {
  background:
    radial-gradient(ellipse 55% 45% at 20% 10%, rgba(168,85,247,.10), transparent 60%),
    radial-gradient(ellipse 45% 40% at 85% 90%, rgba(16,255,180,.08), transparent 60%),
    var(--ib-bg) !important;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body.displayresults {
  background: var(--ib-bg) !important;
  color: var(--ib-text);
}

/* Main simulator frame: wrap the green gif area in a card that matches the site */
#main {
  margin: 20px auto;
  border-radius: 14px;
  box-shadow:
    0 20px 60px rgba(0,0,0,.5),
    0 0 0 1px var(--ib-border) inset,
    0 0 40px rgba(16,255,180,.08);
  overflow: hidden;
}

body.displayresults #main {
  border: 10px solid var(--ib-accent);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(16,255,180,.2);
}

/* Code editor textarea: dark theme */
#code {
  background: var(--ib-bg2) !important;
  color: var(--ib-text) !important;
  border-left: 1px solid var(--ib-border) !important;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace !important;
  caret-color: var(--ib-accent);
}

#code:focus {
  outline: 1px solid rgba(16,255,180,.4);
  outline-offset: -1px;
}

/* State label inside the machine */
#state {
  color: var(--ib-text);
  text-shadow: 0 0 8px rgba(16,255,180,.35);
}

/* Speed label + status bar texts */
#speedlbl,
#status {
  color: var(--ib-text) !important;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}

#status a {
  color: var(--ib-accent) !important;
}

#status a:hover,
#status a:focus {
  color: #fff !important;
}

/* Username overlay in save mode */
#username {
  color: var(--ib-accent);
  text-shadow: 0 0 6px rgba(0,0,0,.8);
}

/* Results table styling (when executing in displayresults mode) */
body.displayresults table {
  color: var(--ib-text);
  border-color: var(--ib-border);
}

body.displayresults table td,
body.displayresults table th {
  border-color: var(--ib-border) !important;
}

body.displayresults #results td.codecell {
  background: var(--ib-bg2);
  color: var(--ib-text);
}

/* Fork-me ribbon: recolor to site purple */
#fork-me-on-github div {
  background-color: var(--ib-purple) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
}

#fork-me-on-github div a {
  color: #fff !important;
  border-color: rgba(255,255,255,.6) !important;
  text-shadow: 0 -1px rgba(0,0,0,.4);
}

/* No-script warning */
#noscript-alert {
  color: var(--ib-accent) !important;
  border-color: var(--ib-accent) !important;
  background: rgba(16,255,180,.06);
}

/* Tape moved-cell highlight tweaks (readable on green gif) */
#tape.movedleft span#cell16,
#tape.movedright span#cell14 {
  color: var(--ib-accent) !important;
  text-shadow: 0 0 4px rgba(16,255,180,.6);
}

#tape span#cell15 {
  color: var(--ib-accent) !important;
}
