:root {
  --bg: #12100e;
  --bg-raised: #1c1915;
  --text: #f3ece2;
  --muted: #b8ab98;
  --accent: #e7a33e;
  --accent-dark: #b97a1f;
  --border: #2e2922;
  --radius: 14px;
  --max: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: rgba(18, 16, 14, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.nav nav { display: flex; align-items: center; gap: 1.25rem; }
.nav nav a:not(.btn) { color: var(--muted); }
.nav nav a:not(.btn):hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1206;
  font-weight: 700;
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-small { padding: 0.45rem 1rem; font-size: 0.9rem; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-raised); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 78vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1.5rem;
}
.spots {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 10% 20%, var(--accent) 0 18px, transparent 19px),
    radial-gradient(circle at 80% 30%, var(--accent) 0 26px, transparent 27px),
    radial-gradient(circle at 25% 75%, var(--accent) 0 22px, transparent 23px),
    radial-gradient(circle at 65% 80%, var(--accent) 0 14px, transparent 15px),
    radial-gradient(circle at 90% 70%, var(--accent) 0 20px, transparent 21px),
    radial-gradient(circle at 45% 15%, var(--accent) 0 12px, transparent 13px);
  background-size: 420px 420px;
  mask-image: radial-gradient(ellipse at center, transparent 20%, black 75%);
}
.hero-content { position: relative; max-width: 720px; }
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.1; margin-bottom: 1.25rem; }
.accent { color: var(--accent); }
.lead { color: var(--muted); font-size: 1.2rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 5rem 1.5rem; }
.section h2 { font-size: 2rem; margin-bottom: 1rem; }
.section > p { color: var(--muted); max-width: 640px; font-size: 1.1rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); }

.join { text-align: center; }
.join > p { margin: 0 auto 1.75rem; }

.footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Auth */
.auth { display: flex; align-items: center; gap: 0.9rem; }
.auth:empty { display: none; }
.user { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.avatar { border-radius: 50%; }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--muted); font: inherit;
}
.linkish:hover { color: var(--text); }
button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
button.btn-ghost { border: 1px solid var(--border); }

a.user:hover span { text-decoration: underline; }
.avatar-fallback {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  background: var(--accent); color: #1a1206;
  font-size: 0.85rem; font-weight: 800;
}

/* Login / profile pages */
.auth-page { min-height: calc(100vh - 140px); display: grid; place-items: start center; padding: 4rem 1.25rem; }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.auth-card.wide { max-width: 560px; }
.card-title { font-size: 1.6rem; line-height: 1.2; margin-bottom: 0.25rem; }
.tabs { display: flex; gap: 0.25rem; background: var(--bg); padding: 0.25rem; border-radius: 999px; margin-bottom: 1.5rem; }
.tab {
  flex: 1; border: 0; background: none; color: var(--muted);
  padding: 0.55rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--bg-raised); color: var(--text); }
.form { display: grid; gap: 1.1rem; }
.form label { display: grid; gap: 0.4rem; font-weight: 600; font-size: 0.95rem; }
.form input, .form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  font: inherit; font-weight: 400;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form button:disabled, .form input:disabled { opacity: 0.6; cursor: wait; }
.hint { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.btn-block { width: 100%; text-align: center; }
.small { font-size: 0.9rem; justify-self: center; }
.message { margin-top: 1.1rem; padding: 0.75rem 1rem; border-radius: 10px; font-size: 0.95rem; }
.message.error { background: rgba(220, 80, 60, 0.12); border: 1px solid rgba(220, 80, 60, 0.4); color: #f3b4a8; }
.message.success { background: rgba(80, 180, 110, 0.12); border: 1px solid rgba(80, 180, 110, 0.4); color: #a9e2b9; }
.message.info { background: rgba(231, 163, 62, 0.1); border: 1px solid rgba(231, 163, 62, 0.4); color: var(--accent); }
.message + .btn { margin-top: 1rem; }
.divider { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.85rem; margin: 1.5rem 0 1.25rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }
.profile-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.profile-head .muted { margin: 0; overflow-wrap: anywhere; }
.avatar-lg {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent); color: #1a1206; font-size: 1.6rem; font-weight: 800;
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

/* Admin */
.page-title { font-size: 2.2rem; margin-bottom: 0.5rem; }
.muted { color: var(--muted); margin-bottom: 1rem; }
#panel h2 { margin-top: 2rem; font-size: 1.4rem; margin-bottom: 0.5rem; }
code { background: var(--bg-raised); padding: 0.1rem 0.35rem; border-radius: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: 0.9rem; background: var(--bg-raised); }
.table tr:last-child td { border-bottom: 0; }

/* 404 */
.notfound { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.notfound h1 { margin-bottom: 0.5rem; }
.notfound p { color: var(--muted); margin-bottom: 1.5rem; }

@media (max-width: 560px) {
  .nav nav a:not(.btn) { display: none; }
}
