@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;700;800;900&family=DM+Sans:wght@400;500;700;800&display=swap');

:root {
  --bg-dark: #0C0C14;
  --gold: #FFD700;
  --gold-glow: rgba(255, 215, 0, 0.3);
  --rose: #FF4081;
  --heart-pink: #FF6B9D;
  --text-white: #FFFFFF;
  --text-muted: #7A7A9A;
  --font-head: 'Jost', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg-dark); font-family: var(--font-body); color: var(--text-white); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; font-family: inherit; cursor: pointer; outline: none; color: inherit; }

/* ═══════════════════════════════════
   1. SPLASH — Grid + Hearts
   ═══════════════════════════════════ */
.v22-splash {
  min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 50% 20%, #1A1A30 0%, var(--bg-dark) 70%);
  padding: 50px 24px 50px; text-align: center;
}

.v22-splash-header { margin-bottom: 30px; }
.v22-splash-hearts { font-size: 36px; margin-bottom: 12px; }
.v22-h1 { font-family: var(--font-head); font-size: 44px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.v22-h1 span { color: var(--gold); }
.v22-splash-sub { font-size: 15px; color: var(--text-muted); margin-top: 10px; }

/* Demo Grid — 4x3 static "win moment" — SAME SIZE as game */
.v22-demo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; max-width: 500px; width: 100%; margin: 0 auto 16px;
}

.v22-demo-cell {
  aspect-ratio: 1; border-radius: 50%; position: relative; overflow: hidden;
}

/* Closed cell — colored cover */
.v22-demo-cover {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-size: 28px; position: relative;
}
.v22-demo-cover::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.1) 3px, rgba(255,255,255,0.1) 6px);
}

.v22-demo-cell:nth-child(12n+1)  .v22-demo-cover { background: #FFD700; }
.v22-demo-cell:nth-child(12n+3)  .v22-demo-cover { background: #FF69B4; }
.v22-demo-cell:nth-child(12n+5)  .v22-demo-cover { background: #A78BFA; }
.v22-demo-cell:nth-child(12n+7)  .v22-demo-cover { background: #00E676; }
.v22-demo-cell:nth-child(12n+8)  .v22-demo-cover { background: #FF8C42; }
.v22-demo-cell:nth-child(12n+10) .v22-demo-cover { background: #64B5F6; }
.v22-demo-cell:nth-child(12n+12) .v22-demo-cover { background: #BA68C8; }

/* Open cell — photo */
.v22-demo-photo {
  width: 100%; height: 100%; border-radius: 50%;
  background-size: cover; background-position: center;
  border: 3px solid rgba(255,255,255,0.15);
}

/* MATCHED cell — thick pink border + glow + PULSE */
.v22-demo-matched .v22-demo-photo {
  border: 5px solid #FF4081;
  box-shadow: 0 0 20px #FF4081, 0 0 40px rgba(255,64,129,0.3);
  animation: v22-demo-pulse 1.5s ease-in-out infinite;
}
@keyframes v22-demo-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 15px #FF4081, 0 0 30px rgba(255,64,129,0.2); }
  50%      { transform: scale(1.08); box-shadow: 0 0 30px #FF4081, 0 0 60px rgba(255,64,129,0.5); }
}

/* Hint text */
.v22-demo-hint {
  font-family: var(--font-head); font-size: 16px;
  color: #FF4081; font-weight: 700;
  margin-bottom: 28px;
}

.v22-btn-start {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: #000; padding: 18px 40px;
  border-radius: 100px; font-family: var(--font-head);
  font-size: 18px; font-weight: 800;
  box-shadow: 0 10px 30px var(--gold-glow); transition: 0.2s;
}
.v22-btn-start:hover { transform: scale(1.03); }

/* ═══════════════════════════════════
   2. GENDER PICKER
   ═══════════════════════════════════ */
.v22-picker-section {
  padding: 60px 24px; text-align: center;
  max-width: 500px; margin: 0 auto;
}
.v22-picker-h2 { font-family: var(--font-head); font-size: 28px; font-weight: 800; margin-bottom: 30px; }
.v22-picker-row { display: flex; gap: 16px; justify-content: center; margin-bottom: 20px; }
.v22-picker-lbl { font-size: 14px; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }

.v22-gender-btn {
  flex: 1; padding: 20px; border-radius: 20px;
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.08);
  font-family: var(--font-head); font-size: 16px; font-weight: 800;
  transition: 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.v22-gender-btn span { font-size: 32px; }
.v22-gender-btn.active { border-color: var(--gold); background: rgba(255,215,0,0.08); color: var(--gold); }

.v22-btn-play {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: #000; padding: 18px 40px;
  border-radius: 100px; font-family: var(--font-head);
  font-size: 18px; font-weight: 800;
  box-shadow: 0 10px 30px var(--gold-glow); transition: 0.2s;
  margin-top: 20px;
}
.v22-btn-play:hover { transform: scale(1.03); }
.v22-btn-play:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ═══════════════════════════════════
   3. SCRATCH GRID
   ═══════════════════════════════════ */
.v22-game-section {
  padding: 40px 20px 60px; max-width: 500px; margin: 0 auto; text-align: center;
}
.v22-game-h2 { font-family: var(--font-head); font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.v22-game-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.v22-game-progress { font-size: 14px; color: var(--gold); font-weight: 700; margin-bottom: 20px; }

.v22-scratch-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 30px;
}

.v22-cell {
  position: relative; aspect-ratio: 1; border-radius: 50%;
  overflow: hidden; cursor: pointer; transition: transform 0.2s;
  perspective: 600px;
}
.v22-cell:hover:not(.revealed) { transform: scale(1.08); }

.v22-cell-inner {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d; transition: transform 0.6s ease;
}
.v22-cell.revealed .v22-cell-inner { transform: rotateY(180deg); }

/* Front — colored cover */
.v22-cell-front {
  position: absolute; inset: 0; border-radius: 50%;
  backface-visibility: hidden;
  display: flex; justify-content: center; align-items: center;
  font-size: 28px;
}
.v22-cell-front::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.1) 3px, rgba(255,255,255,0.1) 6px);
}

.v22-cell:nth-child(12n+1)  .v22-cell-front { background: #FFD700; }
.v22-cell:nth-child(12n+2)  .v22-cell-front { background: #A78BFA; }
.v22-cell:nth-child(12n+3)  .v22-cell-front { background: #FF69B4; }
.v22-cell:nth-child(12n+4)  .v22-cell-front { background: #00E676; }
.v22-cell:nth-child(12n+5)  .v22-cell-front { background: #FF8C42; }
.v22-cell:nth-child(12n+6)  .v22-cell-front { background: #64B5F6; }
.v22-cell:nth-child(12n+7)  .v22-cell-front { background: #E0E0E0; }
.v22-cell:nth-child(12n+8)  .v22-cell-front { background: #4DD0E1; }
.v22-cell:nth-child(12n+9)  .v22-cell-front { background: #EF5350; }
.v22-cell:nth-child(12n+10) .v22-cell-front { background: #81C784; }
.v22-cell:nth-child(12n+11) .v22-cell-front { background: #FFB74D; }
.v22-cell:nth-child(12n+12) .v22-cell-front { background: #BA68C8; }

/* Back — photo */
.v22-cell-back {
  position: absolute; inset: 0; border-radius: 50%;
  background-size: cover; background-position: center;
  backface-visibility: hidden; transform: rotateY(180deg);
  border: 3px solid rgba(255,255,255,0.15);
}

/* Matched glow */
.v22-cell.matched .v22-cell-back {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold), 0 0 40px var(--gold-glow);
  animation: v22-glow 1s ease-in-out infinite alternate;
}
@keyframes v22-glow {
  0% { box-shadow: 0 0 15px var(--gold); }
  100% { box-shadow: 0 0 30px var(--gold), 0 0 60px var(--gold-glow); }
}

/* ═══════════════════════════════════
   4. WINNER MODAL
   ═══════════════════════════════════ */
.v22-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px 24px; text-align: center;
  opacity: 0; pointer-events: none; transition: 0.4s;
}
.v22-modal-overlay.active { opacity: 1; pointer-events: auto; }

.v22-confetti { font-size: 48px; margin-bottom: 16px; animation: v22-bounce 1s ease-in-out infinite; }
@keyframes v22-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.v22-modal-h2 { font-family: var(--font-head); font-size: 36px; font-weight: 900; color: var(--gold); margin-bottom: 8px; }
.v22-modal-sub { font-size: 16px; color: var(--text-muted); margin-bottom: 30px; }

.v22-modal-photo {
  width: 200px; height: 200px; border-radius: 50%;
  background-size: cover; background-position: center;
  border: 5px solid var(--gold); margin-bottom: 16px;
  box-shadow: 0 0 40px var(--gold-glow);
}
.v22-modal-name { font-family: var(--font-head); font-size: 24px; font-weight: 800; margin-bottom: 30px; }

.v22-btn-chat {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: #000; padding: 18px 40px;
  border-radius: 100px; font-family: var(--font-head);
  font-size: 18px; font-weight: 800;
  box-shadow: 0 10px 30px var(--gold-glow); margin-bottom: 16px;
}
.v22-btn-retry {
  font-size: 15px; color: var(--text-muted); padding: 12px 24px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 100px;
  font-family: var(--font-head); font-weight: 700;
}

/* ═══════════════════════════════════
   5. STORIES
   ═══════════════════════════════════ */
.v22-section { max-width: 500px; margin: 0 auto; padding: 40px 20px; }
.v22-h2 { font-family: var(--font-head); font-size: 26px; font-weight: 800; margin-bottom: 6px; }

.v22-stories-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.v22-stories-controls { display: flex; gap: 8px; }
.v22-stories-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.06); display: flex; justify-content: center; align-items: center; font-size: 18px; color: var(--text-muted); border: 1px solid rgba(255,255,255,0.08); }

.v22-stories-scroll { display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 20px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.v22-stories-scroll::-webkit-scrollbar { display: none; }

.v22-story-card { flex-shrink: 0; width: 290px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 24px; padding: 24px; scroll-snap-align: start; border-left: 4px solid var(--gold); }
.v22-story-who { font-family: var(--font-head); font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.v22-story-where { font-size: 12px; color: var(--gold); font-weight: 700; margin-bottom: 12px; }
.v22-story-text { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ═══════════════════════════════════
   6. FOOTER
   ═══════════════════════════════════ */
.v22-footer { max-width: 500px; margin: 0 auto; padding: 30px 20px 50px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.v22-f-brand { font-family: var(--font-head); font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.v22-f-muted { font-size: 11px; color: var(--text-muted); line-height: 1.5; max-width: 200px; }
.v22-f-links { display: flex; flex-direction: column; gap: 6px; }
.v22-f-link { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.v22-f-link:hover { color: var(--gold); }

.v22-hidden { display: none; }
#lp-profiles-top, #lp-profiles-new { display: none; }
