@font-face {
  font-family: 'Orbitron';
  src: url('fonts/Orbitron-Variable.ttf') format('truetype');
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0D0221;
  --pink: #FF2975;
  --purple: #B026FF;
  --cyan: #2DE2E6;
  --yellow: #FFD319;
  --mint: #01F9C6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: #E8E3F5;
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-user-select: none;
  user-select: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.18) 0px,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}

.brand { text-align: center; }
.brand-over {
  font-size: clamp(10px, 1.6vh, 13px);
  letter-spacing: 0.55em;
  margin-left: 0.55em;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(45, 226, 230, 0.8);
}
.title {
  font-size: clamp(28px, 5vh, 48px);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.12em;
  background: linear-gradient(180deg, #fff 0%, var(--cyan) 35%, var(--purple) 65%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(176, 38, 255, 0.6));
}

.board-wrap {
  position: relative;
  border: 2px solid var(--purple);
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(176, 38, 255, 0.5), inset 0 0 30px rgba(176, 38, 255, 0.08);
  line-height: 0;
}

#field {
  display: block;
  touch-action: none;
  width: auto;
  height: 76dvh;
  max-height: 76dvh;
  max-width: 100%;
  aspect-ratio: 256 / 320;
}

.chrome-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 1.2em;
}
#hud, #toast {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(45, 226, 230, 0.6);
}
#toast { color: var(--mint); min-height: 1.2em; }
#toast[hidden] { display: none; }

#pause {
  font-size: 11px;
  padding: 4px 10px;
  letter-spacing: 0.2em;
}
#pause[hidden] { display: none; }

#title-overlay, #overlay, #sector-overlay, #draft, #end-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  background: rgba(13, 2, 33, 0.78);
  padding-bottom: env(safe-area-inset-bottom);
  text-align: center;
}
#title-overlay {
  background: radial-gradient(ellipse at center, rgba(13, 2, 33, 0.72) 0%, rgba(13, 2, 33, 0.28) 70%);
}
#title-overlay[hidden], #overlay[hidden], #sector-overlay[hidden],
#draft[hidden], #end-overlay[hidden] { display: none; }

.tagline {
  letter-spacing: 0.35em;
  color: var(--pink);
  text-shadow: 0 0 10px rgba(255, 41, 117, 0.7);
  font-size: clamp(12px, 2vh, 16px);
}

button {
  font: inherit;
  letter-spacing: 0.15em;
  padding: 10px 18px;
  color: var(--cyan);
  background: rgba(13, 2, 33, 0.9);
  border: 1px solid rgba(45, 226, 230, 0.5);
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(45, 226, 230, 0.25);
}
#draft-cards { display: flex; flex-direction: column; gap: 10px; }
#draft-cards button { min-width: 240px; text-align: left; }
#draft-cards .lane { display: block; font-size: 11px; color: var(--mint); letter-spacing: 0.2em; }
#draft-cards .desc { display: block; font-size: 12px; color: rgba(232, 227, 245, 0.7); }

.end-submit {
  min-height: 1.2em;
  color: var(--mint);
  letter-spacing: 0.15em;
  font-size: 12px;
}
.end-entry {
  display: flex;
  gap: 8px;
  align-items: center;
}
.end-entry[hidden] { display: none; }
.end-entry button[data-slot] {
  min-width: 2.4em;
  font-size: 22px;
  padding: 8px 10px;
}
.end-challenge {
  letter-spacing: 0.3em;
  color: var(--pink);
  font-size: 18px;
}
.end-challenge[hidden], #end-challenge[hidden] { display: none; }
