/* ============================================================
   ORBITAL — styles
   ============================================================ */

:root {
  --bg:        #05060f;
  --ink:       #e8ecff;
  --dim:       #7b84b8;
  --cyan:      #6ff5ff;
  --violet:    #a98bff;
  --gold:      #ffd76a;
  --crimson:   #ff5a7a;
  --sentinel:  #ff9f43;
  --gate:      #7dff9e;
  --panel:     rgba(10, 12, 30, 0.72);
  --edge:      rgba(140, 160, 255, 0.18);
  --font:      "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --mono:      "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { cursor: crosshair; }

#game {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hidden { display: none !important; }

/* ── HUD ─────────────────────────────────────────────────── */

#hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  gap: 6px;
  padding: 16px 18px;
  pointer-events: none;
  z-index: 5;
}

.hud-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 92px;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.hud-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.hud-value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.hud-value .dim { color: var(--dim); font-size: 14px; }

.hud-combo { margin-left: auto; text-align: right; }
.hud-combo .hud-value { color: var(--gold); }

/* combo flare */
.hud-combo.pop { animation: pop 0.32s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.16); box-shadow: 0 0 26px rgba(255, 215, 106, 0.45); }
  100% { transform: scale(1); }
}

/* ── Floating toast ──────────────────────────────────────── */

#toast {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--panel);
  border: 1px solid rgba(111, 245, 255, 0.3);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 6;
  animation: toastIn 0.4s ease both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ── Screens ─────────────────────────────────────────────── */

#screens {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 10;
  pointer-events: none;
}

.screen {
  pointer-events: auto;
  width: min(620px, 90vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 42px 44px;
  text-align: center;
  background: linear-gradient(160deg, rgba(14, 16, 40, 0.9), rgba(6, 7, 20, 0.94));
  border: 1px solid var(--edge);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: screenIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* logo */

.logo {
  display: flex;
  justify-content: center;
  gap: 0.1em;
  font-size: clamp(38px, 9vw, 70px);
  font-weight: 200;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  margin-bottom: 14px;
}

.logo span {
  background: linear-gradient(180deg, #ffffff, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.logo span:nth-child(1) { animation-delay: 0.00s; }
.logo span:nth-child(2) { animation-delay: 0.05s; }
.logo span:nth-child(3) { animation-delay: 0.10s; }
.logo span:nth-child(4) { animation-delay: 0.15s; }
.logo span:nth-child(5) { animation-delay: 0.20s; }
.logo span:nth-child(6) { animation-delay: 0.25s; }
.logo span:nth-child(7) { animation-delay: 0.30s; }

.logo .logo-o {
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 34px rgba(111, 245, 255, 0.35);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.tagline {
  color: var(--dim);
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.04em;
  margin-bottom: 30px;
}

/* how-to list */

.howto {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: 32px;
}

.howto-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #b9c1e8;
}

kbd {
  flex: none;
  min-width: 68px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(111, 245, 255, 0.08);
  border: 1px solid rgba(111, 245, 255, 0.22);
  border-radius: 6px;
}

.c-dust { color: var(--gold);     font-style: normal; }
.c-gate { color: var(--gate);     font-style: normal; }
.c-bad  { color: var(--crimson);  font-style: normal; }
.c-sent { color: var(--sentinel); font-style: normal; }

/* buttons */

.btn {
  display: inline-block;
  padding: 13px 42px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #04121a;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  box-shadow: 0 10px 34px rgba(111, 245, 255, 0.22);
}

.btn:hover  { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(111, 245, 255, 0.34); filter: brightness(1.08); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-bad {
  background: linear-gradient(135deg, var(--crimson), #ff9f43);
  box-shadow: 0 10px 34px rgba(255, 90, 122, 0.24);
}
.btn-bad:hover { box-shadow: 0 16px 44px rgba(255, 90, 122, 0.36); }

.btn-ghost {
  margin-top: 12px;
  color: var(--dim);
  background: transparent;
  border: 1px solid var(--edge);
  box-shadow: none;
}
.btn-ghost:hover { color: var(--ink); box-shadow: none; filter: none; }

/* result screens */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gate);
  margin-bottom: 10px;
}
.eyebrow-bad { color: var(--crimson); }

.big {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.sub { color: var(--dim); font-size: 14px; margin-bottom: 26px; }

.tally {
  list-style: none;
  margin: 0 auto 28px;
  max-width: 340px;
}

.tally li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 2px;
  font-size: 14px;
  color: #b9c1e8;
  border-bottom: 1px dashed rgba(140, 160, 255, 0.14);
  animation: screenIn 0.4s ease both;
}

.tally li:last-child {
  border-bottom: none;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--edge);
  font-size: 16px;
  color: var(--ink);
}

.tally b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.hint { margin-top: 16px; font-size: 12px; color: var(--dim); }
.hint kbd { display: inline-block; min-width: 0; }

.best {
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.best span { font-family: var(--mono); color: var(--gold); }

#corner-hint {
  position: fixed;
  right: 18px;
  bottom: 16px;
  font-size: 11px;
  color: var(--dim);
  z-index: 5;
  pointer-events: none;
}
#corner-hint kbd { min-width: 0; margin-right: 6px; }

/* ── Small screens ───────────────────────────────────────── */

@media (max-width: 560px) {
  .screen   { padding: 30px 22px; }
  .howto    { gap: 10px; }
  .howto-row{ font-size: 12.5px; gap: 10px; }
  kbd       { min-width: 58px; }
  #hud      { padding: 10px; gap: 4px; flex-wrap: wrap; }
  .hud-block{ min-width: 74px; padding: 6px 10px; }
  .hud-value{ font-size: 16px; }
  #corner-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
