:root {
  --bg: #0f1216;
  --card: #171d26;
  --border: #2a3444;
  --text: #f4f4f5;
  --muted: #8b8b96;
  --orange: #d4af37;
  --red: #b08d57;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.glow {
  position: fixed;
  top: -30vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 55vh;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.15), transparent 70%);
  pointer-events: none;
}

.screen {
  width: 100%;
  max-width: 460px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.hidden { display: none !important; }

.brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--orange), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.muted { color: var(--muted); font-size: 15px; line-height: 1.5; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.btn {
  display: block;
  width: 100%;
  padding: 15px 22px;
  border-radius: 16px;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.30);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.wheel-wrap {
  position: relative;
  width: min(88vw, 400px);
  aspect-ratio: 1;
}

#wheel { width: 100%; height: 100%; display: block; }

.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 24px solid #fff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  z-index: 3;
}

.btn-spin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 6px solid var(--bg);
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 10px 30px rgba(212, 175, 55, 0.35);
  z-index: 4;
  transition: transform 0.12s ease;
}

.btn-spin:active { transform: translate(-50%, -50%) scale(0.94); }
.btn-spin:disabled { opacity: 0.7; cursor: default; }

.badge {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.20), rgba(176, 141, 87, 0.20));
  color: #e8c878;
}

.badge-miss { background: rgba(139, 139, 150, 0.15); color: var(--muted); }

#result-qr {
  width: 190px;
  height: 190px;
  background: #fff;
  border-radius: 16px;
  padding: 10px;
}

#result-code {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #e8c878;
  background: var(--bg);
  border: 1px dashed rgba(212, 175, 55, 0.5);
  border-radius: 12px;
  padding: 12px 18px;
  user-select: text;
  -webkit-user-select: text;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  animation: spin 0.8s linear infinite;
}

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