/* ClaimPrize.site - Main Stylesheet */
:root {
  --cp-primary: #6C35DE;
  --cp-secondary: #FF6B6B;
  --cp-accent: #FFD700;
  --cp-dark: #0D0D1A;
  --cp-card-bg: #1A1A2E;
  --cp-card-border: rgba(255,255,255,0.08);
  --cp-gradient: linear-gradient(135deg, #6C35DE 0%, #FF6B6B 100%);
  --cp-gradient-gold: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
}

* { box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cp-dark);
  color: #e0e0e0;
  min-height: 100vh;
}

/* Dark mode always-on for public site */
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.fw-900 { font-weight: 900 !important; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
#mainNav {
  background: rgba(13,13,26,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cp-card-border);
}
.navbar-brand { font-size: 1.5rem; letter-spacing: -0.5px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero-section {
  background: radial-gradient(ellipse at 50% 0%, rgba(108,53,222,0.4) 0%, transparent 70%),
              var(--cp-dark);
  padding: 80px 0 60px;
  text-align: center;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  background: var(--cp-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.hero-sub { font-size: 1.2rem; color: #a0a0c0; max-width: 560px; margin: 0 auto; }
.text-gradient {
  background: var(--cp-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Stats bar ──────────────────────────────────────────────────────────── */
.stats-bar { background: var(--cp-card-bg); border-top: 1px solid var(--cp-card-border); border-bottom: 1px solid var(--cp-card-border); }
.stat-item { text-align: center; padding: 16px; }
.stat-num { font-size: 1.8rem; font-weight: 900; color: var(--cp-accent); }
.stat-label { font-size: 0.75rem; color: #6b6b8a; text-transform: uppercase; letter-spacing: 1px; }

/* ── Game Cards ─────────────────────────────────────────────────────────── */
.section-title {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-sub { text-align: center; color: #6b6b8a; margin-bottom: 2.5rem; }

.game-card {
  background: var(--cp-card-bg);
  border: 1px solid var(--cp-card-border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  cursor: pointer;
}
.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(108,53,222,0.4);
  border-color: var(--cp-primary);
}
.game-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}
.game-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.15;
}
.game-thumb.spin-bg    { background: linear-gradient(135deg, #FF6B6B, #FF8E53); }
.game-thumb.scratch-bg { background: linear-gradient(135deg, #4ECDC4, #44B9C5); }
.game-thumb.gift-bg    { background: linear-gradient(135deg, #A8E6CF, #3CB371); }
.game-thumb.lucky-bg   { background: linear-gradient(135deg, #FFD700, #FFA500); }
.game-thumb.treasure-bg{ background: linear-gradient(135deg, #C9A52C, #8B6914); }
.game-thumb.daily-bg   { background: linear-gradient(135deg, #6C35DE, #9B59B6); }

.game-card-body { padding: 1.5rem; }
.game-card-title { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 0.5rem; }
.game-card-desc { font-size: 0.85rem; color: #8080a0; margin-bottom: 1rem; }

.btn-play {
  background: var(--cp-gradient);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 50px;
  padding: 10px 28px;
  transition: opacity 0.2s, transform 0.2s;
  width: 100%;
}
.btn-play:hover { opacity: 0.9; transform: scale(1.03); color: #fff; }

.badge-new {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--cp-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
}

/* ── Game Pages ─────────────────────────────────────────────────────────── */
.game-page { padding: 60px 0; min-height: calc(100vh - 140px); }
.game-container {
  background: var(--cp-card-bg);
  border: 1px solid var(--cp-card-border);
  border-radius: 24px;
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
}
.game-title { font-size: 2rem; font-weight: 900; color: #fff; text-align: center; }
.game-subtitle { text-align: center; color: #8080a0; margin-bottom: 2rem; }

/* ── Spin Wheel ─────────────────────────────────────────────────────────── */
#spinCanvas { display: block; margin: 0 auto; }
.spin-btn-wrap { text-align: center; margin-top: 1.5rem; }
.btn-spin {
  background: var(--cp-gradient-gold);
  color: #1a1a0d;
  font-weight: 900;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  padding: 14px 48px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-spin:hover { transform: scale(1.05); box-shadow: 0 8px 30px rgba(255,215,0,0.4); }
.spin-arrow {
  width: 0; height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 30px solid var(--cp-accent);
  margin: 0 auto;
  filter: drop-shadow(0 4px 8px rgba(255,215,0,0.5));
}

/* ── Scratch Card ───────────────────────────────────────────────────────── */
.scratch-wrap {
  position: relative;
  width: 320px;
  height: 200px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  cursor: crosshair;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.scratch-prize-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(135deg, #1A1A2E, #2D2D4E);
  z-index: 1;
}
#scratchCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  touch-action: none;
}
.scratch-hint { text-align: center; color: #8080a0; font-size: 0.9rem; margin-top: 1rem; }

/* ── Gift Boxes ─────────────────────────────────────────────────────────── */
.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 500px; margin: 0 auto; }
.gift-box-item {
  aspect-ratio: 1;
  background: var(--cp-card-bg);
  border: 2px solid var(--cp-card-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.gift-box-item:hover { border-color: var(--cp-primary); transform: scale(1.05); background: rgba(108,53,222,0.1); }
.gift-box-item.selected { border-color: var(--cp-accent); animation: giftOpen 0.5s ease; }
.gift-box-item.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
@keyframes giftOpen { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }

/* ── Lucky Number ───────────────────────────────────────────────────────── */
.number-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; max-width: 360px; margin: 0 auto; }
.number-btn {
  aspect-ratio: 1;
  background: var(--cp-card-bg);
  border: 2px solid var(--cp-card-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
}
.number-btn:hover { border-color: var(--cp-primary); background: rgba(108,53,222,0.2); transform: scale(1.1); }
.number-btn.active { background: var(--cp-gradient); border-color: transparent; color: #fff; animation: pulse 0.5s; }
@keyframes pulse { 0%{transform:scale(1)} 50%{transform:scale(1.3)} 100%{transform:scale(1)} }

/* ── Treasure Chest ─────────────────────────────────────────────────────── */
.chest-container { text-align: center; }
.chest-emoji { font-size: 8rem; cursor: pointer; transition: transform 0.3s; display: inline-block; }
.chest-emoji:hover { transform: scale(1.1) rotate(-5deg); }
.chest-emoji.opening { animation: chestOpen 0.8s ease; }
@keyframes chestOpen {
  0%   { transform: scale(1) rotate(0deg); }
  25%  { transform: scale(1.2) rotate(-10deg); }
  50%  { transform: scale(1.3) rotate(10deg); }
  75%  { transform: scale(1.1) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ── Daily Reward ───────────────────────────────────────────────────────── */
.daily-container { text-align: center; }
.daily-icon { font-size: 5rem; margin-bottom: 1rem; }
.countdown-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 6px solid var(--cp-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900; color: var(--cp-accent);
  margin: 0 auto 1.5rem;
  position: relative;
}

/* ── Prize Modal ────────────────────────────────────────────────────────── */
.prize-modal {
  background: var(--cp-card-bg);
  border: 1px solid var(--cp-card-border);
  border-radius: 24px;
  overflow: hidden;
}
.confetti-burst {
  font-size: 2rem;
  animation: confettiFall 0.8s ease;
  letter-spacing: 4px;
}
@keyframes confettiFall { from{opacity:0;transform:translateY(-20px)} to{opacity:1;transform:translateY(0)} }

.btn-claim {
  background: var(--cp-gradient-gold);
  color: #1a1a0d;
  font-weight: 900;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-claim:hover { transform: scale(1.03); box-shadow: 0 8px 30px rgba(255,215,0,0.5); color: #1a1a0d; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer-main {
  background: #0a0a14;
  border-top: 1px solid var(--cp-card-border);
}
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #6b6b8a; text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--cp-accent); }

/* ── Loading Overlay ─────────────────────────────────────────────────────── */
#loadingOverlay {
  position: fixed; inset: 0;
  background: rgba(13,13,26,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  backdrop-filter: blur(4px);
}
.loading-spinner { text-align: center; }

/* ── Interstitial / Redirect Page ───────────────────────────────────────── */
.interstitial-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(108,53,222,0.2) 0%, var(--cp-dark) 70%);
}
.interstitial-card {
  background: var(--cp-card-bg);
  border: 1px solid var(--cp-card-border);
  border-radius: 24px;
  padding: 48px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}
.countdown-circle {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--cp-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 900; color: #fff;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 40px rgba(108,53,222,0.5);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
  .hero-section { padding: 50px 0 40px; }
  .game-container { padding: 24px 16px; border-radius: 16px; }
  .gift-grid { grid-template-columns: repeat(2, 1fr); }
  .number-grid { grid-template-columns: repeat(5, 1fr); }
  .scratch-wrap { width: 280px; height: 170px; }
}
