:root {
  --bg: #07060b;
  --bg-card: #100e18;
  --border: #221f30;
  --purple: #9b5cff;
  --purple-2: #6d28d9;
  --purple-glow: rgba(155, 92, 255, 0.35);
  --text: #f2f0f7;
  --text-muted: #9d97ad;
  --discord: #5865f2;
  --google: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 24px 5%;
}

.brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.brand span { color: var(--purple); }

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 60px auto 40px;
  padding: 0 20px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.grad {
  background: linear-gradient(90deg, var(--purple), #d6b3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 36px;
  line-height: 1.5;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 340px;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-discord {
  background: var(--discord);
  color: white;
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.35);
}
.btn-discord:hover { box-shadow: 0 0 32px rgba(88, 101, 242, 0.55); }

.btn-google {
  background: white;
  color: #1f1f1f;
}
.btn-google:hover { box-shadow: 0 0 24px rgba(255, 255, 255, 0.25); }

.btn-primary {
  background: linear-gradient(90deg, var(--purple-2), var(--purple));
  color: white;
  box-shadow: 0 0 24px var(--purple-glow);
  width: 100%;
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-primary:not(:disabled):hover { box-shadow: 0 0 32px var(--purple-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--purple); }

.hero-note {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.features {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.5; }

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px;
}

/* ---- Setup / Dashboard shared bits ---- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
}

.setup-main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 60px 20px;
}

.setup-card { max-width: 420px; width: 100%; }
.setup-card h1 { margin: 0 0 8px; font-size: 26px; }
.muted { color: var(--text-muted); font-size: 14px; margin: 0 0 20px; }

.field {
  display: block;
  margin-bottom: 16px;
}
.field span {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  background: #0c0a13;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  font-family: inherit;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-glow);
}

.hint { color: var(--text-muted); font-size: 12px; margin: -8px 0 14px; }

.status-msg { min-height: 18px; font-size: 13px; margin-bottom: 14px; }
.status-ok { color: #6ee7a0; }
.status-error { color: #ff6b6b; }

/* Dashboard */

.dash-body { padding-bottom: 60px; }

.dash-nav {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  border-bottom: 1px solid var(--border);
}
.dash-nav-right { display: flex; align-items: center; gap: 16px; }
.dash-user { color: var(--text-muted); font-size: 14px; }

.dash-main {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px;
}
.dash-main h1 { margin: 0 0 6px; font-size: 30px; }

.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.save-status { margin-left: 12px; color: var(--text-muted); font-size: 13px; }

.preview-card h2 { margin-top: 0; }
.profile-preview { text-align: center; padding-top: 8px; }
.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--purple-2), var(--purple));
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 24px var(--purple-glow);
}
.preview-name { font-weight: 700; font-size: 18px; }
.preview-handle { color: var(--text-muted); font-size: 13px; margin: 4px 0 14px; }
.preview-bio { color: var(--text); font-size: 14px; line-height: 1.5; }

@media (max-width: 720px) {
  .hero h1 { font-size: 38px; }
  .features { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}
