/* Theme for Void Drifter twin-stick shooter. base.css owns the shell. */
:root {
  --void: #05040a;
  --cyan: #00f2ff;
  --magenta: #ff2bd6;
  --amber: #ffd33d;
  --ink-dim: #8f8ba8;
  --font-display: 'Orbitron', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body { background: var(--void); }

body::before {
  content: '';
  position: fixed;
  inset: -2px;
  background-image:
    linear-gradient(rgba(0, 242, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 242, 255, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 40%, transparent 92%);
  animation: grid-drift 18s linear infinite;
}
@keyframes grid-drift { to { background-position: 46px 46px, 46px 46px; } }

#stage {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* HUD */
.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 0;
}
.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  color: #fff;
  text-shadow: 0 0 8px rgba(0,242,255,0.7);
}
.stat .label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}
.stat span:last-child { font-size: 1.3rem; font-weight: 700; }

.hud-bottom {
  position: absolute;
  left: 16px; right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.coin-stat span:last-child { color: var(--amber); text-shadow: 0 0 8px rgba(255,211,61,0.8); }

/* Shop HUD button — small, always visible in-game */
.shop-hud-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  color: #02141a;
  background: linear-gradient(180deg, #ff66ff, #cc00cc);
  border: none;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255,43,214,0.7);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.08s ease;
  z-index: 3;
  pointer-events: auto;
}
.shop-hud-btn:active { transform: scale(0.92); }

/* Announcer and other overlays inherit from before */

/* Difficulty-up banner */
.announce {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  text-align: center;
  padding: 18px 28px;
  border-radius: 18px;
  background: rgba(10, 4, 24, 0.82);
  border: 1px solid rgba(255, 43, 214, 0.6);
  box-shadow: 0 0 28px rgba(255, 43, 214, 0.5);
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.announce.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.ann-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 43, 214, 0.9);
}
.ann-sub {
  margin-top: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

/* Overlays */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 40%, rgba(8,6,20,0.7), rgba(2,2,6,0.92));
  backdrop-filter: blur(2px);
  z-index: 5;
}
.hidden { display: none !important; }

h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  color: #fff;
  text-shadow: 0 0 12px rgba(0,242,255,0.9), 0 0 30px rgba(255,43,214,0.4);
}
.tag { color: var(--ink-dim); font-size: 0.95rem; margin: 0; }
.help {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
  color: #cfd0e6;
  font-size: 0.85rem;
  line-height: 1.7;
}
.help li::before { content: '▸ '; color: var(--cyan); }

.big-btn {
  margin-top: 6px;
  padding: 16px 46px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: #02141a;
  background: linear-gradient(180deg, #6ff6ff, var(--cyan));
  border: none;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(0,242,255,0.7), 0 6px 20px rgba(0,0,0,0.4);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.08s ease;
}
.big-btn:active { transform: scale(0.94); }

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

/* Power-up shop modal */
.shop-gold {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255,211,61,0.8);
}
.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}
/* Each shop slot: weapon/bonus button + its own reroll button side-by-side */
.shop-slot-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.shop-slot-wrap .shop-btn {
  flex: 1;
  min-width: 0;
}
.slot-reroll-btn {
  flex: 0 0 auto;
  width: 54px;
  min-height: 58px;
  padding: 8px 0;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ff66ff, #9900cc);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
}
.slot-reroll-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.bonus-offer {
  border-color: rgba(0,242,255,0.5);
}
.shop-btn {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 10px 14px;
  min-height: 58px;
  border: 1px solid rgba(0,242,255,0.5);
  border-radius: 14px;
  background: rgba(8,12,28,0.85);
  color: #fff;
  font-family: var(--font-display);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 0 12px rgba(0,242,255,0.25);
  transition: transform 0.08s ease;
}
.shop-btn:active:not(:disabled) { transform: scale(0.95); }
.shop-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; border-color: rgba(120,120,140,0.4); }
.shop-btn.too-expensive .shop-cost { color: #ff6b6b; }
.shop-emoji { grid-row: 1 / 3; font-size: 1.5rem; line-height: 1; text-align: center; }
.shop-name { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; }
.shop-cost { font-size: 0.85rem; color: var(--amber); white-space: nowrap; }
.shop-desc { grid-column: 2 / 4; font-size: 0.65rem; color: var(--ink-dim); font-family: system-ui, sans-serif; letter-spacing: 0; }
.shop-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
.shop-reroll {
  padding: 12px 24px;
  font-size: 0.85rem;
  background: linear-gradient(180deg, #ff66ff, #9900cc);
}
.shop-leave {
  padding: 12px 24px;
  font-size: 0.85rem;
  background: linear-gradient(180deg, #6a6a7a, #444450);
}
.shop-reroll:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.shop-btn.slots-full {
  border-color: rgba(255,211,61,0.6);
  box-shadow: 0 0 12px rgba(255,211,61,0.3);
}
.shop-btn.slots-full .shop-desc { color: var(--amber); }
.shop-btn.slots-full .shop-name::after {
  content: ' ◆';
  color: var(--amber);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}
.replace-header {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--amber);
  text-align: center;
  padding: 8px 0 2px;
}
.replace-btn {
  border-color: rgba(255,43,214,0.5);
  box-shadow: 0 0 12px rgba(255,43,214,0.3);
}
.replace-btn .shop-desc { color: #ff66ff; }
.replace-cancel {
  margin-top: 8px;
  font-size: 0.85rem;
  background: linear-gradient(180deg, #6a6a7a, #444450);
  padding: 12px 24px;
}
