:root {
  --navy: #07152B;
  --blue: #087BFF;
  --blue-hover: #00A8FF;
  --ink: #07152B;
  --muted: #526783;
  --line: #D8E4F0;
  --card: #F4F8FD;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", system-ui, sans-serif;
  background: linear-gradient(165deg, #07152B 0%, #0a2a52 45%, #087BFF 100%);
  min-height: 100vh;
  color: var(--ink);
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.wheel-top {
  padding: 1rem 0 0;
}

.wheel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wheel-nav img {
  height: 40px;
  width: auto;
}

.wheel-nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wheel-nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.wheel-nav-links a:hover { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-black {
  background: #fff;
  color: var(--navy);
}

.btn-black:hover { transform: translateY(-1px); }

.wheel-main {
  padding: 2.5rem 0 3rem;
}

.wheel-card {
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(8, 123, 255, 0.2);
  border-radius: 24px;
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: 0 24px 60px rgba(7, 21, 43, 0.35);
  text-align: center;
}

.wheel-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.35rem;
}

.wheel-card h1 {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  letter-spacing: -0.03em;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.wheel-lead {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.wheel-wrap {
  position: relative;
  width: fit-content;
  margin: 0 auto 1.5rem;
}

.wheel-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid var(--blue);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  z-index: 10;
}

.wheel-lights {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 3px dashed rgba(8, 123, 255, 0.45);
  animation: wheelGlow 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes wheelGlow {
  0%, 100% { opacity: 0.45; transform: rotate(0deg); }
  50% { opacity: 1; transform: rotate(6deg); }
}

#wheel-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.wheel-form {
  text-align: left;
  margin-bottom: 1rem;
}

.wheel-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.wheel-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.wheel-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 123, 255, 0.15);
}

.wheel-input:disabled {
  background: var(--card);
  color: var(--muted);
}

.wheel-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.wheel-spin-btn {
  width: 100%;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--blue), var(--blue-hover));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.88rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.wheel-spin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(8, 123, 255, 0.4);
}

.wheel-spin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wheel-used {
  display: none;
  font-size: 0.88rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  text-align: left;
}

.wheel-used.is-visible { display: block; }

.wheel-rules {
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
}

.wheel-rules strong {
  display: block;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.wheel-prizes {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.25rem;
}

.wheel-result-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(7, 21, 43, 0.78);
  backdrop-filter: blur(6px);
}

.wheel-result-modal.is-open { display: flex; }

.wheel-result-box {
  background: #fff;
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.wheel-result-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}

.wheel-result-close:hover { color: var(--ink); }

.wheel-result-box h2 {
  font-size: 1.45rem;
  color: var(--navy);
  margin: 0.5rem 0 0.65rem;
}

.wheel-result-box p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.wheel-result-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.88rem;
}

.wheel-result-wa:hover { filter: brightness(1.05); }

.wheel-footer {
  text-align: center;
  padding: 1.5rem 0 2rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  #wheel-canvas {
    max-width: 300px;
  }
}
