:root {
  --ink: #e8f7ff;
  --muted: #94b6cb;
  --cyan: #19f6ff;
  --magenta: #ff3df2;
  --yellow: #f9f871;
  --green: #60ff83;
  --page: #070916;
  --panel: #0b1022;
  --panel2: #10192f;
  --border: rgba(25, 246, 255, 0.45);
  --shadow: rgba(25, 246, 255, 0.25);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page);
  font-family: "Lucida Console", Monaco, Consolas, "Courier New", monospace;
  letter-spacing: 0.01em;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: var(--page);
}

.crt {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.045) 0, rgba(255,255,255,0.045) 1px, transparent 2px, transparent 4px),
    radial-gradient(circle at 50% 50%, transparent 0 64%, rgba(0,0,0,0.58) 100%);
  mix-blend-mode: screen;
  opacity: 0.38;
}

.beam {
  position: fixed;
  inset: auto auto 8% 50%;
  width: 90vw;
  height: 90vw;
  transform-origin: center bottom;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background: transparent;
  filter: none;
  animation: rotateBeam 12s linear infinite;
}
.beamB { animation-duration: 19s; animation-direction: reverse; opacity: 0; }
@keyframes rotateBeam { to { transform: translateX(-50%) rotate(360deg); } }

.launcherShell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  width: min(1540px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.heroPanel, .panel {
  border: 2px solid var(--border);
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 0 34px var(--shadow), 8px 8px 0 rgba(0,0,0,0.48);
}

.heroPanel {
  position: relative;
  padding: 18px 22px 20px;
  overflow: visible;
}
.heroPanel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 24px);
  pointer-events: none;
}

.topLine {
  position: relative;
  display: flex;
  justify-content: space-between;
  color: var(--green);
  font-size: 14px;
  text-shadow: 0 0 10px rgba(96,255,131,0.75);
  margin-bottom: 10px;
}
.blink { animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.asciiLogo {
  position: relative;
  margin: 0;
  white-space: pre;
  overflow: visible;
  color: var(--cyan);
  font-size: clamp(3.5px, min(0.58vw, 0.9vh), 10px);
  line-height: clamp(0.95, 1.02, 1.05);
  max-width: 100%;
  text-shadow:
    2px 0 var(--magenta),
    -2px 0 rgba(96,255,131,0.7),
    0 0 18px rgba(25,246,255,0.65);
  animation: logoPulse 3.5s ease-in-out infinite;
  text-align:center;
}
@keyframes logoPulse {
  0%, 100% { filter: saturate(1); }
  50% { filter: saturate(1.45) brightness(1.12); }
}

.creditRow {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  margin-top: 10px;
}
a { color: var(--yellow); text-decoration: none; }
a:hover { color: #fff; text-shadow: 0 0 10px var(--yellow); }

.lastUpdatedBadge {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 2px solid rgba(249,248,113,0.9);
  background: var(--magenta);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5), 0 0 10px rgba(255,255,255,0.55);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18) inset, 0 0 22px rgba(249,248,113,0.32), 5px 5px 0 rgba(0,0,0,0.45);
  transform-origin: center;
  animation: updateBadgePulse 2.4s ease-in-out infinite;
}
@keyframes updateBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.055); }
}


.introCopy {
  position: relative;
  max-width: 1180px;
  margin: 18px auto 0;
  font-size: 16px;
  line-height: 1.55;
  color: #d7efff;
  text-align: center;
}


.desktopNote {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 16px auto 0;
  color: var(--cyan);
  font-size: 16px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.toolChooser {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.toolChoiceButton {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 58px;
  border: 2px solid rgba(25,246,255,0.75);
  background: #0a1226;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.52), 0 0 20px rgba(25,246,255,0.2);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.toolChoiceButton:hover,
.toolChoiceButton.active {
  transform: translate(-1px, -1px);
  border-color: #ffffff;
  background: #12223c;
  box-shadow: 7px 7px 0 rgba(0,0,0,0.55), 0 0 30px rgba(249,248,113,0.28);
}
.toolChoiceButton.active {
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(249,248,113,0.72);
}

.ticker {
  display: none;
}
.ticker div {
  width: max-content;
  padding-left: 0;
  animation: crawl 22s linear infinite;
  will-change: transform;
}
@keyframes crawl {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

.gridArea {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}
.toolPanelStack {
  display: none;
  grid-template-areas: "panel";
  margin-top: 18px;
}
.toolPanelStack.hasActivePanel {
  display: grid;
}
.toolPanel {
  grid-area: panel;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.toolPanel.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.panel {
  padding: 18px;
  background: var(--panel2);
}
.panel h2 {
  margin: 0 0 14px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 18px;
  text-shadow: 0 0 10px rgba(25,246,255,0.6);
}
.featureList {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}
.featureList li {
  padding-left: 22px;
  position: relative;
  line-height: 1.45;
  color: #d8edff;
}
.featureList li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--magenta);
  text-shadow: 0 0 8px rgba(255,61,242,0.7);
}

.startPanel label, .loadPanel p {
  display: block;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 14px;
}
.panelCopy {
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 16px;
}
.startPanel label span { display: block; margin-bottom: 6px; }
.startPanel .primaryButton { margin-top: 4px; }
input[type="text"], input[type="number"], select {
  width: 100%;
  border: 2px solid rgba(25,246,255,0.55);
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 10px 11px;
  font: inherit;
  outline: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset;
}
input:focus, select:focus { border-color: var(--yellow); box-shadow: 0 0 16px rgba(249,248,113,0.24); }
.formGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.formGrid label { margin: 0; }
.checkLine { display: flex !important; align-items: center; gap: 10px; margin: 0 0 16px; }
.checkLine span { margin: 0 !important; }

.primaryButton, .secondaryButton, .loadButton {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border: 2px solid rgba(249,248,113,0.75);
  background: #15192e;
  color: #fff;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5), 0 0 20px rgba(249,248,113,0.16);
}
.primaryButton:hover, .secondaryButton:hover, .loadButton:hover {
  transform: translate(-1px, -1px);
  border-color: #fff;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.55), 0 0 24px rgba(25,246,255,0.32);
}
.loadButton input { display: none; }
.secondaryButton { margin-top: 12px; border-color: rgba(25,246,255,0.7); background: rgba(25,246,255,0.1); }

@media (max-width: 1120px) {
  .gridArea { grid-template-columns: 1fr; }
  .asciiLogo { font-size: clamp(3px, 0.72vw, 7px); overflow: visible; }
}
@media (max-width: 620px) {

  .lastUpdatedBadge {
    top: 10px;
    right: 10px;
    padding: 8px 10px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .launcherShell { width: calc(100vw - 18px); padding-top: 10px; justify-content: flex-start; }
  .heroPanel, .panel { padding: 12px; }
  .asciiLogo {
    font-size: clamp(4px, 1.32vw, 7px);
    line-height: 1.08;
    overflow-x: auto;
    overflow-y: visible;
    padding: 2px 0 10px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .formGrid { grid-template-columns: 1fr; }
  .toolChooser { grid-template-columns: 1fr; gap: 10px; }
  .introCopy { text-align: left; }
  .desktopNote { width: 100%; font-size: 12px; margin-top: 12px; }
}

@media (max-height: 820px) and (min-width: 900px) {
  .asciiLogo { font-size: clamp(3px, 0.48vw, 8px); line-height: 0.98; }
  .introCopy { margin-top: 12px; }
  .ticker { margin-top: 12px; }
}
