/* ---- DARK THEME (default) ---- */
:root {
  --gold: #ffd700;
  --diamond: #b9f2ff;
  --bg-dark: #050505;
  --bg-card: #111111;
  --bg-panel: #1a1a1a;
  --border: #2a2a2a;
  --border-gold: rgba(255,215,0,0.3);
  --text-primary: #ffffff;
  --text-muted: #888888;
  --text-dim: #444444;
  --focus-blue: #e3f2fd;
  --correct-green: #a5d6a7;
  --transition: background 0.25s, color 0.25s, border-color 0.25s;
}

/* ---- LIGHT THEME ---- */
body.light {
  --bg-dark: #f5f4f0;
  --bg-card: #ffffff;
  --bg-panel: #f0ede8;
  --border: #ddd9d0;
  --border-gold: rgba(180,140,0,0.25);
  --text-primary: #111111;
  --text-muted: #666666;
  --text-dim: #999999;
}

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

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: var(--transition);
}

/* ---- THEME TOGGLE ---- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 40px;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 16px;
  line-height: 1;
  transition: var(--transition);
  color: var(--text-muted);
}
.theme-toggle:hover { border-color: var(--gold); }

/* ---- NAV ---- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.site-nav .logo {
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-decoration: none;
  flex: 1;
  text-align: center;
}

.site-nav .logo .cap { color: var(--gold); }
.site-nav .logo .tm {
  font-size: 10px;
  vertical-align: super;
  color: var(--text-primary);
  margin-left: 1px;
}

/* Hamburger button — always visible on every page, sits on the left of the nav */
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 6px;
  transition: var(--transition);
  flex: 0 0 auto;
}
.menu-btn:hover { background: var(--bg-panel); }

/* Right-side button cluster (help + theme) */
.site-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Theme toggle pinned to the right of nav */
.site-nav .theme-btn,
.site-nav .help-btn,
.site-nav .account-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 40px;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 15px;
  line-height: 1;
  color: var(--text-primary);
  flex: 0 0 auto;
}
.site-nav .theme-btn:hover,
.site-nav .help-btn:hover,
.site-nav .account-btn:hover { border-color: var(--gold); }
.site-nav .help-btn,
.site-nav .account-btn {
  font-weight: 700;
  width: 34px;
  height: 34px;
  padding: 0;
  text-align: center;
  border-radius: 50%;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Hide legacy inline nav links — navigation now lives in the side menu */
.site-nav .nav-links { display: none !important; }

/* ---- SIDE MENU ---- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 30000;
  display: none;
}
.menu-overlay.open { display: block; }

.side-menu {
  position: fixed;
  top: 0;
  left: -340px;
  width: 320px;
  max-width: 86vw;
  height: 100%;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 22px rgba(0,0,0,0.45);
  transition: left 0.28s ease;
  z-index: 31000;
  padding: 64px 0 24px;
  overflow-y: auto;
}
.side-menu.open { left: 0; }
.side-menu .menu-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
}
.side-menu .menu-close:hover { color: var(--text-primary); background: var(--bg-panel); }

.side-menu .menu-section-label {
  padding: 14px 24px 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.side-menu .menu-item {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  transition: var(--transition);
  font-family: inherit;
  text-align: left;
  width: 100%;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}
.side-menu .menu-item:hover { background: var(--bg-panel); }
.side-menu .menu-item.gold { color: var(--gold); font-weight: 700; }
.side-menu .menu-item.muted { color: var(--text-muted); }

/* ---- MAIN ---- */
main {
  max-width: 520px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* ---- HEADINGS ---- */
h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 13px 32px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: #ffe033; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-gold);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-ghost {
  background: var(--bg-panel);
  color: var(--text-primary);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.btn-ghost:hover { border-color: #888; }
.btn-block { width: 100%; text-align: center; }

/* ---- FORMS ---- */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  transition: var(--transition);
}

.form-group { margin-bottom: 20px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: 'Segoe UI', sans-serif;
  transition: var(--transition);
}

input:focus { outline: none; border-color: var(--gold); }

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.oauth-btn {
  width: 100%;
  padding: 13px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  transition: var(--transition);
  text-decoration: none;
}
.oauth-btn:hover { border-color: #888; }

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.form-footer a { color: var(--gold); text-decoration: none; }
.form-footer a:hover { text-decoration: underline; }

#msg {
  font-size: 13px;
  margin-top: 12px;
  min-height: 20px;
  text-align: center;
}

/* ---- FOOTER ---- */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 80px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: var(--transition);
}

.legal-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.legal-footer-links a,
.footer-link-button {
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
}

.legal-footer-links a:hover,
.footer-link-button:hover {
  color: var(--gold);
}

.footer-link-button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.consent-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 50000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
}

.consent-copy {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.consent-copy strong {
  color: var(--text-primary);
  font-size: 14px;
}

.consent-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.consent-actions .btn {
  padding: 10px 16px;
  font-size: 12px;
  white-space: nowrap;
}

.consent-panel {
  position: fixed;
  inset: 0;
  z-index: 50001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.68);
}

.consent-card {
  width: min(520px, 100%);
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.4);
}

.consent-card h2 {
  margin-bottom: 10px;
}

.consent-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--text-primary);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.consent-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.legal-page {
  max-width: 820px;
}

.legal-page h1 {
  margin-bottom: 8px;
}

.legal-page h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.legal-page ul {
  margin: 0 0 18px 22px;
  color: var(--text-muted);
  line-height: 1.65;
}

.legal-page li {
  margin-bottom: 8px;
}

.legal-page a {
  color: var(--gold);
}

.legal-updated {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 28px;
}

@media screen and (max-width: 700px) {
  .consent-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: block;
  }
  .consent-actions {
    margin-top: 12px;
  }
  .consent-actions .btn {
    flex: 1 1 100%;
  }
}

/* ---- HOME PAGE ---- */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 700px;
  margin: 0 auto;
}

.hero-logo {
  font-size: 52px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.hero-logo .cap { color: var(--gold); }
.hero-logo .tm { font-size: 20px; vertical-align: super; color: var(--text-muted); }

.hero-tagline {
  font-style: italic;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1056px;
  margin: 0 auto;
}
@media screen and (max-width: 700px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: var(--transition);
}

.feature-icon { font-size: 26px; margin-bottom: 10px; }
.feature-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ---- MEMBERS PAGE ---- */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.stat-icon { font-size: 32px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--gold); }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

.welcome-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
  transition: var(--transition);
}

.welcome-bar .welcome-text { font-size: 15px; color: var(--text-muted); }
.welcome-bar .welcome-email { color: var(--gold); font-weight: 600; }
