:root {
  --bg: #0A0E17;
  --panel: #121828;
  --panel-border: #1A2236;
  --accent: #148EFF;
  --accent-glow: rgba(20, 142, 255, 0.35);
  --text: #E8EDF7;
  --text-muted: #8B9BB4;
  --danger: #EF4444;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, #101a30 0%, var(--bg) 55%);
  color: var(--text);
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--panel-border);
  background: rgba(10, 14, 23, 0.85);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .nav-cta {
  color: #fff;
  background: var(--accent);
  padding: 9px 18px;
  border-radius: 6px;
  box-shadow: 0 0 18px var(--accent-glow);
}

.nav-links .nav-cta:hover {
  color: #fff;
  filter: brightness(1.1);
}

/* ---------- Main / layout ---------- */

.site-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 32px;
}

.site-footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--panel-border);
}

.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  transition: color 0.15s ease;
}

.discord-link:hover {
  color: var(--accent);
}

.discord-link span {
  font-size: 13px;
}

.discord-link img {
  height: 32px;
  width: auto;
  padding: 6px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel);
  transition: border-color 0.15s ease;
}

.discord-link:hover img {
  border-color: var(--accent);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Hero (Index page) ---------- */

.hero {
  text-align: center;
  padding: 24px 0 40px;
}

.hero-banner {
  display: block;
  margin: 0 auto 20px;
  width: 100%;
  height: auto;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.hero h1 span {
  color: var(--accent);
  text-shadow: 0 0 24px var(--accent-glow);
}

.hero p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 56px;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 24px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Auth forms ---------- */

.auth-card {
  max-width: 380px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.auth-card h1 {
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 24px;
  text-align: center;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 11px 14px;
  background: #0D1220;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn-primary {
  width: 100%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
}

.field-hint {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 6px;
}

.field input:disabled {
  color: var(--text-muted);
  background: #0A0E17;
  cursor: not-allowed;
}

/* ---------- Update Account (two-column: form + field help) ---------- */

/* The card must sit at the true center of the SCREEN, not at the center of the [card + help panel]
   pair - a flex row with justify-content:center centers the pair, which visibly drags the card off
   true-center by roughly half the panel's width. So the card centers itself the normal way (its own
   "margin: 0 auto", same as Login/Register), and the help panel is pinned beside it with an absolute
   offset computed from the card's own max-width (380px) - it can't affect the card's position at all
   this way, no matter the viewport width. */
.update-account-layout {
  position: relative;
}

.field-help-panel {
  width: 260px;
  position: absolute;
  left: calc(50% + 190px + 24px); /* 190 = half of .auth-card's 380px max-width; 24 = gap */
  top: 0;
}

.field-help-text {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  min-height: 96px;
}

@media (max-width: 760px) {
  .field-help-panel {
    width: 100%;
    max-width: 380px;
    position: static;
  }
}

.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

.form-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86EFAC;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
}

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

.dashboard-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 36px;
  text-align: center;
}

.dashboard-card h1 {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 22px;
}

.dashboard-card .username {
  color: var(--accent);
}

.dashboard-card p {
  color: var(--text-muted);
  font-size: 14px;
}
