/* ============================================
   M89 Spin & Win — Premium Dark Green & Gold
   ============================================ */

:root {
  --green-deepest: #040f07;
  --green-deep:    #071a0b;
  --green-dark:    #0b2410;
  --green-mid:     #0e3016;
  --green-accent:  #1a5c28;
  --green-bright:  #2a8c3f;

  --gold-pale:     #f5e6b8;
  --gold-light:    #e8c96a;
  --gold-main:     #c9a227;
  --gold-deep:     #a07818;
  --gold-dark:     #7a5a10;
  --gold-shimmer:  #fdf0b0;

  --cream:         #f2e8d5;
  --white:         #ffffff;

  --font-display:  'Cinzel', serif;
  --font-serif:    'Cormorant Garamond', serif;
  --font-sans:     'Montserrat', sans-serif;

  --transition:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: #020b04;
  color: var(--cream);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Premium Multi-layer Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 55% at 50% -5%, #0f3d1a 0%, transparent 65%),
    radial-gradient(ellipse 40% 70% at -5% 50%, #092914 0%, transparent 55%),
    radial-gradient(ellipse 40% 70% at 105% 50%, #092914 0%, transparent 55%),
    radial-gradient(ellipse 80% 40% at 50% 110%, #0a2c12 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 50% 50%, #071e0d 0%, transparent 70%),
    #020b04;
  pointer-events: none;
  z-index: 0;
}

/* ── Diagonal gold grid lines ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 60px,
      rgba(201,162,39,0.025) 60px,
      rgba(201,162,39,0.025) 61px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 60px,
      rgba(201,162,39,0.018) 60px,
      rgba(201,162,39,0.018) 61px
    );
  pointer-events: none;
  z-index: 0;
}

.shimmer-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 40%,
    rgba(201,162,39,0.03) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 300% 300%;
  animation: bg-sweep 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes bg-sweep {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Particles ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--gold-main);
  opacity: 0;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* ── Page Wrapper ── */
.page-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 60px);
  padding: 1.5rem 1rem 2rem;
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: linear-gradient(180deg, rgba(2,11,4,0.97) 0%, rgba(4,18,7,0.93) 100%);
  border-bottom: 1px solid rgba(201,162,39,0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 30px rgba(0,0,0,0.5), 0 1px 0 rgba(201,162,39,0.1);
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.55rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  width: clamp(70px, 16vw, 110px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(201,162,39,0.3));
  transition: filter 0.3s ease;
}

.nav-logo-img:hover {
  filter: drop-shadow(0 0 18px rgba(201,162,39,0.6));
}

.navbar-right {
  display: flex;
  align-items: center;
}

.nav-tag {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  color: var(--gold-main);
  opacity: 0.8;
  text-transform: uppercase;
}

/* .header-tagline removed */

/* ── Hero ── */
.hero-section {
  text-align: center;
  padding: 0.8rem 0 0.5rem;
  max-width: 600px;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--gold-main);
  margin-bottom: 0.8rem;
  animation: pulse-gold 3s ease-in-out infinite;
}

@keyframes pulse-gold {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--gold-shimmer) 0%, var(--gold-main) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hero-title em {
  font-style: normal;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-shimmer) 0%, var(--gold-main) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 480px) {
  .hero-title { white-space: normal; font-size: clamp(1.3rem, 5vw, 1.8rem); }
}

/* .hero-title em now defined within .hero-title block */

/* .hero-sub removed */

/* ── Wheel Section ── */
.wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0 2rem;
  width: 100%;
}

.wheel-outer-ring {
  position: relative;
  width: clamp(280px, 80vw, 420px);
  height: clamp(280px, 80vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(201,162,39,0.15) 0%,
    rgba(201,162,39,0.05) 50%,
    transparent 75%
  );
  animation: glow-pulse 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

/* Decorative tick/arrow at top */
.wheel-outer-ring::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 32px solid var(--gold-main);
  z-index: 30;
  filter: drop-shadow(0 0 6px var(--gold-main));
}

#wheel {
  position: relative;
  z-index: 20;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px var(--gold-dark),
    0 0 0 7px rgba(201,162,39,0.2),
    0 20px 60px rgba(0,0,0,0.7),
    0 0 80px rgba(201,162,39,0.1);
}

.wheel-center-cap {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, #0e2e14 0%, #020b04 100%);
  border: 3px solid var(--gold-main);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--gold-dark),
    0 4px 15px rgba(0,0,0,0.8),
    inset 0 1px 3px rgba(201,162,39,0.3);
}

.cap-logo {
  width: 58px;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ── Spin Button ── */
.spin-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.spin-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold-main) 45%, var(--gold-light) 55%, var(--gold-deep) 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  width: clamp(200px, 50vw, 260px);
  height: 58px;
  transition: all 0.3s var(--transition);
  box-shadow:
    0 6px 30px rgba(201,162,39,0.35),
    0 2px 8px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.spin-btn:hover:not(:disabled) {
  background-position: right center;
  box-shadow:
    0 10px 40px rgba(201,162,39,0.55),
    0 4px 12px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.spin-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(201,162,39,0.3);
}

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

.spin-btn-inner {
  position: relative;
  z-index: 2;
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--green-deepest);
}

.spin-btn-shimmer {
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.35) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: shimmer-sweep 2.5s ease-in-out infinite;
  z-index: 3;
}

@keyframes shimmer-sweep {
  0%   { left: -100%; }
  60%  { left: 150%;  }
  100% { left: 150%;  }
}

/* .spin-note removed */

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  padding: 1.5rem 0 0.5rem;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--gold-pale);
  opacity: 0.3;
}

/* ── Popup Overlay ── */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 15, 7, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.popup-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.popup-card {
  position: relative;
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green-deepest) 100%);
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: 6px;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 5vw, 3rem);
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(201,162,39,0.1),
    inset 0 1px 0 rgba(201,162,39,0.15);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.4s var(--transition), opacity 0.4s ease;
  overflow: hidden;
}

.popup-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-main), transparent);
}

.popup-overlay.visible .popup-card {
  transform: scale(1) translateY(0);
}

.popup-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  border-radius: 1px;
  animation: confetti-fall linear forwards;
  opacity: 0;
}

@keyframes confetti-fall {
  0%   { transform: translateY(-30px) rotate(0deg) scale(1); opacity: 1; }
  80%  { opacity: 0.8; }
  100% { transform: translateY(500px) rotate(900deg) scale(0.5); opacity: 0; }
}

/* ── Full-page celebration confetti ── */
.page-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  overflow: hidden;
}

.page-confetti-piece {
  position: absolute;
  border-radius: 2px;
  animation: page-confetti-fall linear forwards;
  opacity: 0;
}

@keyframes page-confetti-fall {
  0%   { transform: translateY(-40px) rotate(0deg) scaleX(1); opacity: 1; }
  10%  { opacity: 1; }
  85%  { opacity: 0.7; }
  100% { transform: translateY(105vh) rotate(1080deg) scaleX(-1); opacity: 0; }
}

.popup-icon {
  font-size: 3rem;
  margin-bottom: 0.8rem;
  animation: icon-bounce 0.6s var(--transition) 0.3s both;
}

@keyframes icon-bounce {
  0%  { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100%{ transform: scale(1);  opacity: 1; }
}

.popup-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--gold-shimmer), var(--gold-main));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.popup-message {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--cream);
  opacity: 0.7;
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.popup-prize {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 8vw, 2.8rem);
  font-weight: 700;
  background: linear-gradient(160deg, var(--gold-shimmer) 0%, var(--gold-main) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px rgba(201,162,39,0.5));
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
  animation: prize-glow 1.5s ease-in-out infinite;
}

@keyframes prize-glow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(201,162,39,0.4)); }
  50%       { filter: drop-shadow(0 0 25px rgba(201,162,39,0.8)); }
}

.popup-sub {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--gold-pale);
  opacity: 0.6;
  margin-bottom: 1.6rem;
}

.popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  border-radius: 3px;
  transition: all 0.3s var(--transition);
  box-shadow:
    0 6px 20px rgba(37, 211, 102, 0.35),
    0 2px 6px rgba(0,0,0,0.3);
  width: 100%;
}

.popup-cta:hover {
  background: #20bc5b;
  transform: translateY(-2px);
  box-shadow:
    0 10px 30px rgba(37, 211, 102, 0.5),
    0 4px 10px rgba(0,0,0,0.3);
}

.wa-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}


/* ── Popup Countdown Timer ── */
.popup-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(200, 10, 10, 0.18);
  border: 2px solid #e01010;
  border-radius: 4px;
  padding: 0.55rem 1rem;
  margin-bottom: 1.2rem;
  animation: timer-pulse 0.85s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(220,10,10,0.35), inset 0 0 10px rgba(200,0,0,0.1);
}

@keyframes timer-pulse {
  0%, 100% {
    border-color: #cc0000;
    box-shadow: 0 0 8px rgba(200,0,0,0.3), inset 0 0 8px rgba(180,0,0,0.08);
  }
  50% {
    border-color: #ff1a1a;
    box-shadow: 0 0 22px rgba(255,20,20,0.6), inset 0 0 14px rgba(220,0,0,0.15);
  }
}

.timer-icon {
  font-size: 0.95rem;
}

.timer-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ff3333;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(255,50,50,0.4);
}

.timer-count {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ff1a1a;
  letter-spacing: 0.05em;
  min-width: 3rem;
  text-align: center;
  text-shadow: 0 0 14px rgba(255,20,20,0.75), 0 0 4px rgba(255,0,0,0.5);
}

/* ── Live Winners Marquee ── */
.marquee-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  background: linear-gradient(90deg, rgba(10,30,12,0.95) 0%, rgba(14,42,18,0.9) 50%, rgba(10,30,12,0.95) 100%);
  border-top: 1px solid rgba(201,162,39,0.25);
  border-bottom: 1px solid rgba(201,162,39,0.25);
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

.marquee-label {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold-main);
  background: linear-gradient(90deg, #0a1e0c, #0e2a12);
  border-right: 1px solid rgba(201,162,39,0.3);
  padding: 0.65rem 0.9rem;
  white-space: nowrap;
  z-index: 2;
}

.marquee-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  padding: 0.65rem 0;
}

.marquee-track::before,
.marquee-track::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}
.marquee-track::before {
  left: 0;
  background: linear-gradient(90deg, rgba(10,30,12,1), transparent);
}
.marquee-track::after {
  right: 0;
  background: linear-gradient(270deg, rgba(10,30,12,1), transparent);
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  white-space: nowrap;
  animation: marquee-scroll 22s linear infinite;
}

.marquee-content span {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--gold-pale);
}

.marquee-content span:not(.marquee-dot) {
  color: var(--cream);
  opacity: 0.85;
}

.marquee-dot {
  color: var(--gold-main) !important;
  opacity: 0.6 !important;
  font-size: 0.5rem !important;
}

.marquee-highlight {
  color: var(--gold-light) !important;
  text-shadow: 0 0 8px rgba(201,162,39,0.6);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .site-header { padding: 2rem 0 0.5rem; }
  .hero-section { padding: 1rem 0 0.3rem; }
  .wheel-section { gap: 1.5rem; }
  .popup-card { padding: 2rem 1.2rem; }
}

@media (min-width: 768px) {
  .page-wrapper { padding: 0 2rem 3rem; }
}
