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

:root {
  --bg: #05070d;
  --panel: #0d1220;
  --accent: #2e6bff;
  --accent2: #00d4ff;
  --text: #eef2ff;
  --muted: #8a93ad;
}

html, body {
  background: radial-gradient(circle at 50% 0%, #10182e 0%, #05070d 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 40px;
  max-width: 480px;
  margin: 0 auto;
}

.header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.logo {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.2px;
}

.price-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 0 16px rgba(46, 107, 255, 0.5);
  white-space: nowrap;
}

.wheel-wrap {
  position: relative;
  width: min(88vw, 320px);
  height: min(88vw, 320px);
  margin: 10px 0 24px;
}

.pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid var(--accent2);
  filter: drop-shadow(0 0 6px var(--accent2));
  z-index: 5;
}

#wheelSvg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 24px rgba(46, 107, 255, 0.35));
}

#wheelGroup {
  transform-origin: 150px 150px;
  transition: transform 4.6s cubic-bezier(0.12, 0.83, 0.16, 1);
}

#wheelGroup text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  fill: #fff;
  pointer-events: none;
}

.wheel-outline {
  fill: none;
  stroke: var(--accent2);
  stroke-width: 4;
  opacity: 0.6;
}

.hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1c2540, #060a16);
  border: 2px solid var(--accent2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  z-index: 3;
}

.status {
  min-height: 20px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  text-align: center;
}

.spin-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(46, 107, 255, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.spin-btn:active { transform: scale(0.97); }
.spin-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.legend {
  width: 100%;
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.legend-item {
  background: var(--panel);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--panel);
  border: 1px solid rgba(46, 107, 255, 0.4);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 0 40px rgba(46, 107, 255, 0.35);
  animation: pop 0.35s ease;
}

@keyframes pop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-emoji { font-size: 52px; margin-bottom: 8px; }
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.modal-prize { font-size: 16px; color: var(--accent2); font-weight: 700; margin-bottom: 14px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.modal-close {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
