:root {
  --bg: #0b0c10;
  --card: #14151c;
  --card-border: #23242e;
  --text: #edEDf2;
  --muted: #8b8d9b;
  --accent: #7c5cff;
  --accent-soft: #a78bfa;
  --error: #f76a6a;
  --success: #4ade80;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
}

/* ---------- Ambient gate animation ---------- */

.rings {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--card-border);
}

.ring-1 { width: 420px; height: 420px; animation: spin 40s linear infinite; }
.ring-2 { width: 620px; height: 620px; border-style: dashed; opacity: 0.5; animation: spin 70s linear infinite reverse; }
.ring-3 { width: 860px; height: 860px; opacity: 0.25; animation: spin 110s linear infinite; }

.ring-core {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,0.35), transparent 70%);
  filter: blur(4px);
  animation: pulse 5s ease-in-out infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ring, .ring-core { animation: none; }
}

/* ---------- Card ---------- */

.card {
  position: relative;
  z-index: 1;
  width: min(420px, 90vw);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--accent-soft);
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  margin: 0 0 12px;
}

.sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 28px;
}

.login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.login-btn:hover { background: #6d4df2; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-btn:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

.discord-mark { flex-shrink: 0; }

.status {
  min-height: 20px;
  margin: 18px 0 0;
  font-size: 13px;
}

.status.error { color: var(--error); }
.status.success { color: var(--success); }

.card.shake { animation: shake 0.4s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* ---------- Dashboard ---------- */

.dash-card {
  position: relative;
  z-index: 1;
  width: min(480px, 90vw);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  animation: reveal 0.6s ease both;
}

@keyframes reveal {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  margin-bottom: 16px;
}

.dash-card h1 {
  font-size: 24px;
  margin: 0 0 6px;
}

.dash-card .sub {
  margin-bottom: 24px;
}

.logout-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.logout-btn:hover { border-color: var(--accent-soft); color: var(--text); }
