:root {
  color-scheme: light;
  --bg: #0f1410;
  --bg-2: #1a2a1c;
  --panel: #0f1912;
  --accent: #9bff8a;
  --accent-2: #7fd4ff;
  --text: #e7ffe2;
  --muted: #98c8a0;
  --warning: #ffdc7e;
  --shadow: rgba(9, 10, 7, 0.45);
  --scan: rgba(22, 32, 24, 0.45);
  --mono: "Space Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
  --sans: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: radial-gradient(120% 140% at 10% 20%, #1a2d1e 0%, var(--bg) 55%, #081009 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-noise {
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.page {
  padding: 48px clamp(20px, 6vw, 72px) 72px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(155, 255, 138, 0.6);
  color: var(--accent);
  text-decoration: none;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  background: rgba(10, 18, 12, 0.8);
  box-shadow: 0 18px 36px var(--shadow);
}

.repo-link:hover {
  background: rgba(25, 38, 26, 0.9);
  color: var(--accent-2);
}

.kicker {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  color: var(--accent-2);
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(2.2rem, 2.8vw, 3rem);
  margin: 0 0 12px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.status {
  font-family: var(--mono);
  padding: 10px 18px;
  border: 1px solid rgba(155, 255, 138, 0.4);
  border-radius: 999px;
  background: rgba(20, 30, 21, 0.75);
  box-shadow: 0 12px 30px var(--shadow);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.terminal {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 25, 18, 0.95), rgba(12, 18, 14, 0.95));
  border-radius: 18px;
  border: 1px solid rgba(155, 255, 138, 0.3);
  box-shadow: 0 30px 60px var(--shadow);
  padding: 20px 20px 16px;
  min-height: 520px;
  overflow: hidden;
}

.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    var(--scan) 4px,
    transparent 6px
  );
  opacity: 0.35;
  pointer-events: none;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.lights span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 6px;
  background: rgba(255, 255, 255, 0.15);
}

.lights span:nth-child(1) { background: #ff857a; }
.lights span:nth-child(2) { background: #ffe18a; }
.lights span:nth-child(3) { background: #97ff9c; }

#terminal-output {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.5;
  min-height: 360px;
  white-space: pre-wrap;
  color: var(--accent);
}

.input-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  font-family: var(--mono);
}

.input-row label {
  color: var(--warning);
}

.input-row input {
  background: rgba(7, 10, 8, 0.9);
  border: 1px solid rgba(155, 255, 138, 0.35);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--mono);
}

.input-row button,
#reset-btn {
  border: none;
  background: linear-gradient(135deg, rgba(155, 255, 138, 0.9), rgba(127, 212, 255, 0.85));
  color: #0b140c;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(8, 10, 8, 0.35);
}

.panel {
  background: rgba(12, 19, 14, 0.86);
  border-radius: 18px;
  border: 1px solid rgba(127, 212, 255, 0.25);
  padding: 24px;
  box-shadow: 0 24px 48px var(--shadow);
}

.panel h2 {
  margin-top: 0;
}

.panel ul {
  padding-left: 18px;
  color: var(--muted);
}

.tips {
  margin-top: 20px;
}

.tips h3 {
  margin-bottom: 10px;
  color: var(--accent-2);
}

.program-select {
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--mono);
}

.program-select h3 {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-family: var(--sans);
}

.program-select label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.program-select select {
  width: 100%;
  background: rgba(7, 10, 8, 0.9);
  border: 1px solid rgba(127, 212, 255, 0.4);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--mono);
}

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(155, 255, 138, 0.5);
  font-family: var(--mono);
  font-size: 12px;
  margin: 4px 6px 0 0;
  color: var(--accent);
}

.cta {
  margin-top: 24px;
}

@media (max-width: 960px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    align-items: flex-start;
  }

  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 32px 20px 56px;
  }

  #terminal-output {
    font-size: 14px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .input-row label {
    display: none;
  }
}
