/* ==========================================================================
   Roleta VIP — Acesso Exclusivo Telegram
   Tema visual inspirado em aviação/aceleração (Aviator-style), original.
   ========================================================================== */

:root {
  /* Paleta */
  --color-bg: #0a0a0d;
  --color-bg-alt: #12100f;
  --color-graphite: #1d1d21;
  --color-graphite-light: #2a2a30;
  --color-wine: #3a0f16;
  --color-wine-deep: #24080d;
  --color-red: #e02339;
  --color-red-deep: #8a0f1a;
  --color-red-neon: #ff3b52;
  --color-gold: #c9a24b;
  --color-gold-light: #e6c777;
  --color-white: #f4f2ee;
  --color-white-dim: #cfcbc4;

  /* Tipografia */
  --font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-title: clamp(1.7rem, 1.2rem + 3.2vw, 3.1rem);
  --fs-body: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
  --fs-status: clamp(0.85rem, 0.8rem + 0.2vw, 1rem);
  --fs-button: clamp(1rem, 0.95rem + 0.2vw, 1.15rem);

  /* Layout */
  --content-max-width: 1200px;
  --wheel-size: clamp(280px, 82vw, 520px);
  --space-xs: 0.5rem;
  --space-sm: 0.9rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* Movimento */
  --spin-duration: 5.6s;
  --spin-ease: cubic-bezier(0.14, 0.86, 0.18, 1);
  --transition-fast: 180ms ease;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --focus-ring: 0 0 0 3px rgba(201, 162, 75, 0.9), 0 0 0 6px rgba(224, 35, 57, 0.4);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at 50% -10%, var(--color-wine-deep) 0%, var(--color-bg) 55%, #050506 100%);
  color: var(--color-white);
  font-family: var(--font-family);
  font-size: var(--fs-body);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
}

img, svg { display: block; max-width: 100%; }

button {
  font-family: inherit;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; }

/* ---------- Utilitários de acessibilidade ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-red);
  color: var(--color-white);
  padding: 0.6rem 1rem;
  z-index: 200;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

.is-hidden {
  display: none !important;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

/* ==========================================================================
   Fundo decorativo (não interativo)
   ========================================================================== */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
}

.bg-glow--wine {
  width: 60vmax;
  height: 60vmax;
  top: -20vmax;
  left: -15vmax;
  background: radial-gradient(circle, var(--color-wine) 0%, transparent 70%);
}

.bg-glow--red {
  width: 50vmax;
  height: 50vmax;
  bottom: -25vmax;
  right: -15vmax;
  background: radial-gradient(circle, rgba(224, 35, 57, 0.35) 0%, transparent 70%);
  z-index: 2;
}

.bg-photo,
.bg-photo-zoom {
  position: absolute;
  inset: 0;
  background-image: url("assets/background.jpg");
  background-position: 49% 42%;
  background-size: cover;
  background-repeat: no-repeat;
}

.bg-photo {
  opacity: 0.4;
}

.bg-photo-zoom {
  animation: bg-zoom 32s ease-in-out infinite;
}

@keyframes bg-zoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.bg-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 40%, rgba(5, 5, 6, 0.35) 0%, rgba(5, 5, 6, 0.75) 100%);
  z-index: 1;
}

.bg-pulse {
  position: absolute;
  top: 42%;
  left: 49%;
  width: 55vmax;
  height: 55vmax;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 35, 57, 0.16) 0%, transparent 65%);
  animation: bg-pulse-glow 5.5s ease-in-out infinite;
  z-index: 1;
}

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

.stars-layer {
  position: absolute;
  inset: 0;
}

.stars-layer span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--color-white);
  opacity: 0.3;
  animation: star-twinkle 4s ease-in-out infinite;
}

.stars-layer span:nth-child(1) { top: 8%; left: 12%; animation-delay: 0s; }
.stars-layer span:nth-child(2) { top: 14%; left: 78%; animation-delay: 0.4s; }
.stars-layer span:nth-child(3) { top: 22%; left: 34%; animation-delay: 0.8s; }
.stars-layer span:nth-child(4) { top: 6%; left: 55%; animation-delay: 1.2s; }
.stars-layer span:nth-child(5) { top: 30%; left: 88%; animation-delay: 1.6s; }
.stars-layer span:nth-child(6) { top: 18%; left: 5%; animation-delay: 2s; }
.stars-layer span:nth-child(7) { top: 40%; left: 22%; animation-delay: 2.4s; }
.stars-layer span:nth-child(8) { top: 10%; left: 92%; animation-delay: 2.8s; }

@keyframes star-twinkle {
  0%, 100% { opacity: 0.12; transform: scale(0.9); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.particles-layer {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-gold-light);
  opacity: 0;
  animation: particle-float linear forwards;
}

@keyframes particle-float {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-40vh) scale(1); opacity: 0; }
}

/* ==========================================================================
   Layout principal
   ========================================================================== */

.page {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) 0;
}

.main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--space-lg) 0;
}

.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  max-width: 640px;
}

.hero__title {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--color-white);
  text-shadow:
    0 0 30px rgba(224, 35, 57, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.85),
    0 0 18px rgba(0, 0, 0, 0.75);
}

.hero__title::after {
  content: "";
}

.hero__description {
  margin: 0;
  color: var(--color-white-dim);
  font-size: var(--fs-body);
  max-width: 46ch;
}

.spin-status {
  margin-top: var(--space-xs);
}

.spin-status__text {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: rgba(224, 35, 57, 0.12);
  border: 1px solid rgba(224, 35, 57, 0.5);
  color: var(--color-red-neon);
  font-weight: 700;
  font-size: var(--fs-status);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.spin-status__text.is-extra {
  background: rgba(201, 162, 75, 0.14);
  border-color: rgba(201, 162, 75, 0.6);
  color: var(--color-gold-light);
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 2.2rem;
  border: none;
  border-radius: 999px;
  font-size: var(--fs-button);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-deep) 100%);
  color: var(--color-white);
  box-shadow: 0 10px 30px rgba(224, 35, 57, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn--primary:hover {
  box-shadow: 0 12px 36px rgba(224, 35, 57, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--telegram {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  color: #1a1206;
  box-shadow: 0 10px 30px rgba(201, 162, 75, 0.4);
  margin-top: var(--space-xs);
}

.btn--telegram:hover {
  box-shadow: 0 12px 36px rgba(201, 162, 75, 0.55);
}

.btn--ghost {
  background: transparent;
  color: var(--color-white-dim);
  border: 1px solid rgba(244, 242, 238, 0.25);
  margin-top: var(--space-xs);
  font-size: 0.85rem;
  min-height: 40px;
  padding: 0.6rem 1.6rem;
}

.btn--ghost:hover {
  border-color: rgba(244, 242, 238, 0.5);
  color: var(--color-white);
}

/* ==========================================================================
   Roleta
   ========================================================================== */

.hero__wheel-area {
  display: flex;
  justify-content: center;
  width: 100%;
}

.wheel-wrap {
  position: relative;
  width: var(--wheel-size);
  height: var(--wheel-size);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
}

.wheel-wrap:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.wheel-glow {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 35, 57, 0.28) 0%, transparent 70%);
  filter: blur(30px);
  animation: wheel-pulse 3.2s ease-in-out infinite;
}

@keyframes wheel-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.04); }
}

.wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.55));
  transform: rotate(0deg);
  transition: transform var(--spin-duration) var(--spin-ease);
  will-change: transform;
}

.wheel-pointer {
  position: absolute;
  top: -4%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(32px, 8%, 46px);
  height: auto;
  z-index: 5;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.wheel-pointer path {
  fill: var(--color-gold-light);
  stroke: var(--color-red-deep);
  stroke-width: 1.5;
}

.wheel-sector-path {
  stroke: rgba(10, 10, 13, 0.6);
  stroke-width: 2;
}

.wheel-sector-text {
  fill: var(--color-white);
  font-weight: 700;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: rgba(10, 10, 13, 0.55);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.wheel-sector-text--highlight {
  fill: #fff6dd;
}

.wheel-led {
  fill: var(--color-gold-light);
  opacity: 0.85;
}

.wheel-hub-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(27.7% * 0.75);
  height: calc(27.7% * 0.75);
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(224, 35, 57, 0.45));
}

.wheel-led--dim {
  fill: var(--color-red-neon);
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  .wheel {
    transition-duration: 0.6s;
  }
  .wheel-glow,
  .bg-photo-zoom,
  .bg-pulse,
  .stars-layer span {
    animation: none !important;
  }
}

/* ==========================================================================
   Modais
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(5, 5, 6, 0.78);
  backdrop-filter: blur(6px);
  animation: overlay-fade 220ms ease;
}

@keyframes overlay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: linear-gradient(160deg, var(--color-graphite-light) 0%, var(--color-graphite) 60%, var(--color-wine-deep) 100%);
  border: 1px solid rgba(201, 162, 75, 0.4);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  animation: card-pop 320ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
  overflow: hidden;
}

@keyframes card-pop {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-card {
    animation: none !important;
  }
}

.modal-card__title {
  margin: 0;
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  font-weight: 800;
  color: var(--color-white);
}

.modal-card__title--win {
  color: var(--color-gold-light);
  text-shadow: 0 0 24px rgba(201, 162, 75, 0.5);
}

.modal-card__message {
  margin: 0;
  color: var(--color-white-dim);
  font-size: 0.98rem;
}

.modal-card__highlight {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-red-neon);
  background: rgba(224, 35, 57, 0.14);
  border: 1px solid rgba(224, 35, 57, 0.4);
  border-radius: 999px;
  padding: 0.4rem 1.2rem;
}

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

.confetti-piece {
  position: absolute;
  top: -10%;
  width: 7px;
  height: 10px;
  opacity: 0;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(420px) rotate(340deg); opacity: 0; }
}

/* ==========================================================================
   Rodapé
   ========================================================================== */

.site-footer {
  margin-top: var(--space-xl);
  padding: var(--space-md) 0 max(var(--space-md), var(--safe-bottom));
  border-top: 1px solid rgba(244, 242, 238, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: rgba(224, 35, 57, 0.16);
  border: 1px solid rgba(224, 35, 57, 0.55);
  box-shadow: 0 0 16px rgba(224, 35, 57, 0.2);
  margin-bottom: 0.5rem;
}

.footer-badge__age {
  font-weight: 800;
  color: var(--color-red-neon);
  font-size: 1.05rem;
}

.footer-badge__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-white);
  text-transform: uppercase;
}

.footer-text {
  margin: 0;
  max-width: 60ch;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.65;
  color: rgba(230, 227, 222, 0.82);
}

.footer-text:first-of-type {
  font-weight: 700;
  color: var(--color-white);
}

/* ==========================================================================
   Tablet — 768px+
   ========================================================================== */

@media (min-width: 768px) {
  .page {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  .hero__title {
    line-height: 1.08;
  }

  .footer-text {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Desktop — 1024px+
   ========================================================================== */

@media (min-width: 1024px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: var(--space-xl);
  }

  .hero__content {
    align-items: flex-start;
    max-width: 480px;
  }

  .hero__description {
    max-width: 40ch;
  }

  .hero__wheel-area {
    flex: none;
  }

  :root {
    --wheel-size: clamp(400px, 40vw, 520px);
  }
}

@media (min-width: 1440px) {
  .main {
    padding: var(--space-xl) 0;
  }
}
