/* CausePlay Nation — Global Styles
   Vibe: Warm, playful, trustworthy. Think: community board game night meets charity gala.
   Fonts: Fraunces (display headings) + Satoshi (body)
   Palette: Deep forest green + warm amber + cream off-white
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,400&family=Satoshi:wght@400;500;600;700&display=swap');

:root {
  --green-900: #0d2b1a;
  --green-800: #153d27;
  --green-700: #1a4f30;
  --green-600: #2d7a47;
  --green-500: #3a9e5e;
  --green-400: #52c07a;
  --green-200: #a8e6bf;
  --green-100: #d4f3e3;
  --amber: #f59e0b;
  --amber-light: #fcd34d;
  --amber-dark: #d97706;
  --cream: #fdf8f0;
  --cream-dark: #f5ede0;
  --warm-white: #fffef9;
  --text-dark: #111b14;
  --text-mid: #3a4d3f;
  --text-muted: #6b7c6f;
  --red: #ef4444;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(13, 43, 26, 0.08);
  --shadow-md: 0 4px 20px rgba(13, 43, 26, 0.12);
  --shadow-lg: 0 12px 48px rgba(13, 43, 26, 0.18);
  --shadow-green: 0 4px 24px rgba(58, 158, 94, 0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Satoshi', 'Helvetica Neue', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Fraunces', 'Georgia', serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--green-900);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
p { color: var(--text-mid); }

a { color: var(--green-600); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-500); }

/* ── Layout ── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-family: 'Satoshi', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green-600);
  color: #fff;
  border-color: var(--green-600);
  box-shadow: var(--shadow-green);
}
.btn-primary:hover {
  background: var(--green-500);
  border-color: var(--green-500);
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(58, 158, 94, 0.4);
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-600);
}
.btn-secondary:hover {
  background: var(--green-600);
  color: #fff;
  transform: translateY(-2px);
}
.btn-amber {
  background: var(--amber);
  color: var(--green-900);
  border-color: var(--amber);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}
.btn-amber:hover {
  background: var(--amber-light);
  border-color: var(--amber-light);
  transform: translateY(-2px);
  color: var(--green-900);
}
.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 248, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(13, 43, 26, 0.08);
  padding: 0.875rem 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-900);
  text-decoration: none;
}
.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--green-600);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  color: var(--text-mid);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--green-100);
  color: var(--green-700);
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--warm-white);
  border: 1px solid rgba(13, 43, 26, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 0.5rem;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  color: var(--text-dark);
  font-size: 0.9rem;
}
.nav-dropdown-menu a:hover { background: var(--green-100); color: var(--green-700); }
.nav-dropdown-menu .game-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.4rem;
  border: none;
  background: none;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-900);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 999;
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 1rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav-close {
  align-self: flex-end;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.5rem;
}
.mobile-nav a {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--green-900);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--green-100);
}
.mobile-nav-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Hero ── */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(42, 122, 71, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 100%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
    var(--cream);
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(82, 192, 122, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}
.hero-title { margin-bottom: 1.25rem; }
.hero-title em {
  font-style: italic;
  color: var(--green-600);
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-mid);
  margin-bottom: 2rem;
  max-width: 480px;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-trust {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.hero-trust-dot { width: 4px; height: 4px; background: var(--text-muted); border-radius: 50%; }
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-card-stack {
  position: relative;
  width: 340px;
  height: 380px;
}
.hero-card {
  position: absolute;
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(13, 43, 26, 0.06);
}
.hero-card-main {
  width: 280px;
  top: 40px;
  left: 30px;
  z-index: 2;
}
.hero-card-back {
  width: 260px;
  top: 20px;
  left: 50px;
  z-index: 1;
  transform: rotate(4deg);
  opacity: 0.7;
}
.hero-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.hero-card-game-title {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: 0.5rem;
}
.hero-card-score {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--green-600);
  font-family: 'Fraunces', serif;
  line-height: 1;
}
.hero-card-score span { font-size: 1rem; color: var(--text-muted); font-family: 'Satoshi', sans-serif; font-weight: 400; }
.hero-donation-pill {
  position: absolute;
  bottom: 30px;
  right: 0;
  background: var(--green-900);
  color: #fff;
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
  animation: float 3s ease-in-out infinite;
}
.hero-donation-pill .pill-dot {
  width: 8px;
  height: 8px;
  background: var(--green-400);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { display: none; }
  .hero-ctas { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-desc { margin: 0 auto 2rem; }
}

/* ── Stats Bar ── */
.stats-bar {
  background: var(--green-900);
  padding: 2.5rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item {}
.stat-value {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--green-200);
  font-weight: 500;
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── How It Works ── */
.how-it-works { background: var(--cream-dark); }
.section-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 0.75rem;
}
.section-header { margin-bottom: 3.5rem; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.step-card {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid rgba(13, 43, 26, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--green-100);
  color: var(--green-700);
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.step-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.step-card p { font-size: 0.92rem; color: var(--text-muted); }

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

/* ── Games ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.game-card {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid rgba(13, 43, 26, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.game-card.trivia::before { background: linear-gradient(90deg, #3a9e5e, #52c07a); }
.game-card.word::before { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.game-card.memory::before { background: linear-gradient(90deg, #6366f1, #a5b4fc); }
.game-card.daily::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.game-card:hover::before { opacity: 1; }
.game-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.game-card.trivia .game-card-icon { background: var(--green-100); }
.game-card.word .game-card-icon { background: rgba(245, 158, 11, 0.1); }
.game-card.memory .game-card-icon { background: rgba(99, 102, 241, 0.1); }
.game-card.daily .game-card-icon { background: rgba(239, 68, 68, 0.1); }
.game-card h3 { font-size: 1.2rem; }
.game-card p { font-size: 0.9rem; color: var(--text-muted); flex: 1; }
.game-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.game-badge {
  background: var(--green-100);
  color: var(--green-700);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.75rem;
}
.game-badge.hot { background: rgba(245, 158, 11, 0.15); color: var(--amber-dark); }
.game-badge.new { background: rgba(99, 102, 241, 0.1); color: #6366f1; }

@media (max-width: 640px) { .games-grid { grid-template-columns: 1fr; } }

/* ── Charities ── */
.charities-section { background: var(--green-900); }
.charities-section h2, .charities-section .section-tag { color: var(--green-200); }
.charities-section h2 { color: #fff; }
.charities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
.charity-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s;
}
.charity-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.charity-emoji { font-size: 1.8rem; margin-bottom: 0.75rem; }
.charity-name { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 0.35rem; font-family: 'Satoshi', sans-serif; }
.charity-category {
  font-size: 0.75rem;
  color: var(--green-300, #86efac);
  background: rgba(82, 192, 122, 0.15);
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  display: inline-block;
}
.charities-cta { text-align: center; margin-top: 2.5rem; }

@media (max-width: 900px) { .charities-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .charities-grid { grid-template-columns: 1fr; } }

/* ── Revenue Transparency ── */
.transparency-section { background: var(--cream-dark); }
.transparency-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.split-visual {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid rgba(13, 43, 26, 0.06);
  box-shadow: var(--shadow-md);
}
.split-bar {
  height: 16px;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--green-600) 70%, var(--amber) 70%);
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.split-legend { display: flex; flex-direction: column; gap: 0.75rem; }
.split-item { display: flex; align-items: center; gap: 0.75rem; }
.split-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.split-dot.charity { background: var(--green-600); }
.split-dot.platform { background: var(--amber); }
.split-pct { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 700; color: var(--green-900); min-width: 56px; }
.split-desc { font-size: 0.9rem; color: var(--text-muted); }
.transparency-content p { color: var(--text-mid); margin-bottom: 1.25rem; }
.transparency-points { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.transparency-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-mid);
}
.transparency-points li::before {
  content: '✓';
  color: var(--green-500);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

@media (max-width: 768px) {
  .transparency-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ── CTA Section ── */
.cta-section {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 100%);
  text-align: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(82, 192, 122, 0.1) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 { color: #fff; max-width: 600px; margin: 0 auto 1rem; }
.cta-section p { color: var(--green-200); font-size: 1.1rem; max-width: 480px; margin: 0 auto 2.5rem; }
.cta-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ── Footer ── */
footer {
  background: var(--green-900);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand { }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--green-600);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.footer-desc { font-size: 0.875rem; color: var(--green-200); line-height: 1.7; max-width: 260px; }
.footer-col h4 { color: #fff; font-size: 0.85rem; font-family: 'Satoshi', sans-serif; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a { color: var(--green-200); font-size: 0.875rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--green-200);
}
.footer-bottom-right { display: flex; gap: 1.5rem; }
.footer-bottom-right a { color: var(--green-200); font-size: 0.8rem; }
.footer-bottom-right a:hover { color: #fff; }

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── Forms ── */
.form-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 70% 50% at 20% 10%, rgba(42, 122, 71, 0.1) 0%, transparent 60%),
    var(--cream);
  padding: 2rem 1.5rem;
}
.form-box {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(13, 43, 26, 0.06);
}
.form-box-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-900);
  text-decoration: none;
  margin-bottom: 2rem;
}
.form-box h1 { font-size: 1.6rem; margin-bottom: 0.35rem; }
.form-box .subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(13, 43, 26, 0.15);
  border-radius: var(--radius);
  font-family: 'Satoshi', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(58, 158, 94, 0.12);
  background: var(--warm-white);
}
.form-group input::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-submit { width: 100%; margin-top: 0.5rem; justify-content: center; }
.form-alt { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-muted); }
.form-alt a { color: var(--green-600); font-weight: 600; }
.form-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #dc2626;
  margin-bottom: 1rem;
  display: none;
}
.form-error.show { display: block; }
.form-success {
  background: var(--green-100);
  border: 1px solid var(--green-200);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--green-700);
  margin-bottom: 1rem;
  display: none;
}
.form-success.show { display: block; }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.25rem 0; color: var(--text-muted); font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: rgba(13, 43, 26, 0.1); }

/* ── Profile ── */
.profile-page { min-height: 100vh; padding: 3rem 0; }
.profile-header {
  background: var(--green-900);
  padding: 3rem 0;
  margin-bottom: 2.5rem;
}
.profile-header-inner { display: flex; align-items: center; gap: 2rem; }
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.2);
}
.profile-info h1 { color: #fff; font-size: 1.8rem; margin-bottom: 0.25rem; }
.profile-info .profile-username { color: var(--green-200); font-size: 0.9rem; }
.profile-stats-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.profile-stat { text-align: center; }
.profile-stat-value { font-family: 'Fraunces', serif; font-size: 1.6rem; font-weight: 700; color: var(--amber); line-height: 1; }
.profile-stat-label { font-size: 0.78rem; color: var(--green-200); margin-top: 0.2rem; }
.profile-content { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; }
.profile-card {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid rgba(13, 43, 26, 0.06);
  box-shadow: var(--shadow-sm);
}
.profile-card h3 { font-size: 1rem; margin-bottom: 1.25rem; }
.charity-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--green-100);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.charity-pill-emoji { font-size: 1.4rem; }
.charity-pill-name { font-size: 0.9rem; font-weight: 600; color: var(--green-800); }
.charity-pill-category { font-size: 0.78rem; color: var(--green-600); }
.recent-games { display: flex; flex-direction: column; gap: 0.75rem; }
.game-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--cream);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.game-history-type { font-weight: 600; color: var(--text-dark); }
.game-history-score { color: var(--green-600); font-weight: 700; font-family: 'Fraunces', serif; }
.game-history-date { color: var(--text-muted); font-size: 0.78rem; }
.streak-visual {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--green-100), rgba(245, 158, 11, 0.1));
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.streak-flame { font-size: 2rem; }
.streak-num { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 900; color: var(--amber-dark); line-height: 1; }
.streak-label { font-size: 0.78rem; color: var(--text-muted); }

@media (max-width: 768px) { .profile-content { grid-template-columns: 1fr; } }

/* ── Game placeholder ── */
.game-placeholder-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 2rem;
  text-align: center;
}
.game-coming-soon {
  max-width: 480px;
}
.game-coming-soon .game-icon-lg { font-size: 4rem; margin-bottom: 1.5rem; }
.game-coming-soon h1 { margin-bottom: 0.75rem; }
.game-coming-soon p { color: var(--text-muted); margin-bottom: 2rem; }
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--amber);
  color: var(--green-900);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

/* ── Leaderboard ── */
.leaderboard-page { padding: 3rem 0; min-height: 100vh; }
.leaderboard-hero {
  background: var(--green-900);
  padding: 3rem 0;
  margin-bottom: 2.5rem;
}
.leaderboard-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.leaderboard-hero p { color: var(--green-200); }
.tab-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid rgba(13, 43, 26, 0.15);
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}
.leaderboard-table {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(13, 43, 26, 0.06);
  box-shadow: var(--shadow-sm);
}
.leaderboard-table table {
  width: 100%;
  border-collapse: collapse;
}
.leaderboard-table th {
  background: var(--cream-dark);
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.leaderboard-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(13, 43, 26, 0.04);
  font-size: 0.9rem;
  color: var(--text-dark);
}
.leaderboard-table tr:last-child td { border-bottom: none; }
.rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.rank-1 { background: var(--amber); color: var(--green-900); }
.rank-2 { background: #d1d5db; color: var(--green-900); }
.rank-3 { background: #cd7c2e; color: #fff; }
.rank-other { background: var(--green-100); color: var(--green-700); }

/* ── Charities page ── */
.charities-page { padding: 3rem 0; min-height: 100vh; }
.charities-page-hero { background: var(--green-900); padding: 3rem 0; margin-bottom: 2.5rem; }
.charities-page-hero h1 { color: #fff; }
.charities-page-hero p { color: var(--green-200); }
.charities-list-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.charity-list-card {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid rgba(13, 43, 26, 0.06);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.charity-list-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.charity-list-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.charity-list-emoji { font-size: 2rem; }
.charity-list-card h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.charity-list-card .category-tag { font-size: 0.75rem; color: var(--green-600); font-weight: 600; }
.charity-list-card p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.charity-list-footer { display: flex; align-items: center; justify-content: space-between; }
.charity-supporters { font-size: 0.8rem; color: var(--text-muted); }
.btn-select-charity { font-size: 0.85rem; padding: 0.5rem 1.25rem; }

@media (max-width: 768px) { .charities-list-grid { grid-template-columns: 1fr; } }

/* ── Charity System (platform bar, category tabs, rich cards, payout) ── */

/* Platform stats bar (below hero on charities page) */
.charity-platform-bar {
  background: var(--green-800);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem 0;
}
.charity-platform-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 0;
}
.cpstat { text-align: center; padding: 0.5rem 1.5rem; }
.cpstat-value {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.2rem;
}
.cpstat-label { font-size: 0.78rem; color: var(--green-200); font-weight: 500; }

/* Category tabs header row */
.charity-tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.charity-auth-prompt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--green-100);
  border-radius: 50px;
  padding: 0.4rem 1rem;
}
.auth-prompt-link { color: var(--green-700); font-weight: 600; }

/* Rich card grid */
.charity-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) { .charity-cards-grid { grid-template-columns: 1fr; } }

.charity-loading, .charity-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

/* Individual charity card */
.charity-rich-card {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1.5px solid rgba(13, 43, 26, 0.07);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.2s ease;
}
.charity-rich-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.charity-rich-card--selected {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(58, 158, 94, 0.12), var(--shadow-sm);
}

.charity-rich-header { display: flex; align-items: flex-start; gap: 1rem; }
.charity-rich-emoji {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.charity-rich-meta { flex: 1; min-width: 0; }
.charity-rich-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: 0.3rem;
  font-family: 'Fraunces', serif;
  line-height: 1.2;
}
.charity-rich-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
}
.charity-rich-link {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.charity-rich-link:hover { background: var(--green-100); color: var(--green-700); }
.charity-rich-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Impact stats row */
.charity-impact-stats {
  display: flex;
  border: 1px solid rgba(13, 43, 26, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
}
.charity-impact-stat {
  flex: 1;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-right: 1px solid rgba(13, 43, 26, 0.06);
}
.charity-impact-stat:last-child { border-right: none; }
.charity-impact-value {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-800);
  line-height: 1;
  margin-bottom: 0.2rem;
}
.charity-impact-label { font-size: 0.68rem; color: var(--text-muted); line-height: 1.3; font-weight: 500; }

/* Payout threshold progress */
.charity-payout-section {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1rem;
}
.charity-payout-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}
.charity-payout-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.charity-payout-amount {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green-800);
  font-family: 'Fraunces', serif;
}
.charity-payout-of {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: 'Satoshi', sans-serif;
}
.charity-payout-bar-track {
  height: 8px;
  background: rgba(13, 43, 26, 0.08);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.charity-payout-bar-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.4s ease;
  min-width: 2px;
}
.charity-payout-sub {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.charity-payout-ready { color: var(--green-600); font-weight: 600; }

/* Card footer */
.charity-rich-footer { margin-top: auto; padding-top: 0.25rem; }
.charity-action-btn { width: 100%; justify-content: center; }
.charity-selected-btn {
  background: var(--green-100);
  color: var(--green-700);
  border-color: rgba(58, 158, 94, 0.3);
  cursor: default;
}
.charity-selected-btn:hover { transform: none; box-shadow: none; }

/* Profile — charity pick prompt */
.charity-pick-prompt {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--green-100), rgba(245, 158, 11, 0.06));
  border: 1.5px dashed rgba(58, 158, 94, 0.4);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.charity-pick-prompt-icon { font-size: 1.8rem; flex-shrink: 0; }
.charity-pick-prompt-title { font-weight: 700; font-size: 0.95rem; color: var(--green-800); margin-bottom: 0.2rem; }

/* ── Loading spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.spinner.show { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast notification ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--green-900);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
.toast.error { background: #dc2626; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-8 { margin-bottom: 2rem; }
.hidden { display: none !important; }
.loading { opacity: 0.6; pointer-events: none; }
