:root {
  --gold: #F5A623;
  --gold-light: #FFD166;
  --gold-dark: #C8821A;
  --blue-deep: #06112B;
  --blue-mid: #0B1E4A;
  --blue-bright: #1A3A7A;
  --blue-glow: #1E4FBF;
  --text: #F0F4FF;
  --muted: #8BA3CC;
  --border-gold: rgba(245, 166, 35, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  font-family: 'Noto Sans Georgian', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--blue-deep);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── STARS ── */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.stars-layer {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 55%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 75%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 40%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 5%  85%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 70%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(2px 2px at 45% 10%, rgba(255,220,100,0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 75% 90%, rgba(255,220,100,0.4) 0%, transparent 100%);
}
.s1 { background-size: 220px 220px; opacity: 0.55; animation: twinkle 4s ease-in-out infinite; }
.s2 { background-size: 140px 140px; opacity: 0.35; animation: twinkle 7s ease-in-out 2s infinite; }
.s3 { background-size: 90px 90px;   opacity: 0.25; animation: twinkle 10s ease-in-out 5s infinite; }

@keyframes twinkle {
  0%, 100% { opacity: 0.2; } 50% { opacity: 0.6; }
}

/* ── BALLOONS ── */
.balloons { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.balloon {
  position: absolute;
  bottom: -140px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  opacity: 0;
  animation: floatUp 14s ease-in-out infinite;
}
.b1 { left: 4%;   width: 42px; height: 54px; background: radial-gradient(circle at 35% 30%, #FFD580, var(--gold));         animation-delay: 0s; }
.b2 { left: 18%;  width: 54px; height: 68px; background: radial-gradient(circle at 35% 30%, #6A9FFF, #2A5FCC);             animation-delay: 2.5s; }
.b3 { left: 48%;  width: 38px; height: 50px; background: radial-gradient(circle at 35% 30%, #FFE090, var(--gold-light));   animation-delay: 5s; }
.b4 { right: 14%; width: 48px; height: 62px; background: radial-gradient(circle at 35% 30%, #7AB8FF, #3A70DD);             animation-delay: 1.5s; }
.b5 { right: 4%;  width: 44px; height: 58px; background: radial-gradient(circle at 35% 30%, #FFD580, var(--gold));         animation-delay: 3.5s; }

@keyframes floatUp {
  0%   { transform: translateY(0)      rotate(-4deg); opacity: 0; }
  5%   { opacity: 0.28; }
  50%  { transform: translateY(-48vh)  rotate(4deg);  opacity: 0.28; }
  95%  { opacity: 0.1; }
  100% { transform: translateY(-105vh) rotate(-2deg); opacity: 0; }
}

/* ── PAGE ── */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── HEADER ── */
.site-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 6px;
}

.logo-img {
  height: 130px;
  max-width: 160px;
  width: auto;
  display: block;
  object-fit: contain;
}

.header-badge {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #000;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 7px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(245,166,35,0.45);
  animation: badgePulse 2.5s ease-in-out infinite;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(245,166,35,0.45); }
  50%       { box-shadow: 0 4px 32px rgba(245,166,35,0.85); }
}

/* ── HERO ── */
.hero {
  text-align: center;
  margin: 24px 0 28px;
  padding: 0 8px;
}

.hero-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.9;
}

.hero-title {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero-title span {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 15px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.55;
}

/* ── WHEEL SECTION ── */
.wheel-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.wheel-glow-ring {
  position: absolute;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30,79,191,0.3) 0%, transparent 68%);
  pointer-events: none;
  animation: glowPulse 3.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1);    opacity: 0.65; }
  50%       { transform: scale(1.05); opacity: 1; }
}

.wheel-container {
  position: relative;
  width: 520px;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* POINTER */
.pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.65));
  animation: ptrBounce 1.7s ease-in-out infinite;
}

@keyframes ptrBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(5px); }
}

/* CANVAS */
#wheelCanvas {
  border-radius: 50%;
  border: 8px solid var(--gold);
  box-shadow:
    0 0 0 3px rgba(0,0,0,0.55),
    0 0 45px rgba(245,166,35,0.3),
    0 0 90px rgba(30,79,191,0.35),
    0 20px 70px rgba(0,0,0,0.75);
  cursor: pointer;
  transition: box-shadow 0.3s;
  display: block;
  width: 520px;
  height: 520px;
}

/* SPIN BUTTON */
.spin-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 5px solid #000;
  background: radial-gradient(circle at 33% 28%, #FFE566, var(--gold), var(--gold-dark));
  cursor: pointer;
  z-index: 5;
  box-shadow:
    0 6px 24px rgba(0,0,0,0.75),
    inset 0 3px 8px rgba(255,255,255,0.3),
    inset 0 -4px 8px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.2s;
  display: flex; align-items: center; justify-content: center;
}

.spin-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.spin-text {
  font-size: 12px;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.3px;
  font-family: 'Noto Sans Georgian', sans-serif;
}

.spin-icon {
  font-size: 17px;
  color: #000;
  line-height: 1;
}

.spin-btn:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.09);
  box-shadow:
    0 10px 30px rgba(245,166,35,0.55),
    inset 0 3px 8px rgba(255,255,255,0.35),
    inset 0 -4px 8px rgba(0,0,0,0.28);
}

.spin-btn:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.02);
}

.spin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── OVERLAY ── */
.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 8, 28, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  animation: fadeIn 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

.overlay.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

@keyframes popIn {
  from { transform: translateY(32px) scale(0.9); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ── POPUP CARD (win / second chance) ── */
.popup-card {
  background: linear-gradient(160deg, #0D1F5C 0%, #060D30 100%);
  border: 1.5px solid rgba(245,166,35,0.6);
  border-radius: 28px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  padding: 48px 36px 40px;
  animation: popIn 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.9),
    0 0 0 1px rgba(245,166,35,0.1),
    0 0 80px rgba(245,166,35,0.08),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.popup-emoji {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 16px;
  display: block;
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}

.popup-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 10px;
  line-height: 1.2;
}

.popup-text {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.65;
  font-weight: 400;
}

/* ── CLAIM CARD ── */
.claim-card {
  max-width: 480px;
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.claim-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 28px 22px;
  background: linear-gradient(135deg, rgba(245,166,35,0.12) 0%, rgba(30,79,191,0.1) 100%);
  border-bottom: 1px solid rgba(245,166,35,0.18);
}

.claim-prize-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 20px rgba(245,166,35,0.3));
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}

.claim-top-text { flex: 1; }

.claim-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.claim-top-text .popup-title {
  font-size: 20px;
  margin-bottom: 6px;
  text-align: left;
}

.claim-top-text .popup-text {
  font-size: 13px;
  margin-bottom: 0;
  text-align: left;
  line-height: 1.5;
}

/* ── FORM ── */
#claimForm {
  padding: 22px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: rgba(245,166,35,0.5);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s;
}

.input-group input {
  width: 100%;
  padding: 13px 14px 13px 40px;
  border-radius: 12px;
  border: 1.5px solid rgba(245,166,35,0.2);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  font-family: 'Noto Sans Georgian', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-group input::placeholder {
  color: rgba(255,255,255,0.2);
}

.input-group input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(245,166,35,0.05);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.12);
}

.input-group input:focus + .input-icon,
.input-group:focus-within .input-icon {
  color: var(--gold);
}

/* Consent */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
}

.consent-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.consent-box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  border: 1.5px solid rgba(245,166,35,0.4);
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  margin-top: 1px;
}

.consent-row input[type="checkbox"]:checked ~ .consent-box {
  background: var(--gold);
  border-color: var(--gold);
}

.consent-row input[type="checkbox"]:checked ~ .consent-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #000;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.consent-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
}

/* ── DELIVERY NOTICE ── */
.delivery-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, rgba(245,166,35,0.1), rgba(245,166,35,0.05));
  border: 1.5px solid rgba(245,166,35,0.35);
  border-radius: 12px;
  padding: 13px 15px;
}

.delivery-notice-icon {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
}

.delivery-notice-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  line-height: 1.5;
}

.delivery-notice-text strong {
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
}

.delivery-notice-text .gel {
  font-size: 16px;
}

.delivery-notice-text span {
  color: var(--muted);
  font-weight: 400;
}

/* ── BUTTONS ── */
.btn {
  border: none;
  border-radius: 14px;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s;
  font-family: 'Noto Sans Georgian', sans-serif;
  line-height: 1;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  background-size: 200% auto;
  color: #000;
  box-shadow: 0 4px 18px rgba(245,166,35,0.35);
  transition: background-position 0.4s ease, transform 0.12s, box-shadow 0.2s;
}

.btn-gold:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245,166,35,0.55);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
  padding: 15px;
  font-size: 15px;
  margin-top: 4px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ── CONFETTI ── */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 199;
}

/* ── RESPONSIVE ── */
@media (max-width: 580px) {
  .logo-img { height: 60px; max-width: 120px; }
  .header-badge { font-size: 11px; padding: 7px 14px; }

  .hero-title { font-size: 30px; }
  .hero-desc  { font-size: 14px; }

  .wheel-glow-ring { width: 92vw; height: 92vw; }

  .wheel-container {
    width: 88vw;
    height: 88vw;
    max-width: 480px;
    max-height: 480px;
  }

  #wheelCanvas {
    width: 100% !important;
    height: 100% !important;
  }

  .spin-btn { width: 90px; height: 90px; }
  .spin-text { font-size: 11px; }
  .spin-icon { font-size: 15px; }

  .popup-card { padding: 36px 24px 32px; border-radius: 22px; }
  .popup-title { font-size: 22px; }
  .popup-emoji { font-size: 56px; }

  .claim-card { max-width: 95vw; }
  .claim-top { padding: 20px 18px 16px; gap: 14px; }
  .claim-prize-img { width: 70px; height: 70px; }
  .claim-top-text .popup-title { font-size: 17px; }
  #claimForm { padding: 18px 18px 22px; }
  .input-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
