@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg: #060b18;
  --bg2: #080e1f;
  --bg3: #0c1530;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-bright: rgba(255,255,255,0.15);
  --text: #e2e8ff;
  --text-muted: #7a8ab0;
  --text-dim: #4a5580;
  --accent: #4f8ef7;
  --accent-glow: rgba(79,142,247,0.25);
  --accent2: #9b6bfa;
  --accent2-glow: rgba(155,107,250,0.25);
  --accent3: #2dd4aa;
  --accent3-glow: rgba(45,212,170,0.2);
  --nuclear: #f74f4f;
  --nuclear-glow: rgba(247,79,79,0.2);
  --chemistry: #2dd4aa;
  --chemistry-glow: rgba(45,212,170,0.2);
  --physics: #9b6bfa;
  --physics-glow: rgba(155,107,250,0.2);
  --energy: #f7a94f;
  --energy-glow: rgba(247,169,79,0.2);
  --biology: #4ade80;
  --biology-glow: rgba(74,222,128,0.2);
  --space: #818cf8;
  --space-glow: rgba(129,140,248,0.2);
  --critical: #f74f4f;
  --major: #f7834f;
  --serious: #f7c54f;
  --glass-bg: rgba(10,18,40,0.6);
  --glass-border: rgba(255,255,255,0.1);
  --glass-blur: 24px;
  --shadow: 0 8px 40px rgba(0,0,0,0.6);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.7);
  --radius: 16px;
  --radius-lg: 24px;
  --nav-height: 68px;
}

[data-theme="light"] {
  --bg: #f0f4ff;
  --bg2: #e6ecfc;
  --bg3: #dce4f8;
  --surface: rgba(0,0,0,0.04);
  --surface-hover: rgba(0,0,0,0.07);
  --border: rgba(0,0,0,0.08);
  --border-bright: rgba(0,0,0,0.15);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.9);
  --shadow: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --accent-glow: rgba(79,142,247,0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(79,142,247,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
[data-theme="light"] body::before { display: none; }

a { color: inherit; text-decoration: none; }

code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background: rgba(79,142,247,0.12);
  color: var(--accent);
  padding: 2px 7px; border-radius: 5px; font-size: 0.875em;
  border: 1px solid rgba(79,142,247,0.2);
}
[data-theme="light"] code { background: rgba(79,142,247,0.08); }

.liquid-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6) brightness(1.05);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6) brightness(1.05);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.2);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* NAVBAR */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height); z-index: 1000;
  background: rgba(6,11,24,0.88);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, box-shadow 0.3s;
}
[data-theme="light"] .navbar { background: rgba(240,244,255,0.9); }
.navbar.scrolled { box-shadow: 0 4px 40px rgba(0,0,0,0.6); }

.nav-container {
  max-width: 1380px; margin: 0 auto;
  height: 100%; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}

.nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.2rem; font-weight: 800; white-space: nowrap; flex-shrink: 0;
  letter-spacing: -0.02em;
}
.logo-icon { font-size: 1.4rem; filter: drop-shadow(0 0 8px rgba(79,142,247,0.6)); }
.logo-text {
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.beta-badge {
  font-size: 0.5rem; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; padding: 3px 7px; border-radius: 5px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 0.05rem; flex: 1; flex-wrap: nowrap; overflow: visible; }

.nav-link {
  padding: 0.42rem 0.72rem; border-radius: 10px;
  font-size: 0.82rem; font-weight: 500; color: var(--text-muted);
  transition: all 0.2s; white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--accent); background: rgba(79,142,247,0.1); box-shadow: inset 0 0 0 1px rgba(79,142,247,0.2); }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; flex-shrink: 0; }

.theme-toggle {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; border-radius: 10px;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all 0.2s;
}
.theme-toggle:hover { background: var(--surface-hover); border-color: var(--border-bright); }

.discord-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, #5865F2, #4752c4);
  color: #fff; padding: 0.45rem 1rem; border-radius: 10px;
  font-size: 0.82rem; font-weight: 600; transition: all 0.2s; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(88,101,242,0.3);
}
.discord-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(88,101,242,0.5); }
.discord-icon { width: 15px; height: 15px; }

.guest-badge {
  font-size: 0.72rem; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 0.27rem 0.65rem; border-radius: 7px; white-space: nowrap;
}

.user-chip {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
  padding: 0.3rem 0.85rem; border-radius: 20px;
}
.user-avatar { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent); object-fit: cover; }
.user-avatar-initials { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-size: 0.75rem; font-weight: 800; flex-shrink: 0; }
.user-name { font-size: 0.85rem; font-weight: 600; }
.guild-badge { color: var(--accent3); font-size: 0.85rem; }
.logout-btn { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.25rem; }
.logout-btn:hover { color: var(--nuclear); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 5px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* BACK BUTTON */
.back-btn {
  position: fixed; top: calc(var(--nav-height) + 16px); left: 16px;
  z-index: 900; padding: 0.5rem 1.1rem; border-radius: 30px;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  display: flex; align-items: center; gap: 0.4rem; white-space: nowrap;
  animation: slideInLeft 0.35s ease;
}
.back-btn:hover { transform: translateX(-4px) scale(1.04); color: var(--accent); box-shadow: 0 8px 32px var(--accent-glow); }

/* BETA OVERLAY */
.beta-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; animation: fadeIn 0.4s ease;
}
.beta-overlay.hidden { display: none; }

.beta-modal {
  max-width: 500px; width: 100%; padding: 2.75rem;
  border-radius: 28px; text-align: center;
  animation: slideUp 0.45s cubic-bezier(0.34,1.56,0.64,1);
  position: relative; overflow: hidden;
}
.beta-modal::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
}
.beta-icon { font-size: 4rem; margin-bottom: 1rem; filter: drop-shadow(0 0 16px rgba(79,142,247,0.5)); }
.beta-modal h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.accent { color: var(--accent); }
.beta-modal > p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.7; }
.beta-list {
  list-style: none; text-align: left;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.beta-list li { padding: 0.35rem 0; font-size: 0.9rem; color: var(--text-muted); }
.beta-sub { font-size: 0.875rem; color: var(--text-muted); }
.accent-link { color: var(--accent); font-weight: 600; }
.accent-link:hover { text-decoration: underline; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 6rem 1.5rem 4rem;
}
.hero::before {
  content: ''; position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,142,247,0.1) 0%, transparent 70%);
  top: 10%; left: -10%; pointer-events: none;
}
.hero::after {
  content: ''; position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(155,107,250,0.08) 0%, transparent 70%);
  bottom: 10%; right: -5%; pointer-events: none;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.particle {
  position: absolute; left: var(--x); top: var(--y);
  border-radius: 50%; opacity: 0.4;
  animation: float var(--d) ease-in-out infinite alternate;
}
.particle:nth-child(1) { width: 6px; height: 6px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.particle:nth-child(2) { width: 8px; height: 8px; background: var(--accent2); box-shadow: 0 0 14px var(--accent2); }
.particle:nth-child(3) { width: 5px; height: 5px; background: var(--accent3); box-shadow: 0 0 10px var(--accent3); }
.particle:nth-child(4) { width: 4px; height: 4px; background: var(--energy); box-shadow: 0 0 8px var(--energy); }
.particle:nth-child(5) { width: 7px; height: 7px; background: var(--nuclear); box-shadow: 0 0 12px var(--nuclear); }
.particle:nth-child(6) { width: 5px; height: 5px; background: var(--biology); box-shadow: 0 0 10px var(--biology); }

@keyframes float {
  from { transform: translateY(0) scale(1); opacity: 0.4; }
  to { transform: translateY(-60px) scale(2); opacity: 0; }
}

.hero-content { max-width: 680px; text-align: center; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(79,142,247,0.1); border: 1px solid rgba(79,142,247,0.25);
  backdrop-filter: blur(10px); padding: 0.45rem 1.2rem; border-radius: 20px;
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  margin-bottom: 1.75rem; letter-spacing: 0.5px;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 1.5rem; letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 0 30px rgba(79,142,247,0.3));
}

.hero-subtitle {
  font-size: 1.05rem; color: var(--text-muted);
  max-width: 560px; margin: 0 auto 2.5rem; line-height: 1.75;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.atom-visual {
  position: absolute; right: 6%; top: 50%; transform: translateY(-50%);
  width: 320px; height: 320px; opacity: 0.18; pointer-events: none;
}
.nucleus {
  position: absolute; width: 32px; height: 32px;
  background: radial-gradient(circle, #fff, var(--accent));
  border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%,-50%);
  box-shadow: 0 0 40px var(--accent), 0 0 80px var(--accent-glow);
}
.orbit {
  position: absolute; border: 1.5px solid rgba(79,142,247,0.4);
  border-radius: 50%; top: 50%; left: 50%;
}
.orbit-1 { width: 110px; height: 110px; transform: translate(-50%,-50%); animation: spin1 4s linear infinite; }
.orbit-2 { width: 180px; height: 180px; transform: translate(-50%,-50%) rotate(60deg); animation: spin2 7s linear infinite reverse; }
.orbit-3 { width: 250px; height: 250px; transform: translate(-50%,-50%) rotate(120deg); animation: spin3 10s linear infinite; }
.electron { position: absolute; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; top: -5px; left: 50%; transform: translateX(-50%); box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent-glow); }
@keyframes spin1 { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes spin2 { from { transform: translate(-50%,-50%) rotate(60deg); } to { transform: translate(-50%,-50%) rotate(420deg); } }
@keyframes spin3 { from { transform: translate(-50%,-50%) rotate(120deg); } to { transform: translate(-50%,-50%) rotate(480deg); } }

/* BUTTONS */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #3b7de8);
  color: #fff; font-weight: 700;
  padding: 0.8rem 1.75rem; border-radius: 12px;
  transition: all 0.25s; border: none; cursor: pointer; font-size: 0.95rem;
  box-shadow: 0 4px 20px var(--accent-glow); letter-spacing: -0.01em;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(79,142,247,0.5); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--surface); color: var(--text); font-weight: 700;
  padding: 0.8rem 1.75rem; border-radius: 12px;
  border: 1px solid var(--border-bright); transition: all 0.25s; cursor: pointer; font-size: 0.95rem;
}
.btn-secondary:hover { background: var(--surface-hover); transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* SECTIONS */
.cards-section, .stats-section { max-width: 1200px; margin: 0 auto; padding: 5rem 1.5rem; }

.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; margin-bottom: 0.6rem; letter-spacing: -0.02em; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; }
.section-divider { width: 60px; height: 3px; margin: 1rem auto 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 2px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  display: flex; flex-direction: column; gap: 0.6rem;
  position: relative; overflow: hidden;
}
.card::after {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; border-radius: var(--radius);
}
.card-nuclear::after { background: radial-gradient(circle at top left, var(--nuclear-glow), transparent 60%); }
.card-chemistry::after { background: radial-gradient(circle at top left, var(--chemistry-glow), transparent 60%); }
.card-physics::after { background: radial-gradient(circle at top left, var(--physics-glow), transparent 60%); }
.card-energy::after { background: radial-gradient(circle at top left, var(--energy-glow), transparent 60%); }
.card-biology::after { background: radial-gradient(circle at top left, var(--biology-glow), transparent 60%); }
.card-space::after { background: radial-gradient(circle at top left, var(--space-glow), transparent 60%); }
.card:hover { transform: translateY(-6px) scale(1.01); border-color: var(--border-bright); box-shadow: var(--shadow-lg); }
.card:hover::after { opacity: 1; }
.card:hover .card-arrow { transform: translateX(6px); }

.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-nuclear::before { background: linear-gradient(90deg, var(--nuclear), transparent); }
.card-chemistry::before { background: linear-gradient(90deg, var(--chemistry), transparent); }
.card-physics::before { background: linear-gradient(90deg, var(--physics), transparent); }
.card-energy::before { background: linear-gradient(90deg, var(--energy), transparent); }
.card-biology::before { background: linear-gradient(90deg, var(--biology), transparent); }
.card-space::before { background: linear-gradient(90deg, var(--space), transparent); }

.card-icon { font-size: 2.25rem; margin-bottom: 0.25rem; }
.card h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.card p { color: var(--text-muted); font-size: 0.875rem; flex: 1; line-height: 1.65; }
.card-count { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 5px; display: inline-block; margin-top: 0.25rem; }
.card-nuclear .card-count { color: var(--nuclear); background: var(--nuclear-glow); }
.card-chemistry .card-count { color: var(--chemistry); background: var(--chemistry-glow); }
.card-physics .card-count { color: var(--physics); background: var(--physics-glow); }
.card-energy .card-count { color: var(--energy); background: var(--energy-glow); }
.card-biology .card-count { color: var(--biology); background: var(--biology-glow); }
.card-space .card-count { color: var(--space); background: var(--space-glow); }
.card-arrow { font-size: 1.2rem; color: var(--text-dim); transition: transform 0.25s; margin-top: 0.5rem; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat-card { text-align: center; padding: 2rem 1rem; border-radius: var(--radius); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; inset: 0; opacity: 0.05; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.stat-number {
  display: block; font-size: 2.8rem; font-weight: 900; line-height: 1; margin-bottom: 0.5rem; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { color: var(--text-muted); font-size: 0.82rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* SUB PAGES */
main { padding-top: var(--nav-height); }
.sub-page { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem 6rem; }

.page-header { text-align: center; padding: 4rem 0 3rem; max-width: 700px; margin: 0 auto; }
.page-icon { font-size: 4rem; margin-bottom: 1rem; filter: drop-shadow(0 0 20px rgba(79,142,247,0.4)); }
.page-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 900; margin-bottom: 0.75rem; letter-spacing: -0.03em; }
.page-header p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; }

/* FILTER BAR */
.filter-bar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.85rem 1.1rem; border-radius: var(--radius); margin-bottom: 2rem;
}
.filter-label { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px; }
.filter-btn {
  padding: 0.38rem 0.9rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--border); background: none; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; white-space: nowrap; text-decoration: none; display: inline-block;
}
.filter-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-bright); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 16px var(--accent-glow); }
.filter-search { margin-left: auto; }
.search-input {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 0.38rem 0.9rem; border-radius: 8px; font-size: 0.875rem; outline: none;
  transition: all 0.2s; width: 210px; font-family: inherit;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-input::placeholder { color: var(--text-dim); }

/* INCIDENTS */
.incidents-grid { display: flex; flex-direction: column; gap: 1rem; }

.incident-card {
  display: flex; align-items: flex-start; gap: 1.5rem;
  padding: 1.75rem; border-radius: var(--radius);
  transition: all 0.3s; position: relative; overflow: hidden;
}
.incident-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.incident-card[data-severity="critical"]::before { background: var(--critical); box-shadow: 0 0 12px var(--nuclear-glow); }
.incident-card[data-severity="major"]::before { background: var(--major); }
.incident-card[data-severity="serious"]::before { background: var(--serious); }
.incident-card:hover { transform: translateX(6px); border-color: var(--border-bright); }

.incident-icon { font-size: 2.8rem; flex-shrink: 0; line-height: 1; }
.incident-info { flex: 1; min-width: 0; }
.incident-severity { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 0.35rem; }
.incident-info h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.3rem; letter-spacing: -0.01em; }
.incident-date, .incident-location { font-size: 0.82rem; color: var(--text-muted); }
.incident-summary { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; }
.incident-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; }
.incident-card .card-arrow { align-self: center; flex-shrink: 0; color: var(--text-dim); font-size: 1.3rem; transition: all 0.2s; }
.incident-card:hover .card-arrow { transform: translateX(4px); color: var(--accent); }

.severity-critical { color: var(--critical); }
.severity-major { color: var(--major); }
.severity-serious { color: var(--serious); }

/* DETAIL PAGE */
.detail-hero {
  text-align: center; padding: 5rem 2rem 3rem;
  border-radius: var(--radius-lg); margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005));
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.detail-hero::before {
  content: ''; position: absolute; inset: 0; opacity: 1;
  background: radial-gradient(ellipse at top, rgba(79,142,247,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.detail-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 1.25rem;
  background: var(--surface); padding: 0.4rem 1.1rem; border-radius: 20px;
  border: 1px solid var(--border-bright);
}
.detail-icon { font-size: 5rem; margin-bottom: 1rem; filter: drop-shadow(0 0 24px rgba(247,79,79,0.4)); }
.detail-hero h1 { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 900; margin-bottom: 1rem; letter-spacing: -0.02em; }
.detail-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto 1.75rem; line-height: 1.7; }
.detail-meta-row { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; color: var(--text-muted); font-size: 0.875rem; }

.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 1.25rem; }
.detail-section { padding: 1.75rem; border-radius: var(--radius); }
.detail-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.detail-section p { color: var(--text-muted); line-height: 1.8; }

/* TIMELINE */
.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before { content: ''; position: absolute; left: 0.4rem; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--accent), transparent); }
.timeline-item { display: flex; gap: 1rem; padding: 0.85rem 0; position: relative; }
.timeline-dot { position: absolute; left: -1.75rem; top: 1.15rem; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 8px var(--accent); }
.timeline-time { font-size: 0.77rem; color: var(--accent); font-weight: 700; white-space: nowrap; min-width: 95px; padding-top: 0.1rem; flex-shrink: 0; font-family: 'JetBrains Mono', monospace; }
.timeline-content p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.55; }

/* SIDEBAR */
.detail-sidebar { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: calc(var(--nav-height) + 1rem); }
.info-card, .tags-card { padding: 1.75rem; border-radius: var(--radius); }
.info-card h3, .tags-card h3 { font-size: 0.78rem; font-weight: 700; margin-bottom: 1.1rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }

dl { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1rem; align-items: start; }
dt { color: var(--text-dim); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding-top: 0.1rem; }
dd { font-size: 0.855rem; line-height: 1.45; }
.tags-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag { font-size: 0.73rem; background: var(--surface); border: 1px solid var(--border); padding: 0.22rem 0.65rem; border-radius: 6px; color: var(--text-muted); transition: all 0.2s; }
a.tag:hover { border-color: var(--accent); color: var(--accent); }

/* CONTENT GRID */
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.content-card { padding: 1.75rem; border-radius: var(--radius); transition: all 0.25s; position: relative; overflow: hidden; }
.content-card:hover { transform: translateY(-3px); border-color: var(--border-bright); }
.content-card h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.85rem; }
.content-card p { color: var(--text-muted); line-height: 1.75; font-size: 0.875rem; }
.content-card p + p { margin-top: 0.5rem; }

/* ELEMENTS */
.elements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.65rem; }
.element-card { padding: 0.8rem 0.5rem; border-radius: 10px; text-align: center; transition: all 0.2s; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.element-card:hover { transform: scale(1.08); box-shadow: var(--shadow); }
.element-number { font-size: 0.62rem; color: var(--text-dim); line-height: 1; font-family: 'JetBrains Mono', monospace; }
.element-symbol { font-size: 1.5rem; font-weight: 900; line-height: 1.1; }
.element-name { font-size: 0.6rem; color: var(--text-muted); line-height: 1.2; }
.element-mass { font-size: 0.56rem; color: var(--text-dim); }

.cat-nonmetal { border-left: 3px solid var(--chemistry); }
.cat-noble-gas { border-left: 3px solid var(--physics); }
.cat-alkali-metal { border-left: 3px solid var(--nuclear); }
.cat-alkaline-earth { border-left: 3px solid var(--major); }
.cat-halogen { border-left: 3px solid var(--serious); }
.cat-transition-metal { border-left: 3px solid var(--accent); }
.cat-actinide { border-left: 3px solid #f43f5e; }
.cat-metalloid { border-left: 3px solid #06b6d4; }
.cat-post-transition { border-left: 3px solid #a8a29e; }

/* ELEMENT HERO */
.element-hero { display: flex; align-items: center; gap: 2.5rem; padding: 4rem 2.5rem 3rem; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 2rem; background: linear-gradient(135deg, rgba(79,142,247,0.05), rgba(155,107,250,0.05)); position: relative; overflow: hidden; }
.element-huge-symbol { font-size: 6rem; font-weight: 900; line-height: 1; opacity: 0.9; letter-spacing: -0.05em; }
.element-number-large { font-size: 0.8rem; color: var(--accent); font-weight: 700; display: block; margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 1px; }
.element-hero-info h1 { font-size: 2.4rem; font-weight: 900; margin-bottom: 0.5rem; letter-spacing: -0.02em; }

.compound-formula { font-size: 1.9rem; font-weight: 900; color: var(--accent); margin-bottom: 0.6rem; font-family: 'JetBrains Mono', monospace; }

/* CHANGELOG */
.changelog-list { display: flex; flex-direction: column; gap: 2rem; }

.changelog-entry {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
}
.changelog-header {
  padding: 1.75rem 2rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}
.changelog-version { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.02em; font-family: 'JetBrains Mono', monospace; }
.changelog-date { font-size: 0.82rem; color: var(--text-muted); margin-left: auto; }
.changelog-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 3px 10px; border-radius: 6px; }
.tag-accent { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(79,142,247,0.3); }
.tag-chemistry { background: var(--chemistry-glow); color: var(--chemistry); border: 1px solid rgba(45,212,170,0.3); }
.tag-nuclear { background: var(--nuclear-glow); color: var(--nuclear); border: 1px solid rgba(247,79,79,0.3); }

.changelog-changes { padding: 1.5rem 2rem; display: flex; flex-direction: column; gap: 0.65rem; }
.change-item { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.875rem; color: var(--text-muted); line-height: 1.55; }
.change-badge { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 7px; border-radius: 4px; flex-shrink: 0; margin-top: 2px; }
.badge-new { background: rgba(45,212,170,0.15); color: var(--accent3); }
.badge-improved { background: rgba(79,142,247,0.15); color: var(--accent); }
.badge-fixed { background: rgba(247,169,79,0.15); color: var(--energy); }
.badge-removed { background: rgba(247,79,79,0.15); color: var(--nuclear); }

/* FOOTER */
.footer { background: var(--bg2); border-top: 1px solid var(--border); margin-top: 4rem; padding: 3.5rem 0 0; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem 3rem; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.6rem; line-height: 1.7; }
.footer-links { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-links h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-muted); font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.25rem 1.5rem; text-align: center; color: var(--text-dim); font-size: 0.78rem; }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }

/* MOBILE */
@media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr 300px; } .footer-container { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } .detail-sidebar { position: static; } .atom-visual { display: none; } }

@media (max-width: 768px) {
  .nav-links { position: fixed; top: var(--nav-height); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; padding: 1rem 1.5rem; display: none; z-index: 999; }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.7rem 0.75rem; font-size: 0.95rem; }
  .hamburger { display: flex; }
  .discord-btn span { display: none; }
  .guest-badge { display: none; }
  .footer-container { grid-template-columns: 1fr; gap: 1.5rem; }
  .back-btn { top: calc(var(--nav-height) + 8px); left: 8px; font-size: 0.78rem; padding: 0.38rem 0.75rem; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .filter-search { width: 100%; }
  .search-input { width: 100%; }
  .incident-card { flex-direction: column; gap: 0.75rem; }
  .incident-card .card-arrow { display: none; }
  .detail-meta-row { flex-direction: column; align-items: center; gap: 0.5rem; }
  .element-hero { flex-direction: column; text-align: center; gap: 1.25rem; padding: 3rem 1.25rem 2rem; }
  .element-huge-symbol { font-size: 4.5rem; }
  .beta-modal { padding: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .changelog-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .changelog-date { margin-left: 0; }
  dl { grid-template-columns: 1fr; gap: 0.3rem; }
  dt { padding-top: 0.6rem; }
}

@media (max-width: 480px) {
  .nav-container { padding: 0 1rem; }
  .sub-page { padding: 1rem 1rem 4rem; }
  .page-header { padding: 2.5rem 0 1.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .elements-grid { grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); }
  .hero-title { font-size: 1.9rem; }
  .detail-hero { padding: 3.5rem 1rem 2rem; }
  .changelog-changes { padding: 1.25rem; }
}

/* ===== NAVBAR ===== */

/* Desktop nav links */
.nav-desktop {
  display: flex; align-items: center; gap: 0.05rem; flex: 1;
}

/* Dropdown wrapper */
.nd { position: relative; }

.nd-toggle {
  display: flex; align-items: center; gap: 0.3rem;
  cursor: pointer; font-family: inherit; font-size: 0.82rem;
  background: none; border: none; color: var(--text-muted);
  padding: 0.42rem 0.72rem; border-radius: 10px; font-weight: 500;
  transition: all 0.2s; white-space: nowrap;
}
.nd-toggle:hover, .nd.open .nd-toggle { color: var(--text); background: var(--surface); }
.nd.active .nd-toggle { color: var(--accent); background: rgba(79,142,247,0.1); }
.nd-arrow { font-size: 0.65rem; transition: transform 0.2s; display: inline-block; }
.nd.open .nd-arrow { transform: rotate(180deg); }

/* Dropdown menu — pure CSS, no JS positioning */
.nd-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 200px;
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(24px);
  overflow: hidden;
  z-index: 3000;
  animation: ndIn 0.16s cubic-bezier(0.34,1.56,0.64,1);
}
/* Right-align for the "More" dropdown */
.nd-right .nd-menu { left: auto; right: 0; }
.nd.open .nd-menu { display: block; }

@keyframes ndIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.nd-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1rem; font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted); transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nd-item + .nd-item { border-top: 1px solid var(--border); }
.nd-item:hover { background: var(--surface-hover); color: var(--text); }
.nd-item.active { color: var(--accent); background: rgba(79,142,247,0.08); }

/* Mobile drawer — hidden on desktop */
.mobile-drawer { display: none; }

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .hamburger   { display: flex; }
  .signin-btn  { display: none !important; }
  .user-chip   { display: none !important; }

  .mobile-drawer {
    display: none;
    position: fixed; top: 68px; left: 0; right: 0;
    background: #060b18;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.75rem 1.25rem 1.5rem;
    z-index: 998;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  }
  .mobile-drawer.open {
    display: block;
  }

  .mob-link, .mob-sub, .mob-signout {
    display: block; padding: 0.62rem 0.5rem;
    font-size: 0.95rem; color: var(--text-muted);
    border-radius: 8px; transition: background 0.15s, color 0.15s;
  }
  .mob-link:hover, .mob-sub:hover { background: var(--surface); color: var(--text); }
  .mob-link.active, .mob-sub.active { color: var(--accent); }
  .mob-signout { color: var(--nuclear); }
  .mob-signout:hover { background: rgba(247,79,79,0.08); }

  .mob-group-toggle {
    width: 100%; text-align: left;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.62rem 0.5rem; font-size: 0.95rem;
    background: none; border: none; color: var(--text-muted);
    font-family: inherit; cursor: pointer; border-radius: 8px;
    transition: background 0.15s, color 0.15s;
  }
  .mob-group-toggle:hover { background: var(--surface); color: var(--text); }
  .mob-arrow { font-size: 0.65rem; transition: transform 0.2s; }
  .mob-group.open .mob-arrow { transform: rotate(180deg); }

  .mob-group-body {
    display: none; padding-left: 0.75rem;
    border-left: 2px solid rgba(79,142,247,0.3);
    margin: 0.1rem 0 0.25rem 0.5rem;
  }
  .mob-group.open .mob-group-body { display: block; }
  .mob-sub { font-size: 0.875rem !important; padding: 0.5rem 0.6rem !important; }

  .mob-signin {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; margin-top: 0.75rem; padding: 0.72rem;
    background: linear-gradient(135deg, var(--accent), #3b7de8);
    color: #fff; border: none; border-radius: 10px;
    font-size: 0.93rem; font-weight: 700; font-family: inherit;
    cursor: pointer; box-shadow: 0 4px 20px var(--accent-glow);
  }
}

/* ===== ELEMENT DETAIL EXTRA ===== */
.element-stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem; margin-top: 1.25rem;
}
.element-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.85rem 1rem; text-align: center;
}
.element-stat-value { display: block; font-size: 1.1rem; font-weight: 800; color: var(--accent); font-family: 'JetBrains Mono', monospace; margin-bottom: 0.2rem; }
.element-stat-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

.element-uses-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.element-uses-list li { font-size: 0.875rem; color: var(--text-muted); padding-left: 1.1rem; position: relative; line-height: 1.5; }
.element-uses-list li::before { content: '+'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.element-fun-fact {
  background: rgba(79,142,247,0.07); border: 1px solid rgba(79,142,247,0.2);
  border-radius: 12px; padding: 1rem 1.1rem; margin-top: 0.5rem;
  font-size: 0.875rem; color: var(--text-muted); line-height: 1.65;
}
.element-fun-fact strong { color: var(--accent); }

.state-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.state-solid { background: rgba(79,142,247,0.15); color: var(--accent); }
.state-liquid { background: rgba(45,212,170,0.15); color: var(--accent3); }
.state-gas { background: rgba(247,169,79,0.15); color: var(--energy); }

/* ═══════════════════════════════════════════════════════════
   AUTH OVERLAY
   ═══════════════════════════════════════════════════════════ */

.auth-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0); backdrop-filter: blur(0px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease, background 0.3s ease;
}
.auth-overlay.open {
  opacity: 1; pointer-events: all;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
}

.auth-modal {
  max-width: 440px; width: 100%;
  background: linear-gradient(145deg, rgba(12,21,48,0.98), rgba(8,14,31,0.98));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(79,142,247,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(28px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
  opacity: 0;
}
.auth-overlay.open .auth-modal { transform: translateY(0) scale(1); opacity: 1; }

.auth-modal-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
}

.auth-modal-inner { padding: 2.25rem 2.25rem 2rem; }

.auth-modal-close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; line-height: 1;
}
.auth-modal-close:hover { background: var(--surface-hover); color: var(--text); transform: scale(1.1); }

.auth-modal-head { text-align: center; margin-bottom: 1.75rem; position: relative; }
.auth-modal-logo { font-size: 2rem; margin-bottom: 0.5rem; filter: drop-shadow(0 0 12px rgba(79,142,247,0.5)); }
.auth-modal-head h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.3rem; }
.auth-modal-head p  { color: var(--text-muted); font-size: 0.85rem; }

/* Tab switcher */
.auth-tabs {
  display: flex; background: var(--surface); border-radius: 12px;
  padding: 3px; margin-bottom: 1.5rem; gap: 2px;
  border: 1px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 0.48rem 0.5rem; border-radius: 10px; border: none;
  background: none; color: var(--text-muted); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit; white-space: nowrap;
}
.auth-tab.active {
  background: rgba(79,142,247,0.15); color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(79,142,247,0.25);
}

/* Tab panels */
.auth-panel { display: none; }
.auth-panel.active { display: block; animation: authFadeIn 0.25s ease; }
@keyframes authFadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* OAuth buttons */
.auth-oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.65rem;
  width: 100%; padding: 0.78rem 1rem; border-radius: 12px; border: 1px solid var(--border);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
  font-family: inherit; text-decoration: none; margin-bottom: 0.65rem;
  background: var(--surface); color: var(--text);
}
.auth-oauth-btn:hover { background: var(--surface-hover); border-color: var(--border-bright); transform: translateY(-1px); }
.auth-oauth-btn.discord { background: rgba(88,101,242,0.12); border-color: rgba(88,101,242,0.3); color: #7b8ffb; }
.auth-oauth-btn.discord:hover { background: rgba(88,101,242,0.22); border-color: rgba(88,101,242,0.5); }
.auth-oauth-btn.google  { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); }
.auth-oauth-btn.google:hover  { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); }
.auth-oauth-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.1rem 0; color: var(--text-dim); font-size: 0.75rem;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Form fields */
.auth-field { margin-bottom: 0.8rem; }
.auth-field label {
  display: block; font-size: 0.73rem; font-weight: 700; color: var(--text-muted);
  margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.auth-field input {
  width: 100%; padding: 0.7rem 1rem; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text); font-size: 0.92rem; font-family: inherit;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}
.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: rgba(79,142,247,0.04); }

/* Submit button */
.auth-submit {
  width: 100%; padding: 0.78rem; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #3b7de8);
  color: #fff; font-size: 0.93rem; font-weight: 700; font-family: inherit;
  transition: all 0.2s; box-shadow: 0 4px 20px var(--accent-glow); margin-top: 0.4rem;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(79,142,247,0.5); }
.auth-submit:active { transform: translateY(0); }

/* Messages */
.auth-msg {
  padding: 0.6rem 0.9rem; border-radius: 10px; font-size: 0.82rem; margin-bottom: 0.85rem;
}
.auth-msg.error { color: var(--nuclear); background: rgba(247,79,79,0.08); border: 1px solid rgba(247,79,79,0.2); }
.auth-msg.success { color: #4ade80; background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.2); }
.auth-msg.info { color: var(--accent); background: rgba(79,142,247,0.08); border: 1px solid rgba(79,142,247,0.2); }

/* Footer links */
.auth-footer { text-align: center; margin-top: 1.1rem; font-size: 0.8rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); }
.auth-footer a:hover { text-decoration: underline; }

/* Verify code input */
.auth-code-input {
  font-size: 1.7rem !important; letter-spacing: 0.35em !important;
  text-align: center !important; font-weight: 800 !important;
  font-family: 'JetBrains Mono', monospace !important;
}

/* Sign in button in navbar */
.signin-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #3b7de8);
  color: #fff; padding: 0.45rem 1rem; border-radius: 10px;
  font-size: 0.82rem; font-weight: 600; transition: all 0.2s; white-space: nowrap;
  box-shadow: 0 4px 16px var(--accent-glow); border: none; cursor: pointer;
  font-family: inherit;
}
.signin-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(79,142,247,0.5); }

/* Light theme adjustments */
[data-theme="light"] .mobile-drawer {
  background: #f0f4ff;
  border-bottom-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .auth-modal {
  background: linear-gradient(145deg, rgba(240,244,255,0.98), rgba(230,236,252,0.98));
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
}
[data-theme="light"] .auth-field input { background: rgba(0,0,0,0.03); }
[data-theme="light"] .auth-field input:focus { background: rgba(79,142,247,0.05); }

@media (max-width: 768px) {
  .auth-overlay { align-items: flex-end; padding: 0; }
  .auth-modal { border-radius: 28px 28px 0 0; max-width: 100%; transform: translateY(100%); }
  .auth-overlay.open .auth-modal { transform: translateY(0); }
  .auth-modal-inner { padding: 1.75rem 1.5rem 2rem; }
}
