/* ===== Word Connect Adventure — world-class design system ===== */
:root {
  --purple: #7c3aed;
  --purple-deep: #4c1d95;
  --purple-light: #a78bfa;
  --pink: #ec4899;
  --pink-soft: #f9a8d4;
  --orange: #fb923c;
  --yellow: #fbbf24;
  --teal: #2dd4bf;
  --sky: #38bdf8;

  --bg: #faf5ff;
  --bg-2: #fdf2f8;
  --ink: #160c2e;
  --ink-soft: #5b5072;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.6);
  --glass-brd: rgba(255, 255, 255, 0.7);

  --radius: 26px;
  --radius-sm: 16px;
  --shadow-sm: 0 6px 18px rgba(76, 29, 149, 0.08);
  --shadow: 0 22px 50px rgba(109, 40, 217, 0.16);
  --shadow-lg: 0 40px 80px rgba(109, 40, 217, 0.22);
  --grad-brand: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #6366f1 100%);
  --grad-warm: linear-gradient(135deg, #fb923c, #ec4899);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Baloo 2", var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Decorative animated background blobs */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  z-index: -2;
  pointer-events: none;
}
body::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--pink-soft), transparent 70%);
  top: -160px; right: -120px;
  animation: drift 18s ease-in-out infinite;
}
body::after {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(45,212,191,.5), transparent 70%);
  bottom: -120px; left: -120px;
  animation: drift 22s ease-in-out infinite reverse;
}
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.12); }
}

h1, h2, h3, .brand { font-family: var(--font-head); }
a { color: var(--purple); text-decoration: none; transition: color .2s ease; }
a:hover { text-decoration: none; }

.container { width: min(1140px, 92%); margin: 0 auto; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(160%);
  background: rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid rgba(124, 58, 237, 0.08);
  transition: box-shadow .3s ease, background .3s ease;
}
.nav.scrolled { box-shadow: 0 8px 30px rgba(76, 29, 149, 0.1); background: rgba(255,255,255,.85); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.18rem; color: var(--ink); }
.brand .logo {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.brand:hover .logo { transform: rotate(-10deg) scale(1.08); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-weight: 600; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--grad-brand); border-radius: 2px;
  transition: width .25s ease;
}
.nav-links a:hover { color: var(--purple); }
.nav-links a:hover::after { width: 100%; }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; font-family: var(--font);
  border: none; cursor: pointer;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
}
.btn-primary { background: var(--grad-warm); color: #fff; box-shadow: 0 14px 30px rgba(236, 72, 153, 0.38); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 40px rgba(236, 72, 153, 0.5); }
.btn-ghost { background: rgba(124, 58, 237, 0.08); color: var(--purple); }
.btn-ghost:hover { transform: translateY(-3px); background: rgba(124, 58, 237, 0.14); }

/* ===== Hero ===== */
.hero { position: relative; padding: 90px 0 110px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-brd);
  color: var(--purple-deep);
  font-weight: 700; padding: 9px 18px; border-radius: 999px;
  font-size: .85rem; margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(45,212,191,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(45,212,191,.6); } 70% { box-shadow: 0 0 0 10px rgba(45,212,191,0); } 100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); } }

.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.1rem); line-height: 1.08; font-weight: 800; letter-spacing: -1px; }
.hero h1 .grad {
  background: var(--grad-brand);
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease infinite;
}
@keyframes shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); margin: 24px 0 34px; max-width: 540px; }
@media (max-width: 900px) { .hero p.lead { margin-left: auto; margin-right: auto; } }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) { .hero-cta { justify-content: center; } }

.hero-trust { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero-trust { justify-content: center; } }
.hero-trust .t-item { text-align: left; }
@media (max-width: 900px) { .hero-trust .t-item { text-align: center; } }
.hero-trust .t-num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.hero-trust .t-label { font-size: .85rem; color: var(--ink-soft); }
.stars { color: var(--yellow); letter-spacing: 2px; }

/* ===== Phone mockup ===== */
.phone-wrap { position: relative; display: grid; place-items: center; }
.phone {
  width: 286px; height: 580px; position: relative;
  border-radius: 44px;
  background: linear-gradient(160deg, #1e1240, #3b0d6e);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-18px) rotate(1deg); } }
.phone::after { content:""; position:absolute; top:18px; left:50%; transform:translateX(-50%); width:90px; height:24px; background:#1e1240; border-radius:0 0 16px 16px; z-index:3; }
.phone-screen {
  width: 100%; height: 100%; border-radius: 32px; overflow: hidden;
  background: linear-gradient(165deg, #c084fc, #818cf8 55%, #38bdf8);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 30px; text-align: center; color: #fff; position: relative;
}
.phone-screen .level-tag { position:absolute; top:46px; font-size:.8rem; font-weight:700; background:rgba(255,255,255,.25); padding:5px 14px; border-radius:999px; backdrop-filter:blur(4px); }
.phone-screen .word { font-family: var(--font-head); font-size: 2rem; font-weight: 800; letter-spacing: 6px; text-shadow: 0 4px 0 rgba(0,0,0,.14); }
.letter-ring { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.letter {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.95); color: var(--purple);
  display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 800; font-size: 1.5rem; box-shadow: 0 7px 0 rgba(0,0,0,.14);
  transition: transform .2s ease;
}
.letter:hover { transform: translateY(-4px) scale(1.06); }
/* floating chips around phone */
.chip {
  position: absolute; background: var(--white); border-radius: 16px;
  padding: 12px 16px; font-weight: 700; font-size: .9rem; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px;
}
.chip .emoji { font-size: 1.2rem; }
.chip.c1 { top: 8%; left: -6%; animation: floaty 5s ease-in-out infinite; }
.chip.c2 { bottom: 16%; right: -8%; color: var(--pink); animation: floaty 7s ease-in-out infinite .5s; }
.chip.c3 { bottom: 4%; left: 4%; color: var(--teal); animation: floaty 6.5s ease-in-out infinite 1s; }
@media (max-width: 480px) { .chip { display: none; } }

/* ===== Sections ===== */
section.block { padding: 96px 0; position: relative; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 60px; }
.eyebrow { display:inline-block; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; font-size: .78rem; color: var(--pink); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.section-head p { color: var(--ink-soft); font-size: 1.12rem; margin-top: 14px; }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 26px; }
.card {
  position: relative; background: var(--white); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow-sm);
  border: 1px solid rgba(124, 58, 237, 0.06);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;
  overflow: hidden;
}
.card::before {
  content:""; position:absolute; inset:0; border-radius:var(--radius);
  background: var(--grad-brand); opacity:0; transition:opacity .3s ease; z-index:0;
}
.card > * { position: relative; z-index: 1; }
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.card .ico {
  width: 60px; height: 60px; border-radius: 18px;
  display: grid; place-items: center; font-size: 1.8rem; margin-bottom: 18px;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.card:hover .ico { transform: scale(1.12) rotate(-6deg); }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); }
.ico.a { background: rgba(236,72,153,.14); }
.ico.b { background: rgba(45,212,191,.16); }
.ico.c { background: rgba(251,191,36,.2); }
.ico.d { background: rgba(124,58,237,.14); }
.ico.e { background: rgba(251,146,60,.16); }
.ico.f { background: rgba(56,189,248,.18); }

/* Steps section */
.steps-bg { background: linear-gradient(180deg, var(--white), transparent); }
.steps { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 26px; counter-reset: step; }
.step { position: relative; background: var(--white); border-radius: var(--radius); padding: 38px 30px 30px; box-shadow: var(--shadow-sm); border: 1px solid rgba(124,58,237,.06); }
.step .num {
  position:absolute; top:-22px; left:30px;
  width: 50px; height: 50px; border-radius: 16px;
  background: var(--grad-warm); color: #fff;
  display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 800; font-size: 1.4rem; box-shadow: var(--shadow);
}
.step h3 { font-size: 1.25rem; margin: 8px 0 8px; }
.step p { color: var(--ink-soft); }

/* Stats band */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 24px;
  background: var(--grad-brand); border-radius: var(--radius); padding: 50px 40px;
  box-shadow: var(--shadow); text-align: center;
}
.stat .n { font-family: var(--font-head); font-size: clamp(2rem,4vw,2.8rem); font-weight: 800; color: #fff; }
.stat .l { color: rgba(255,255,255,.85); font-weight: 600; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 26px; }
.quote { background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); border: 1px solid rgba(124,58,237,.06); }
.quote .stars { font-size: 1rem; }
.quote p { color: var(--ink); font-size: 1.05rem; margin: 14px 0 20px; }
.quote .who { display:flex; align-items:center; gap:12px; }
.quote .av { width: 44px; height: 44px; border-radius: 50%; display:grid; place-items:center; font-weight:800; color:#fff; font-family:var(--font-head); }
.quote .who .name { font-weight: 700; line-height: 1.1; }
.quote .who .role { font-size: .85rem; color: var(--ink-soft); }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq details {
  background: var(--white); border-radius: var(--radius-sm); padding: 4px 24px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(124,58,237,.06);
  transition: box-shadow .25s ease;
}
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-weight: 700;
  font-size: 1.08rem; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; color: var(--purple); transition: transform .25s ease; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 22px; margin-top: -6px; }

/* CTA band */
.cta-band { position: relative; text-align: center; padding: 90px 0; overflow: hidden; }
.cta-inner {
  background: var(--grad-brand); border-radius: 40px; padding: 70px 40px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-inner::before { content:""; position:absolute; top:-50%; left:-20%; width:60%; height:200%; background:rgba(255,255,255,.08); transform:rotate(25deg); }
.cta-inner h2 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; color: #fff; position: relative; }
.cta-inner p { font-size: 1.15rem; color: rgba(255,255,255,.92); margin: 16px auto 30px; max-width: 560px; position: relative; }

/* Google Play badge */
.play-badge {
  display: inline-flex; align-items: center; gap: 14px;
  background: #000; color: #fff; padding: 13px 26px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
}
.play-badge:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 34px rgba(0,0,0,.3); }
.play-badge svg { width: 28px; height: 28px; }
.play-badge .small { font-size: .68rem; opacity: .85; display: block; line-height: 1; letter-spacing: .5px; }
.play-badge .big { font-size: 1.2rem; font-weight: 700; line-height: 1.25; font-family: var(--font-head); }

/* Browser ("Play in Browser") badge — lighter, brand-gradient variant */
.play-badge.browser-badge { background: var(--grad-brand); border-color: rgba(255,255,255,.25); }
.play-badge.browser-badge:hover { box-shadow: 0 16px 34px rgba(124,58,237,.4); }
.play-badge.browser-badge svg { stroke: #fff; }
.cta-inner .play-badge.browser-badge { background: #fff; color: var(--purple); border-color: rgba(124,58,237,.15); }
.cta-inner .play-badge.browser-badge svg { stroke: var(--purple); }

/* ===== Footer ===== */
.footer { background: var(--ink); color: #b6a9d4; padding: 60px 0 32px; position: relative; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 34px; margin-bottom: 36px; }
.footer .brand { color: #fff; }
.footer .brand .logo { box-shadow: none; }
.footer-tagline { max-width: 280px; margin-top: 14px; font-size: .95rem; color: #9484bb; }
.footer-col h4 { color: #fff; font-family: var(--font-head); margin-bottom: 14px; font-size: 1rem; }
.footer-col a { display: block; color: #b6a9d4; font-weight: 500; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; font-size: .9rem; color: #8a7bb0; text-align: center; }

/* ===== Legal pages ===== */
.legal {
  background: var(--white); width: min(840px, 92%); margin: 56px auto;
  padding: 56px 60px; border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(124,58,237,.06);
}
@media (max-width: 640px) { .legal { padding: 36px 26px; } }
.legal h1 { font-size: 2.4rem; margin-bottom: 6px; }
.legal .updated { color: var(--ink-soft); margin-bottom: 32px; font-size: .95rem; }
.legal h2 { font-size: 1.4rem; margin: 36px 0 12px; color: var(--purple); }
.legal p, .legal li { color: var(--ink-soft); margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal a { font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 26px; font-weight: 700; }
.back-link:hover { gap: 10px; transition: gap .2s ease; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone, .chip, body::before, body::after, .hero h1 .grad { animation: none; }
}

/* ===================================================================
   Playable mini-game in the hero phone
   =================================================================== */
.phone-screen { justify-content: flex-start; padding: 56px 22px 26px; gap: 16px; }
.game-top {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: .9rem;
}
.game-top .level-tag { position: static; background: rgba(255,255,255,.22); padding: 5px 14px; border-radius: 999px; backdrop-filter: blur(4px); }
.game-top .coins { background: rgba(255,255,255,.22); padding: 5px 12px; border-radius: 999px; transition: transform .2s ease; }
.game-top .coins.pop { transform: scale(1.25); }

/* Crossword board */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px; width: 100%; max-width: 210px; margin: 6px auto 0;
}
.grid .cell {
  aspect-ratio: 1; border-radius: 9px;
  background: rgba(255,255,255,.22);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.15rem;
  color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.08);
}
.grid .cell.empty { background: transparent; box-shadow: none; }
.grid .cell.filled {
  background: #fff; color: var(--purple);
  animation: cellPop .4s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 5px 0 rgba(0,0,0,.12);
}
@keyframes cellPop { 0% { transform: scale(.4) rotate(-12deg); } 100% { transform: scale(1) rotate(0); } }

/* Live word preview */
.current-word {
  min-height: 38px; padding: 4px 18px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 800; font-size: 1.3rem;
  letter-spacing: 4px; color: var(--purple); background: #fff;
  opacity: 0; transform: scale(.9); transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 6px 0 rgba(0,0,0,.1);
}
.current-word.show { opacity: 1; transform: scale(1); }

/* Letter wheel */
.wheel {
  position: relative; width: 200px; height: 200px; margin: 2px auto 0;
  touch-action: none; user-select: none;
}
.wheel::before {
  content: ""; position: absolute; inset: 10px; border-radius: 50%;
  background: rgba(255,255,255,.16); backdrop-filter: blur(2px);
  border: 2px dashed rgba(255,255,255,.35);
}
.wheel.celebrate::before { border-color: var(--yellow); animation: ringGlow 1s ease 2; }
@keyframes ringGlow { 50% { box-shadow: 0 0 0 8px rgba(251,191,36,.4); } }
.trace { position: absolute; inset: 0; width: 200px; height: 200px; pointer-events: none; z-index: 1; }
.trace polyline { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.wnode {
  position: absolute; width: 54px; height: 54px; transform: translate(-50%, -50%);
  border: none; border-radius: 50%; background: #fff; color: var(--purple);
  font-family: var(--font-head); font-weight: 800; font-size: 1.5rem;
  cursor: pointer; z-index: 2; box-shadow: 0 6px 0 rgba(0,0,0,.16);
  transition: transform .12s ease, background .12s ease, color .12s ease;
  display: grid; place-items: center;
}
.wnode.active { background: var(--pink); color: #fff; transform: translate(-50%, -50%) scale(1.12); box-shadow: 0 8px 0 rgba(0,0,0,.2); }
.wnode.shake { animation: nodeShake .4s; }
@keyframes nodeShake { 0%,100%{ transform: translate(-50%,-50%) } 25%{ transform: translate(calc(-50% - 5px),-50%) } 75%{ transform: translate(calc(-50% + 5px),-50%) } }

/* Hint / feedback line */
.game-hint {
  font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.9);
  text-align: center; min-height: 20px; margin-top: 2px; transition: color .2s ease;
}
.game-hint.good { color: #fff; }
.game-hint.bonus { color: var(--yellow); font-weight: 800; }
.game-hint.bad { color: #ffe0e0; }
.game-hint.win { color: #fff; font-weight: 800; font-size: .9rem; }

/* Confetti */
.confetti {
  position: absolute; top: -10px; width: 9px; height: 14px; border-radius: 2px;
  z-index: 5; animation: fall 2s ease-in forwards;
}
@keyframes fall { to { transform: translateY(560px) rotate(540deg); opacity: 0; } }
