@import url('/static/shared/base.css');

:root {
  --water-deep:  #050d1a;
  --water-elev:  #11192a;
  --water-card:  #16213b;
  --moon-yellow: #fbbf24;
  --moon-bright: #ffd76a;
  --hot-pink:    #ff2091;
  --win-green:   #84ff7e;
  --lose-pink:   #ff8aa7;
}

body {
  background:
    radial-gradient(ellipse at 30% 15%, rgba(255, 32, 145, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 85%, rgba(1, 132, 253, 0.10) 0%, transparent 55%),
    var(--water-deep) !important;
  color: #e8eaf3 !important;
}

.stage {
  display: flex !important; flex-direction: column !important; gap: 1rem !important;
  max-width: 1180px !important; width: 100%; margin: 0 auto;
  padding: 1rem 1.2rem 2rem; box-sizing: border-box;
}
.stage, .hero, .hero p, .panel, .muted { color: #e8eaf3; }
.muted { color: #a8aebf !important; }
.brand, .brand-game { color: var(--moon-bright) !important; }
.balance { color: var(--moon-bright) !important; }
#player-label { color: #cdd0d8 !important; }
.hero h1 { color: #fff !important; }
.hero p  { color: #cdd0d8 !important; }
.hero em, .hero strong { color: var(--moon-bright); font-style: normal; font-weight: 600; }

.topbar { background: rgba(8, 10, 16, 0.88) !important; border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important; backdrop-filter: blur(10px); }
.new-pill { display: inline-block; margin-left: 0.5rem; padding: 2px 8px; border-radius: 10px; background: linear-gradient(135deg, #FF2091 0%, #0184FD 100%); color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; vertical-align: middle; }

/* Hero — same skeleton as Hunt/Tower so visual rhythm matches. */
.hero { text-align: center; padding: 1.1rem 1rem 0.4rem; }
.hero-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.28em; color: var(--moon-yellow); margin-bottom: 0.5rem; }
.hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.5rem, 4vw, 2.4rem); margin: 0 0 0.5rem; line-height: 1.15; }
.hero p { max-width: 640px; margin: 0 auto 1.2rem; font-size: 0.95rem; line-height: 1.55; padding: 0 0.5rem; }
.hero-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.8rem; max-width: 1000px; margin: 1.4rem auto 0; text-align: left; }
.hp-card { background: var(--water-card); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 1rem 1.1rem; transition: transform 0.25s, border-color 0.25s; }
.hp-card:hover { transform: translateY(-2px); border-color: rgba(251, 191, 36, 0.4); }
.hp-step { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--moon-yellow); background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.3); border-radius: 100px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.hp-title { font-family: 'Cormorant Garamond', serif; font-size: 1.18rem; font-weight: 600; color: var(--moon-bright); margin-top: 0.5rem; margin-bottom: 0.3rem; }
.hp-body { font-size: 13px; color: #b8bfd0; line-height: 1.55; }
.hp-body em { color: var(--moon-bright); font-style: normal; font-weight: 600; }

button.cta { background: linear-gradient(135deg, #FF2091 0%, #0184FD 100%) !important; color: #fff !important; border: none !important; padding: 0.9rem 2rem !important; font-size: 1rem !important; font-weight: 700 !important; letter-spacing: 0.08em !important; text-transform: uppercase !important; border-radius: 6px !important; cursor: pointer !important; box-shadow: 0 6px 22px rgba(255, 32, 145, 0.35); min-height: 48px; }
button.cta:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
button.cta:disabled { opacity: 0.5; cursor: not-allowed; }

.phase-indicator { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 1rem; background: var(--water-elev); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 100px; margin: 0 auto; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #6f7689; flex-wrap: wrap; }
.phase-step { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; border-radius: 100px; transition: all 0.25s; }
.phase-step .phase-num { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); font-size: 10px; color: #8a92a8; }
.phase-step.active { background: rgba(251, 191, 36, 0.10); color: var(--moon-bright); box-shadow: 0 0 14px rgba(251, 191, 36, 0.35); }
.phase-step.active .phase-num { background: var(--moon-yellow); color: #0a0d14; font-weight: 700; }
.phase-step.done { color: #5fa68f; }
.phase-step.done .phase-num { background: rgba(95, 166, 143, 0.3); color: #5fa68f; }
.phase-arrow { color: #4a526a; }

/* Solo flow: collapse the hero so the game-panel sits right under the
   header. Players can replay the tutorial for the rules. */
.hero { display: none !important; }
.phase-indicator { display: none !important; }
.stage { gap: 0.6rem !important; padding-top: 0.6rem !important; }

.game-panel { background: var(--water-elev); border: 2px solid rgba(255, 215, 106, 0.3); border-radius: 14px; padding: 0.7rem 0.8rem 0.9rem; }

.hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-bottom: 0.9rem; }
.hud-cell { background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 8px; padding: 0.55rem 0.7rem; text-align: center; }
.hud-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: #8a92a8; margin-bottom: 0.15rem; }
.hud-value { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 700; color: var(--moon-bright); font-variant-numeric: tabular-nums; }

/* Dartboard canvas — square, centered. */
.canvas-wrap {
  width: 100%; max-width: 440px; margin: 0 auto 0.6rem;
  aspect-ratio: 1 / 1; min-height: 240px; max-height: 50vh;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.10);
  background: #0a121e;
  position: relative; cursor: crosshair;
  touch-action: manipulation;
}
#bullseye-canvas { width: 100%; height: 100%; display: block; user-select: none; }

.stake-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin-bottom: 0.6rem; }
.stake-pill { min-width: 0; padding: 0.55rem 0.4rem; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.04); border-radius: 10px; color: #cdd0d8; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.15s; }
.stake-pill:hover:not(.is-locked) { border-color: var(--moon-yellow); color: #fff; background: rgba(251, 191, 36, 0.08); }
.stake-pill.is-selected { background: rgba(251, 191, 36, 0.16); border-color: var(--moon-bright); color: #fff; box-shadow: 0 0 14px rgba(251, 191, 36, 0.35); }
.stake-pill.is-locked { opacity: 0.5; cursor: not-allowed; }

.action-btn { width: 100%; padding: 1rem 1.2rem; border-radius: 12px; border: none; cursor: pointer; font-family: 'Cormorant Garamond', serif; letter-spacing: 0.06em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; min-height: 76px; transition: transform 0.1s, filter 0.15s, box-shadow 0.2s; -webkit-tap-highlight-color: transparent; }
.action-btn:active:not(:disabled) { transform: scale(0.98); filter: brightness(1.1); }
.action-btn:disabled { cursor: not-allowed; }
.action-btn.act-drop { background: linear-gradient(135deg, #FF2091 0%, #0184FD 100%); color: #fff; box-shadow: 0 8px 26px rgba(255, 32, 145, 0.4); }
.action-btn.act-hunt { background: linear-gradient(135deg, #c84a3d 0%, #8a2e23 100%); color: #fff; box-shadow: 0 8px 26px rgba(255, 91, 91, 0.4); }
.action-btn.act-done { background: linear-gradient(135deg, #5fa68f 0%, #2a7d5f 100%); color: #fff; }
.action-btn.act-idle { background: rgba(255, 255, 255, 0.05); color: #8a92a8; border: 1px dashed rgba(255, 255, 255, 0.15); }
.action-btn .act-top { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.action-btn .act-bot { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; letter-spacing: 0.06em; opacity: 0.92; }

.game-status { margin-top: 0.6rem; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; color: var(--moon-bright); min-height: 1.2em; }

.reveal-panel { background: var(--water-elev); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 1.4rem 1.3rem; text-align: center; }
.reveal-banner { font-family: 'JetBrains Mono', monospace; font-size: clamp(1rem, 2.6vw, 1.3rem); letter-spacing: 0.18em; text-transform: uppercase; color: #cdd0d8; margin-bottom: 0.5rem; }
.reveal-banner.win  { color: var(--win-green); }
.reveal-banner.lose { color: var(--lose-pink); }
.reveal-payout { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.4rem, 6vw, 3.2rem); font-weight: 700; margin: 0.2rem 0; }
.reveal-sub { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; }
.reveal-panel .secondary { margin-top: 0.8rem; background: transparent; border: 1px solid var(--moon-yellow); color: var(--moon-bright); padding: 0.6rem 1.2rem; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; cursor: pointer; }
.reveal-panel .secondary:hover { background: rgba(251, 191, 36, 0.08); }

.pool-panel { background: var(--water-elev); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 10px; padding: 1rem 1.2rem; }
.pool-panel h3 { color: var(--moon-bright) !important; margin: 0 0 0.5rem; font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; }
.pool-panel .amount { color: #cdd0d8; font-size: 0.85rem; }
.pool-panel p.muted { color: #b0b6c8 !important; }

/* Mobile */
@media (max-width: 900px) {
  .stage { padding: 0.9rem 0.8rem 1.6rem; gap: 0.85rem; max-width: 100% !important; }
  .canvas-wrap { max-width: 480px; max-height: 60vh; min-height: 320px; }
  .hud-value { font-size: 16px; }
}

@media (max-width: 640px) {
  .stage { padding: 0.6rem 0.5rem 1.4rem; gap: 0.7rem; }
  .hero { padding: 0.6rem 0.4rem 0.2rem; }
  .hero h1 { font-size: 1.35rem; }
  .hero p { font-size: 0.9rem; padding: 0 0.3rem; }
  .hero-preview { grid-template-columns: 1fr; gap: 0.55rem; margin-top: 1rem; }
  .hp-card { padding: 0.75rem 0.85rem; }
  .hp-title { font-size: 1.08rem; }
  .hp-body { font-size: 12px; }
  button.cta { padding: 0.9rem 1.4rem !important; width: 100%; max-width: 340px; font-size: 0.95rem !important; }

  .game-panel { padding: 0.7rem 0.6rem 0.85rem; border-radius: 12px; }
  .hud { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; margin-bottom: 0.7rem; }
  .hud-cell { padding: 0.45rem 0.4rem; }
  .hud-label { font-size: 8px; letter-spacing: 0.18em; }
  .hud-value { font-size: 14px; }
  .canvas-wrap { max-height: 58vh; min-height: 280px; border-width: 1px; }

  .stake-row { gap: 0.35rem; }
  .stake-pill { min-width: 0; flex: 1 1 22%; padding: 0.6rem 0.35rem; font-size: 0.82rem; border-radius: 8px; }

  .action-btn { padding: 0.85rem 0.9rem; min-height: 68px; }
  .action-btn .act-top { font-size: 1.1rem; letter-spacing: 0.08em; }
  .action-btn .act-bot { font-size: 0.78rem; }

  .topbar { padding: 0.5rem 0.8rem; }
  .brand-game { font-size: 0.92rem; }
  .balance { font-size: 0.95rem; }
}

@media (max-width: 380px) {
  .stake-pill { padding: 0.55rem 0.3rem; font-size: 0.78rem; }
  .hud-value { font-size: 13px; }
  .action-btn .act-top { font-size: 1rem; }
  .hero h1 { font-size: 1.2rem; }
}
