/*
Theme Name: QuizUp Duel
Theme URI: https://quizupduel.com
Author: QuizUp Duel
Author URI: https://quizupduel.com
Description: A clean, modern single-page landing theme for the QuizUp Duel trivia app, matched to the app's brand colors. Hero with Google Play download badges, feature highlights, screenshots, and footer-only essential pages (Privacy, Terms, Support, Delete Account). Edit links, email and copy from Appearance -> Customize.
Version: 2.4.1
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quizup-duel
*/

/* ============================================================
   Design tokens — sourced from the app's "colorful" theme
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --bg-tint: #eef2ff;
  --surface: #ffffff;
  --surface-muted: #e8ecf4;

  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #06b6d4;
  --accent: #f43f5e;
  --accent-warm: #f97316;
  --success: #10b981;

  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --on-primary: #ffffff;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --grad-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --grad-duel: linear-gradient(135deg, #06b6d4, #6366f1);
  --grad-warm: linear-gradient(135deg, #f43f5e, #f97316);
  --grad-hero: linear-gradient(160deg, #4f46e5 0%, #6366f1 45%, #06b6d4 100%);

  --radius: 22px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 14px 40px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 30px 70px rgba(79, 70, 229, 0.22);
  --maxw: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
::selection { background: rgba(99, 102, 241, 0.22); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section--tight { padding: 64px 0; }
.text-center { text-align: center; }
.muted { color: var(--ink-2); }
.lead { font-size: 1.22rem; color: var(--ink-2); max-width: 640px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--bg-tint);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
}
.cta .eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}
.cta .eyebrow::before { background: var(--accent-warm); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn--primary { background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-lg); }
.btn--primary:hover { filter: brightness(1.06); box-shadow: 0 36px 80px rgba(79, 70, 229, 0.32); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn--light { background: rgba(255,255,255,0.16); color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--light:hover { background: rgba(255,255,255,0.26); }

/* Store / download badges */
.store-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: var(--shadow-md);
}
.store-btn:hover { transform: translateY(-2px); text-decoration: none; }
.store-btn.is-disabled { opacity: 0.55; cursor: default; }
.store-btn.is-disabled:hover { transform: none; }
.store-btn svg { width: 26px; height: 26px; flex: 0 0 auto; }
.store-btn small { display: block; font-size: 0.66rem; font-weight: 600; opacity: 0.8; letter-spacing: 0.03em; }
.store-btn strong { display: block; font-size: 1.05rem; line-height: 1.1; }
.coming-soon-tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--bg-tint);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
}
.hero .coming-soon-tag { color: #fff; background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.35); }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand .brand-name b { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); font-weight: 600; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.btn--primary,
.nav-links a.btn--primary:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; cursor: pointer; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0) 0 0 / 28px 28px,
    var(--grad-hero);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(700px 500px at 85% 10%, rgba(255,255,255,0.18), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding: 96px 0 100px; }
.hero h1 { color: #fff; }
.hero h1 span { color: #ffe27a; }
.hero .lead { color: rgba(255,255,255,0.9); margin-bottom: 28px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.pill {
  font-size: 0.8rem; font-weight: 700;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}
.pill--free {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.55);
  color: #ecfdf5;
}

/* Phone mockup */
.phone {
  position: relative;
  width: 290px; height: 580px;
  margin: 0 auto;
  border-radius: 44px;
  background: #0b1220;
  border: 10px solid #0b1220;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.45);
}
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 24px; border-radius: 999px; background: #0b1220; z-index: 2;
}
.phone-screen {
  position: absolute; inset: 0;
  border-radius: 34px;
  background: linear-gradient(180deg, #1e293b, #312e81);
  padding: 46px 18px 20px;
  overflow: hidden;
}
.phone-vs { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: #fff; }
.phone-vs .who { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.phone-vs .ava { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-duel); display: grid; place-items: center; font-size: 0.85rem; }
.phone-vs .ava.two { background: var(--grad-warm); }
.phone-vs .score { font-size: 1.5rem; font-weight: 800; }
.phone-vs .vs { font-size: 0.7rem; opacity: 0.7; font-weight: 700; }
.phone-timer { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.15); margin-bottom: 18px; overflow: hidden; }
.phone-timer span { display: block; height: 100%; width: 64%; background: var(--secondary); }
.phone-q {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 16px; font-weight: 700; color: #fff; margin-bottom: 16px;
}
.phone-a {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 13px 14px; margin-bottom: 10px; font-size: 0.92rem; color: rgba(255,255,255,0.85);
}
.phone-a.correct { background: rgba(16,185,129,0.28); border-color: var(--success); color: #fff; }

/* ============================================================
   Stats
   ============================================================ */
.stats {
  position: relative;
  z-index: 2;
  margin-top: -92px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 38px 20px;
}
.stat { padding: 6px 12px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat .num {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -0.03em;
  background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat .label { color: var(--ink-2); font-weight: 600; }

/* ============================================================
   Features
   ============================================================ */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card .icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.55rem; margin-bottom: 20px; color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.18);
}
.icon.g1 { background: var(--grad-primary); }
.icon.g2 { background: var(--grad-duel); }
.icon.g3 { background: var(--grad-warm); }
.card p { color: var(--ink-2); margin: 0; }

/* ============================================================
   Showcase (alternating rows)
   ============================================================ */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.showcase + .showcase { margin-top: 80px; }
.showcase.reverse .showcase-media { order: 2; }
.showcase-media {
  display: grid;
  place-items: center;
}
.showcase-media .device-frame { width: 232px; }

/* ============================================================
   How it works
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { text-align: center; }
.step .step-num {
  width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; color: #fff;
  background: var(--grad-primary); box-shadow: var(--shadow-lg);
}
.step p { color: var(--ink-2); }

/* ============================================================
   Screenshots — device strip
   ============================================================ */
.device-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px 28px;
  padding: 12px 4px;
}

.device {
  flex: 0 0 auto;
  width: 210px;
  margin: 0;
  text-align: center;
}
.device-frame {
  position: relative;
  border-radius: 36px;
  background: #0b1220;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.device-frame::after {
  content: "";
  position: absolute; right: -2px; top: 92px;
  width: 3px; height: 56px; border-radius: 3px;
  background: rgba(15,23,42,0.35);
}
.device:hover .device-frame {
  transform: translateY(-8px);
  box-shadow: 0 32px 64px rgba(79, 70, 229, 0.28);
}
.device-frame img {
  width: 100%;
  border-radius: 28px;
  display: block;
}
.device figcaption {
  font-family: var(--font-head);
  margin-top: 18px;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

/* Hero phone uses the same frame, centered on the hero gradient */
.hero-visual { position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 380px; height: 380px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.26), rgba(255,255,255,0) 62%);
  filter: blur(8px);
  z-index: 0;
}
.hero-device {
  position: relative;
  z-index: 1;
  width: 256px;
  margin: 0 auto;
  border-radius: 40px;
  padding: 11px;
  box-shadow: 0 34px 80px rgba(8, 6, 30, 0.5);
}
.hero-device img { border-radius: 30px; }

/* ============================================================
   CTA banner
   ============================================================ */
.cta {
  background: var(--grad-hero);
  border-radius: 28px;
  padding: 64px 40px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; }
.cta .store-buttons { justify-content: center; }
.cta .store-btn { background: #fff; color: var(--ink); }

/* ============================================================
   Free / perks band
   ============================================================ */
.perks-section { background: var(--bg-tint); }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.perk {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.perk:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.perk-icon {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 1.5rem; color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.18);
}
.perk h3 { margin-bottom: 8px; }
.perk p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

/* ============================================================
   Auth / account deletion form + modal
   ============================================================ */
.auth-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
}
.auth-card__title { font-size: 1.35rem; margin-bottom: 6px; }
.auth-card__sub { margin-bottom: 26px; font-size: 0.95rem; }
.field { display: block; margin-bottom: 18px; }
.field > span {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 7px;
  color: var(--ink);
}
.field input {
  width: 100%;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.auth-submit { width: 100%; justify-content: center; margin-top: 6px; }
.auth-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: none;
  border: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: underline;
}
.auth-link:hover { color: var(--primary-dark); }
.form-msg {
  margin: 0 0 14px;
  font-size: 0.92rem;
  min-height: 1.2em;
}
.form-msg.is-error { color: #dc2626; }
.form-msg.is-ok { color: #16a34a; }

/* Success modal */
.qd-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; }
.qd-modal[hidden] { display: none; }
.qd-modal__overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); }
.qd-modal__box {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px 34px;
  box-shadow: var(--shadow-lg);
  animation: qd-pop 0.25s ease;
}
@keyframes qd-pop { from { transform: translateY(12px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.qd-modal__icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.8rem; color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
}
.qd-modal__box h3 { font-size: 1.4rem; margin-bottom: 10px; }
.qd-modal__box .btn { margin-top: 22px; }

/* ============================================================
   Support card
   ============================================================ */
.support-card {
  max-width: 560px; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 44px 34px; box-shadow: var(--shadow-sm);
}
.support-card__icon {
  width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 18px;
  display: grid; place-items: center; font-size: 1.7rem; color: #fff; background: var(--grad-primary);
}
.support-card h2 { font-size: 1.5rem; }
.support-card .btn { margin-top: 22px; }

/* ============================================================
   Page content (legal)
   ============================================================ */
.page-content { max-width: 800px; margin: 0 auto; }
.page-content h2 { margin-top: 1.6em; }
.page-content ul { color: var(--ink-2); padding-left: 1.2em; }
.page-content li { margin-bottom: 0.5em; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 64px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { color: #94a3b8; max-width: 280px; }
.footer-col h4 { font-family: var(--font-head); color: #fff; font-size: 0.95rem; font-weight: 700; margin: 0 0 16px; letter-spacing: 0.01em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: #94a3b8; font-weight: 500; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,0.08); color: #fff;
}
.footer-social a:hover { background: var(--primary); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  color: #64748b; font-size: 0.9rem;
}
.footer-bottom a { color: #94a3b8; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero-grid, .showcase { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .showcase.reverse .showcase-media { order: 0; }
  .features-grid, .steps, .perks { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
  .features-grid, .steps, .stats, .perks, .footer-top { grid-template-columns: 1fr; }
  .stats { margin-top: -40px; padding: 14px 20px; }
  .stat { padding: 20px 12px; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--border); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
