:root {
  --bg: #0b0f17;
  --bg-elev: #121826;
  --text: #e6e8ee;
  --muted: #a1a7b8;
  --border: #1f2636;
  --primary-1: #7c3aed;
  --primary-2: #3b82f6;
  --danger: #ef4444;
}

* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 80% -10%, rgba(124,58,237,0.12), transparent 60%),
              radial-gradient(800px 600px at -20% 10%, rgba(59,130,246,0.14), transparent 50%),
              var(--bg);
  color: var(--text);
}

.container { width: min(1100px, 92vw); margin: 0 auto }

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.6);
  backdrop-filter: saturate(1.2) blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 }
.brand { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .2px }
.nav-actions { display: flex; align-items: center; gap: 12px }
.nav-links { display: flex; align-items: center; gap: 8px }
.nav-link { color: var(--muted); text-decoration: none; padding: 8px 16px; border-radius: 8px; font-weight: 500; transition: all 0.2s }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.05) }
.nav-link.active { color: var(--text); background: rgba(124,58,237,0.2) }

.btn { font-weight: 600; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); cursor: pointer }
.btn:hover { border-color: #2a334a }
.btn-primary { background: linear-gradient(90deg, var(--primary-1), var(--primary-2)); border: none }
.btn-primary:hover { filter: brightness(1.08) }
.btn:disabled { opacity: .6; cursor: not-allowed }

.hero { padding: 36px 0 10px }
.hero h1 { margin: 0 0 8px 0; font-size: 28px }
.muted { color: var(--muted) }

/* Landing Page */
.landing-main { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 70px) }
.landing-hero { text-align: center; max-width: 800px; width: 100%; animation: fadeInUp 0.8s ease-out }
.landing-title { 
  font-size: clamp(48px, 10vw, 88px); 
  font-weight: 800; 
  margin: 0 0 20px 0;
  background: linear-gradient(120deg, var(--primary-1), var(--primary-2), var(--primary-1));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite, textGlow 0.5s ease-out;
  letter-spacing: -2px;
}
.landing-subtitle {
  font-size: 24px;
  color: var(--muted);
  margin: 0 0 40px 0;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}
.btn-large {
  padding: 16px 40px;
  font-size: 18px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  transition: all 0.3s ease;
}
.btn-large:hover { transform: scale(1.05); filter: brightness(1.15) }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px) }
  to { opacity: 1; transform: translateY(0) }
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% center }
  50% { background-position: 100% center }
}
@keyframes textGlow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(124,58,237,0.3)) }
  50% { filter: drop-shadow(0 0 40px rgba(59,130,246,0.5)) }
}
.hint { margin-top: 12px; display: inline-flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px dashed var(--border); border-radius: 10px; background: rgba(18,24,38,.6) }
.hint a { color: var(--primary-2); text-decoration: none }
.hint a:hover { text-decoration: underline }

.card { border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); box-shadow: 0 8px 30px rgba(0,0,0,.25) }
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--border) }
.card-body { padding: 20px }

.stat { display: grid; grid-template-columns: 170px 1fr; align-items: center; padding: 10px 0 }
.stat-label { color: var(--muted) }
.stat-value { font-size: 22px; font-weight: 700 }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace }

.user-menu { position: relative }
.user-chip { display: inline-flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); cursor: pointer }
.user-chip .avatar { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center }
.user-label { font-weight: 600 }
.chevron { opacity: .7 }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 180px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev); box-shadow: 0 12px 28px rgba(0,0,0,.35); padding: 8px; display: none }
.dropdown-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; border: none; background: transparent; cursor: pointer }
.dropdown-item:hover { background: rgba(255,255,255,.05) }
.dropdown-item.danger { color: #ffb4b4 }
.dropdown hr { opacity: .6 }

.hidden { display: none }

/* Profile page */
.profile-header { display: flex; align-items: center; gap: 12px }
.badge { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: rgba(18,24,38,.6) }

