/* JerkRoulette - Pure CSS 3D Effects + Animations */
:root {
  --gold: #FFD700;
  --gold-bright: #FFE45E;
  --gold-dark: #B8860B;
  --pink: #FF1493;
  --pink-bright: #FF69B4;
  --pink-dark: #C71585;
  --bg-dark: #0a0a0f;
  --bg-darker: #050507;
  --bg-card: #15151f;
  --bg-card-hover: #1f1f2e;
  --text-light: #f5f5f5;
  --text-muted: #a0a0b0;
  --text-dim: #6a6a7a;
  --border-glow: rgba(255, 215, 0, 0.3);
  --pink-glow: rgba(255, 20, 147, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; max-width: 100vw; overflow-x: clip; direction: ltr; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  overflow-x: clip;
  max-width: 100vw;
  line-height: 1.6;
  position: relative;
}

*, *::before, *::after { max-width: 100%; box-sizing: border-box; }
img, svg { max-width: 100%; height: auto; }

section, header, footer, main, nav { overflow-x: clip; max-width: 100vw; position: relative; }

/* ============ 3D PERSPECTIVE STAGE ============ */
.scene-3d { perspective: 1200px; perspective-origin: center; }
.scene-3d-deep { perspective: 2000px; }

/* ============ 3D HERO ============ */
.hero-3d-stage {
  perspective: 1400px;
  perspective-origin: 50% 40%;
}

.hero-3d-inner {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* ============ HERO ROULETTE VISUAL ============ */
.hero-roulette {
  width: 300px;
  height: 300px;
  position: relative;
  transform-style: preserve-3d;
  max-width: 100%;
}

.hero-roulette-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px dashed var(--gold);
  border-right-color: var(--pink);
  border-bottom-color: var(--pink-bright);
  animation: hero-spin 12s linear infinite;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.2), inset 0 0 40px rgba(255, 20, 147, 0.15);
}

/* Orbiting avatars on outer ring */
.orbit-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  animation: hero-spin 12s linear infinite;
  pointer-events: none;
}

.orbit-avatar {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.orbit-avatar--male { box-shadow: 0 0 10px rgba(74, 144, 217, 0.5); }
.orbit-avatar--female { box-shadow: 0 0 10px rgba(233, 30, 140, 0.5); }

.orbit-avatar svg { width: 100%; height: 100%; }

.orbit-1 { animation-duration: 12s; }
.orbit-2 { animation-duration: 14s; animation-direction: reverse; }
.orbit-3 { animation-duration: 16s; }
.orbit-4 { animation-duration: 13s; animation-direction: reverse; }
.orbit-5 { animation-duration: 15s; }
.orbit-6 { animation-duration: 17s; animation-direction: reverse; }

.orbit-1 .orbit-avatar { top: -14px; left: 50%; margin-left: -14px; }
.orbit-2 .orbit-avatar { top: 50%; right: -14px; margin-top: -14px; }
.orbit-3 .orbit-avatar { bottom: -14px; left: 50%; margin-left: -14px; }
.orbit-4 .orbit-avatar { top: 50%; left: -14px; margin-top: -14px; }
.orbit-5 .orbit-avatar { top: 10%; right: 10%; }
.orbit-6 .orbit-avatar { bottom: 10%; left: 10%; }

.hero-roulette-inner {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  border: 2px solid var(--border-glow);
  animation: hero-spin-rev 18s linear infinite;
  background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.08), transparent 70%);
  overflow: hidden;
}

/* Tiny avatar cloud inside inner ring */
.tiny-avatar-cloud {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.tiny-avatar {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.7;
  animation: tiny-float 4s ease-in-out infinite;
}

.tiny-avatar--male { background: radial-gradient(circle, #4a90d9, #1a2a4a); }
.tiny-avatar--female { background: radial-gradient(circle, #e91e8c, #2a1a2a); }

@keyframes tiny-float {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-3px); opacity: 0.9; }
}

.hero-roulette-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-darker));
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.hero-roulette-label {
  position: absolute;
  font-weight: 800;
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.hero-roulette-label-1 { top: -8px; left: 50%; transform: translateX(-50%); background: rgba(255, 20, 147, 0.2); color: var(--pink-bright); border: 1px solid var(--pink); }
.hero-roulette-label-2 { right: -8px; top: 50%; transform: translateY(-50%); background: rgba(255, 215, 0, 0.2); color: var(--gold); border: 1px solid var(--gold); }
.hero-roulette-label-3 { bottom: -8px; left: 50%; transform: translateX(-50%); background: rgba(255, 20, 147, 0.2); color: var(--pink-bright); border: 1px solid var(--pink); }
.hero-roulette-label-4 { left: -8px; top: 50%; transform: translateY(-50%); background: rgba(255, 215, 0, 0.2); color: var(--gold); border: 1px solid var(--gold); }

@keyframes hero-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes hero-spin-rev { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

@media (max-width: 640px) {
  .hero-roulette { width: 240px; height: 240px; }
  .orbit-wrap { width: 240px; height: 240px; margin: -120px 0 0 -120px; }
  .orbit-avatar { width: 22px; height: 22px; }
  .hero-roulette-inner { inset: 24px; }
  .hero-roulette-hub { width: 64px; height: 64px; }
  .hero-roulette-label { font-size: 12px; padding: 3px 8px; }
  .tiny-avatar { width: 8px; height: 8px; }
}

/* ============ 3D CARDS ============ */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
  will-change: transform;
}

.card-3d:hover {
  transform: translateY(-8px) translateZ(30px) rotateX(5deg);
  box-shadow: 0 30px 60px -15px rgba(255, 20, 147, 0.25), 0 0 40px rgba(255, 215, 0, 0.1);
}

.card-3d-content { transform: translateZ(20px); }

.card-3d-icon { transform: translateZ(40px); }

.card-3d-glow {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--pink-glow), transparent 60%, var(--border-glow));
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card-3d:hover .card-3d-glow { opacity: 0.15; }

/* ============ 3D BUTTONS ============ */
.btn-3d {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, box-shadow 0.2s;
  will-change: transform;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
}

@media (max-width: 480px) {
  .btn-3d { font-size: 14px !important; padding-left: 1rem !important; padding-right: 1rem !important; }
}

@media (max-width: 360px) {
  .btn-3d { font-size: 12px !important; }
}

.btn-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform: translateZ(-12px);
  background: rgba(0,0,0,0.4);
}

.btn-3d:hover {
  transform: translateY(-3px) translateZ(15px);
}

.btn-3d:active {
  transform: translateY(1px) translateZ(5px);
}

.btn-gold-3d {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a1a;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3), 0 0 0 1px rgba(255, 215, 0, 0.5);
}

.btn-gold-3d:hover {
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5), 0 0 0 1px rgba(255, 215, 0, 0.8);
}

.btn-pink-3d {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: #fff;
  box-shadow: 0 8px 25px rgba(255, 20, 147, 0.3), 0 0 0 1px rgba(255, 20, 147, 0.5);
}

.btn-pink-3d:hover {
  box-shadow: 0 15px 40px rgba(255, 20, 147, 0.5), 0 0 0 1px rgba(255, 20, 147, 0.8);
}

/* ============ FLOATING BADGE ============ */
.float-badge {
  animation: float-badge 4s ease-in-out infinite;
  transform-style: preserve-3d;
  will-change: transform;
}

@keyframes float-badge {
  0%, 100% { transform: translateY(0) translateZ(40px) rotateY(-5deg); }
  50% { transform: translateY(-12px) translateZ(50px) rotateY(5deg); }
}

/* ============ FLOATING CARDS ============ */
.float-card {
  animation: float-card 6s ease-in-out infinite;
  will-change: transform;
}

.float-card:nth-child(2) { animation-delay: -2s; }
.float-card:nth-child(3) { animation-delay: -4s; }

@keyframes float-card {
  0%, 100% { transform: translateY(0) translateZ(20px); }
  50% { transform: translateY(-15px) translateZ(35px); }
}

/* ============ TILT ELEMENTS ============ */
.tilt { transform-style: preserve-3d; transition: transform 0.2s ease-out; will-change: transform; }

/* ============ GLOW TEXT ============ */
.glow-gold {
  color: var(--gold);
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.glow-pink {
  color: var(--pink-bright);
  text-shadow: 0 0 30px rgba(255, 20, 147, 0.4);
}

/* ============ GRADIENT TEXT ============ */
.gradient-text {
  background: linear-gradient(135deg, var(--gold-bright), var(--pink-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ PULSE CTA ============ */
.pulse-cta { animation: pulse-cta 2s ease-in-out infinite; }

@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 8px 25px rgba(255, 20, 147, 0.3), 0 0 0 0 rgba(255, 20, 147, 0.4); }
  50% { box-shadow: 0 8px 25px rgba(255, 20, 147, 0.3), 0 0 0 20px rgba(255, 20, 147, 0); }
}

/* ============ LIVE DOT ============ */
.live-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  animation: live-pulse 1.5s ease-in-out infinite;
  display: inline-block;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ FAQ ============ */
.faq-item { transition: all 0.3s ease; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.faq-item.open .faq-answer { max-height: 600px; padding-top: 1rem; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-icon { transition: transform 0.3s ease; }

/* ============ STICKY MOBILE CTA ============ */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.sticky-cta.show { transform: translateY(0); }

/* ============ 3D STEP NUMBER ============ */
.step-3d {
  transform-style: preserve-3d;
  transform: rotateY(15deg) rotateX(10deg);
  transition: transform 0.3s ease;
}

.step-3d:hover { transform: rotateY(0deg) rotateX(0deg) translateZ(20px); }

/* ============ COMPARISON TABLE ============ */
.compare-row { transition: background 0.2s; }
.compare-row:hover { background: rgba(255, 215, 0, 0.05); }

/* ============ BACKGROUND GLOW ============ */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  max-width: 400px;
  max-height: 400px;
}

/* ============ MARQUEE ============ */
.marquee {
  display: flex;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ 18+ BADGE ============ */
.badge-18 {
  background: linear-gradient(135deg, var(--pink-dark), #8B0000);
  border: 2px solid var(--gold);
  font-weight: 900;
}

/* ============ MOBILE 3D REDUCTION ============ */
@media (max-width: 768px) {
  .hero-3d-inner { transform: none !important; }
  .card-3d:hover { transform: translateY(-4px); }
  .float-badge { animation-duration: 6s; }
  .float-card { animation: none; transform: translateZ(10px); }
  .step-3d { transform: none; }
  .scene-3d { perspective: 800px; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .hero-roulette-ring, .hero-roulette-inner, .float-badge, .float-card, .pulse-cta, .marquee, .live-dot {
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============ UTILITIES ============ */
.text-shadow-lg { text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
