/* ==========================================================================
   Globley — website design system
   Derived directly from the iOS app palette (ios/Globley/Views/ContentView.swift)
   Deep space / cosmic planet theme.
   ========================================================================== */

:root {
  /* Surface hierarchy (dark space indigo) */
  --bg: #0A0D1E;
  --space-glow: #141B3C;
  --card: #151B37;
  --card-alt: #1D2547;
  --stroke: rgba(255, 255, 255, 0.08);

  /* Accent palette (planet glow) */
  --accent: #10B73A;
  --accent-2: #2ED796;
  --blue: #5CA8FF;
  --blue-2: #4D8FE6;
  --violet: #8A7BFF;
  --amber: #FFC24B;

  /* Typography */
  --text: #FFFFFF;
  --text-2: rgba(255, 255, 255, 0.6);

  /* Radius / shadow */
  --radius: 16px;
  --radius-lg: 20px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 8px 24px rgba(16, 183, 58, 0.15);

  --maxw: 1100px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nebula background layers (mirrors MenuView ZStack) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at top left, var(--space-glow) 0%, transparent 50%),
    radial-gradient(circle at bottom right, rgba(138, 123, 255, 0.10) 0%, transparent 45%),
    var(--bg);
}

/* Layout */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10, 13, 30, 0.8);
  border-bottom: 1px solid var(--stroke);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--text-2); font-weight: 500; font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  padding: 8px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
}
.nav-cta:hover { background: var(--accent-2); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ==========================================================================
   Hero (mirrors MenuView hero: emblem + gradient wordmark + tagline)
   ========================================================================== */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
}
.hero-emblem {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 183, 58, 0.25), transparent 70%);
  font-size: 60px;
}
.hero h1 {
  font-size: clamp(42px, 7vw, 68px);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--text-2);
  margin-top: 12px;
  font-weight: 500;
}
.hero-sub {
  max-width: 620px;
  margin: 16px auto 0;
  color: var(--text-2);
  font-size: 16px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* ==========================================================================
   Buttons (mirrors MenuView bigButton)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary {
  background: linear-gradient(135deg, var(--card), rgba(29, 37, 71, 0.55));
  color: var(--text);
  border: 1.5px solid var(--stroke);
}
.btn-secondary:hover { border-color: var(--blue); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-2); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 80px 0; }
.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-2);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 16px;
}

/* ==========================================================================
   Cards (mirrors MenuView bigButton + HelpView cards)
   ========================================================================== */
.card {
  background: linear-gradient(135deg, var(--card), rgba(29, 37, 71, 0.55));
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.18); }

/* How it works — 4 steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.step-card { text-align: left; }
.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: rgba(92, 168, 255, 0.15);
  color: var(--blue);
}
.step-icon.accent { background: rgba(16, 183, 58, 0.15); color: var(--accent); }
.step-icon.violet { background: rgba(138, 123, 255, 0.15); color: var(--violet); }
.step-icon.amber { background: rgba(255, 194, 75, 0.15); color: var(--amber); }
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-card p { color: var(--text-2); font-size: 15px; }

/* Game modes */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.mode-card { display: flex; flex-direction: column; }
.mode-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.mode-card p { color: var(--text-2); font-size: 15px; flex: 1; }
.mode-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  width: fit-content;
}
.mode-badge.daily { background: rgba(92, 168, 255, 0.15); color: var(--blue); }
.mode-badge.practice { background: rgba(16, 183, 58, 0.15); color: var(--accent); }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card { text-align: left; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-2); font-size: 15px; }

/* CTA band */
.cta-band {
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(135deg, rgba(16, 183, 58, 0.1), rgba(92, 168, 255, 0.1));
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
}
.cta-band h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-bottom: 12px; }
.cta-band p { color: var(--text-2); margin-bottom: 28px; font-size: 16px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--stroke);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-2); font-size: 14px; }

/* ==========================================================================
   Page header (for Support / Privacy subpages)
   ========================================================================== */
.page-header {
  text-align: center;
  padding: 72px 24px 40px;
}
.page-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header p { color: var(--text-2); margin-top: 12px; font-size: 17px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   FAQ accordion (Support page)
   ========================================================================== */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: linear-gradient(135deg, var(--card), rgba(29, 37, 71, 0.55));
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-question:hover { background: rgba(255,255,255,0.03); }
.faq-arrow { transition: transform 0.25s; color: var(--text-2); flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding: 0 22px 18px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 500px; }

/* ==========================================================================
   Content blocks (Privacy / Support body)
   ========================================================================== */
.content-block { max-width: 760px; margin: 0 auto; padding: 0 24px 60px; }
.content-block h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text);
}
.content-block h2:first-child { margin-top: 0; }
.content-block p { color: var(--text-2); font-size: 15px; line-height: 1.8; margin-bottom: 14px; }
.content-block ul { color: var(--text-2); font-size: 15px; line-height: 1.8; margin: 0 0 14px 20px; }
.content-block li { margin-bottom: 6px; }
.content-block a { color: var(--blue); }
.content-block strong { color: var(--text); }

/* Contact card */
.contact-card {
  max-width: 560px;
  margin: 32px auto 0;
  text-align: center;
  padding: 32px;
}
.contact-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.contact-card p { color: var(--text-2); font-size: 15px; margin-bottom: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 13, 30, 0.97);
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--stroke);
  }
  .hero { padding: 56px 24px 40px; }
  .section { padding: 56px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
