/* Striker OS — Codedex-inspired quest theme (polished)
   Deep navy, gold accents, pixel display for titles only, hard shadows. */

:root {
  --bg: #0a0e27;
  --bg-2: #0e1333;
  --panel: #151b42;
  --panel-2: #1b2350;
  --line: #2a3372;
  --line-strong: #3c4a92;
  --text: #f4f6ff;
  --muted: #9aa6d6;
  --gold: #f7d51d;
  --blue: #209cee;
  --green: #92cc41;
  --red: #e76e55;
  --accent: var(--gold);
  --shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 3px 3px 0 rgba(0, 0, 0, 0.35);
  --font-display: "Press Start 2P", monospace;
  --font-body: "Work Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 0;
  --gap: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  background:
    radial-gradient(ellipse 70% 45% at 8% -8%, rgba(32, 156, 238, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 0%, rgba(247, 213, 29, 0.07), transparent 50%),
    linear-gradient(180deg, #0b0f2e 0%, var(--bg) 50%, #080b22 100%);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(247, 213, 29, 0.35);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.app {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
}

/* ---------- Type ---------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin: 0;
  font-weight: 400;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 42ch;
}

/* ---------- Panel ---------- */
.panel {
  background: var(--panel);
  border: 3px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.panel:hover {
  border-color: #4a5ab0;
}

.panel-pad {
  padding: 1.15rem 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.65rem 0.95rem;
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  transition: transform 90ms ease, box-shadow 90ms ease, background 120ms ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.btn-primary {
  background: var(--gold);
  color: #2a2300;
  border-color: #fff2a8;
}

.btn-primary:hover {
  background: #ffe14d;
}

.btn-warn {
  background: var(--red);
  color: #350c05;
  border-color: #ffb3a4;
}

.btn-ghost {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  border-color: var(--gold);
}

.btn-status {
  background: var(--bg-2);
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.btn-status:hover {
  background: rgba(247, 213, 29, 0.12);
  transform: translate(-1px, -1px);
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border: 2px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--bg-2);
  white-space: nowrap;
}

.chip-live {
  border-color: rgba(146, 204, 65, 0.55);
  color: var(--green);
}

.chip-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  animation: pulse 1.4s ease-in-out infinite;
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rise {
  animation: rise 420ms ease both;
}
.rise-delay-1 {
  animation-delay: 70ms;
}
.rise-delay-2 {
  animation-delay: 130ms;
}
.rise-delay-3 {
  animation-delay: 190ms;
}

/* ---------- Header ---------- */
header.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.35rem;
  background: rgba(14, 19, 51, 0.92);
  border: 3px solid var(--line-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  image-rendering: pixelated;
  display: block;
}

.brand h1 {
  font-size: 0.92rem;
}

.brand h1 span {
  color: var(--gold);
}

.brand p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
}

.nav a {
  padding: 0.4rem 0.65rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.wallet-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.wallet-bar .balance {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  padding: 0.35rem 0.55rem;
  background: var(--bg-2);
  border: 2px solid var(--line);
}

.wallet-bar .btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.55rem;
}

#btn-mute {
  min-width: 4.6rem;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: var(--gap);
  margin-bottom: 1.15rem;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.35rem 0.25rem 0.35rem 0;
}

.hero-copy h2 {
  margin: 0.75rem 0 0.85rem;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.45;
  max-width: 16ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.hero-desk {
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.desk-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.desk-name {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--gold);
  word-break: break-all;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack img {
  width: 36px;
  height: 36px;
  border: 2px solid var(--bg-2);
  image-rendering: pixelated;
  background: var(--panel-2);
}

.avatar-stack img + img {
  margin-left: -12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.stat {
  padding: 0.65rem 0.7rem;
  border: 2px solid var(--line);
  background: var(--bg-2);
}

.stat .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat .value {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 400;
}

.desk-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.desk-status strong {
  color: var(--green);
  font-weight: 600;
}

.desk-mascot {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
}

/* ---------- Tech strip ---------- */
.tech-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.tech-card {
  text-align: left;
  padding: 0.9rem 0.85rem;
  border: 3px solid var(--line);
  background: var(--panel);
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 90ms ease, border-color 120ms ease, box-shadow 90ms ease;
}

.tech-card.active,
.tech-card:hover {
  border-color: var(--gold);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
}

.tech-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.62rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.tech-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.section-head h3 {
  font-size: 0.72rem;
  color: var(--text);
}

.section-head p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Tech demos ---------- */
.tech-demo {
  display: none;
}

.tech-demo.active {
  display: block;
}

.flow-steps {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.flow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.75rem;
  border: 2px solid var(--line);
  background: var(--bg-2);
}

.flow-step .n {
  font-family: var(--font-display);
  color: #04223a;
  background: var(--blue);
  font-size: 0.52rem;
  padding: 0.35rem 0.4rem;
  border: 2px solid #9ad4ff;
}

.flow-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.flow-step code {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 0.84rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.proof-out {
  margin: 0.85rem 0 0;
  padding: 0.85rem;
  border: 2px solid var(--line);
  background: #070b22;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: #c8d2ff;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}

.curl-box {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 2px dashed var(--line-strong);
  background: var(--bg-2);
  display: grid;
  gap: 0.35rem;
}

.curl-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.curl-box code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
  word-break: break-all;
}

.skills-intro {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.skills-intro a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.35rem 0 0.75rem;
}

.board-actions .btn {
  font-size: 0.5rem;
  padding: 0.45rem 0.6rem;
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.skill-btn {
  text-align: left;
  padding: 0.8rem;
  background: var(--panel-2);
  display: block;
  width: 100%;
}

.skill-btn strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.55rem;
  color: var(--green);
  margin-bottom: 0.4rem;
}

.skill-btn span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  font-family: var(--font-body);
}

/* ---------- Oracle ---------- */
.query-row {
  display: flex;
  gap: 0.55rem;
}

.query-row input {
  flex: 1;
  min-width: 0;
  border: 3px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  border-radius: 0;
}

.query-row input::placeholder {
  color: #6b789f;
}

.oracle-out {
  margin-top: 0.85rem;
  padding: 0.95rem;
  border: 2px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  max-height: 200px;
  overflow: auto;
  color: #c8d2ff;
}

/* ---------- Arena ---------- */
.arena-wrap {
  position: relative;
  height: 300px;
  overflow: hidden;
  border: 3px solid var(--line-strong);
  background: #14301a;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.arena-wrap.arena-goal-burst {
  border-color: var(--gold);
  box-shadow: 0 0 28px rgba(247, 213, 29, 0.55), var(--shadow-sm);
  animation: arena-goal-pulse 0.55s ease;
}

@keyframes arena-goal-pulse {
  0% {
    filter: brightness(1);
  }
  40% {
    filter: brightness(1.4);
  }
  100% {
    filter: brightness(1);
  }
}

#pitch {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  image-rendering: pixelated;
}

#pitch.arena-locked {
  cursor: not-allowed;
}

.arena-hud {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
}

.arena-hud span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.35rem 0.5rem;
  border: 2px solid var(--line);
  background: rgba(10, 14, 39, 0.88);
  color: var(--gold);
}

.controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-top: 0.9rem;
  align-items: end;
  max-width: 360px;
}

.slider-block label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.slider-block input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  margin-bottom: 0.75rem;
}

.slider-block .btn {
  width: 100%;
}

.slider-block .btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

.slider-block input[type="range"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.arena-tip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.sprite-row {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.45rem;
}

.sprite-row img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  border: 2px solid var(--line);
}

/* ---------- Fixtures ---------- */
#fixture-list {
  display: grid;
  gap: 0.55rem;
}

.hosts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
}

.host-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.5rem;
  border: 2px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.host-pill .team-flag {
  width: 22px;
  height: 16px;
}

.fixture-card {
  padding: 0.75rem 0.8rem;
  border: 2px solid var(--line);
  background: var(--bg-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  transition: border-color 140ms ease, transform 140ms ease;
}

.fixture-card:hover {
  border-color: var(--gold);
  transform: translate(-1px, -1px);
}

.fixture-main {
  min-width: 0;
  flex: 1;
}

.fixture-teams {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.fixture-team {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.team-flag {
  width: 28px;
  height: 21px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  flex-shrink: 0;
  display: block;
}

.flag-stack {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.flag-stack .team-flag {
  width: 24px;
  height: 18px;
}

.flag-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 21px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--muted);
}

.fixture-team-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.fixture-vs {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  padding: 0 0.15rem;
}

.fixture-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.fixture-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.fixture-card .btn {
  flex-shrink: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.5rem;
}

/* ---------- Console ---------- */
.console {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  height: 200px;
  overflow: auto;
  padding: 0.75rem;
  border: 2px solid var(--line);
  background: #070b22;
}

.console p,
.log-line {
  margin: 0 0 0.35rem;
  color: var(--muted);
}

.log-success,
.console .ok {
  color: var(--green);
}

.log-warn,
.console .warn {
  color: var(--red);
}

.log-info {
  color: var(--blue);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 1.35rem;
  padding: 0.85rem 1rem;
  border: 3px solid var(--line);
  background: var(--bg-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero,
  .layout,
  .controls {
    grid-template-columns: 1fr;
  }

  .tech-strip {
    grid-template-columns: 1fr 1fr;
  }

  .wallet-bar {
    margin-left: 0;
    width: 100%;
  }

  .hero-copy h2 {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .app {
    width: calc(100% - 1.25rem);
    padding-top: 0.85rem;
  }

  .tech-strip,
  .stat-grid,
  .skills {
    grid-template-columns: 1fr;
  }

  .query-row {
    flex-direction: column;
  }

  .nav {
    width: 100%;
    order: 3;
  }

  .brand h1 {
    font-size: 0.8rem;
  }

  header.top {
    padding: 0.65rem 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rise,
  .chip-dot {
    animation: none;
  }

  .btn,
  .tech-card {
    transition: none;
  }
}
