:root {
  --void-black: #0b0b0e;
  --oracle-purple: #5b3df5;
  --signal-cyan: #2ed3ff;
  --pulse-magenta: #ff3ea5;
  --warm-paper: #f2efe9;
  --soft-graphite: #2a2a2f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", "Gill Sans", sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 78, 175, 0.28), transparent 45%),
    radial-gradient(circle at 85% 12%, rgba(46, 211, 255, 0.25), transparent 42%),
    radial-gradient(circle at 70% 80%, rgba(247, 127, 0, 0.24), transparent 50%),
    linear-gradient(145deg, #16111f, #09090d 60%);
  color: var(--warm-paper);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 11, 14, 0.9);
}

.brand {
  color: var(--signal-cyan);
  font-weight: 700;
  text-decoration: none;
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-actions a,
.nav-actions button {
  color: var(--warm-paper);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  text-decoration: none;
  cursor: pointer;
}

.container {
  width: min(920px, 92vw);
  margin: 2rem auto;
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
}

.hero,
.card,
.ping-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 1.25rem;
  background: rgba(42, 42, 47, 0.4);
  backdrop-filter: blur(4px);
}

.hero {
  margin-bottom: 1rem;
  text-align: center;
}

.game-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
}

#stage-countdown {
  text-align: center;
}

.stage-card {
  min-height: 68vh;
  max-height: 68vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

h1,
h2 {
  margin-top: 0;
  font-family: "Georgia", "Palatino Linotype", serif;
  letter-spacing: 0.4px;
}

.stack {
  display: grid;
  gap: 0.6rem;
}

input {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0.65rem;
  background: rgba(11, 11, 14, 0.5);
  color: var(--warm-paper);
}

.button {
  display: inline-block;
  background: linear-gradient(135deg, var(--oracle-purple), var(--pulse-magenta));
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  text-decoration: none;
  cursor: pointer;
}

.button.alt {
  margin-top: 0.4rem;
  background: linear-gradient(135deg, var(--signal-cyan), var(--oracle-purple));
}

.step {
  color: var(--signal-cyan);
  margin-top: 0;
  text-align: center;
}

.choices {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1rem 0;
}

.choice-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  min-height: 92px;
  padding: 0.9rem;
  background: rgba(11, 11, 14, 0.4);
  color: var(--warm-paper);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.choice-btn.accept {
  border-color: rgba(46, 211, 255, 0.7);
}

.choice-btn.reject {
  border-color: rgba(255, 62, 165, 0.7);
}

.ticket {
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  padding: 0.8rem;
  margin: 1rem 0;
  background: var(--warm-paper);
  color: var(--soft-graphite);
}

.provider-badge {
  font-size: 0.9rem;
  color: var(--signal-cyan);
}

.countdown-number {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
}

.countdown-text {
  text-align: center;
  margin-bottom: 0.35rem;
}

.oracle-spinner {
  display: block;
  align-self: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--signal-cyan);
  margin: 0.7rem auto 0;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.song-reason {
  color: rgba(242, 239, 233, 0.85);
}

.song-artwork {
  width: min(280px, 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: block;
  margin: 0.7rem 0;
}

.song-preview {
  width: 100%;
  margin-top: 0.25rem;
}

.vote-choices {
  grid-template-columns: 1fr 1fr;
}

.color-choice {
  font-size: 0;
}

@media (max-width: 900px) {
  .choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bowl-card {
  display: grid;
  gap: 1rem;
}

.ticket-wrap {
  display: grid;
  justify-items: center;
}

.ticket-image {
  width: min(572px, 100%);
  min-height: 900px;
  max-height: 1200px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #fff;
}

.qr-wrap {
  margin-top: 30px;
}

.qr-image {
  width: min(220px, 80vw);
  max-width: 220px;
  border: 8px solid #fff;
  background: #fff;
}

.flash {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.flash button {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.flash-success {
  background: rgba(46, 211, 255, 0.2);
}

.flash-error {
  background: rgba(255, 62, 165, 0.2);
}

.ping-result {
  margin-top: 0.75rem;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(11, 11, 14, 0.35);
}
