:root {
  --bg: #070707;
  --panel: #111;
  --border: rgba(255,221,0,.22);
  --accent: #ffdd00;
  --text: #f5f5f5;
  --muted: #999;
  color-scheme: dark;
}

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

html, body {
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(255,221,0,.07) 0%, transparent 35%), var(--bg);
  color: var(--text);
}

body { display: flex; flex-direction: column; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1.5rem;
  background: rgba(7,7,7,.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.brand { display: flex; flex-direction: column; gap: .1rem; }
.brand-main { font-size: 1.2rem; font-weight: 800; letter-spacing: .12em; color: var(--accent); }
.brand-sub  { font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a {
  color: var(--text); text-decoration: none; font-weight: 600;
  font-size: .9rem; letter-spacing: .02em;
  padding: .5rem .8rem; border-radius: 999px; border: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--accent); border-color: var(--border); }

.toolbar-right { display: flex; align-items: center; gap: .75rem; }

.discord-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(255,221,0,.45);
  background: rgba(255,255,255,.06);
  transition: border-color .15s, background .15s, transform .15s;
  flex-shrink: 0;
}
.discord-btn:hover { border-color: var(--accent); background: rgba(255,221,0,.12); transform: translateY(-1px); }
.discord-btn svg path { fill: #fff; }

.logout-btn {
  padding: .55rem 1.1rem; border-radius: 999px;
  border: 1px solid rgba(255,221,0,.35); background: transparent;
  color: var(--text); font: inherit; font-weight: 600; font-size: .85rem;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.logout-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem 1.75rem; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer; border: none;
  transition: opacity .15s, transform .15s;
}
.btn-primary  { background: var(--accent); color: #090909; }
.btn-secondary { border: 1px solid rgba(255,221,0,.4); background: transparent; color: var(--text); }
.btn-primary:hover, .btn-secondary:hover { opacity: .88; transform: translateY(-1px); }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Hero (index) ────────────────────────────────────────────────────────── */
.hero {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 5rem 2rem;
}
.hero-panel {
  width: min(860px, 100%);
  padding: 3rem; border-radius: 28px;
  border: 1px solid var(--border);
  background: rgba(17,17,17,.92);
  backdrop-filter: blur(12px);
}
.hero-panel h1 { font-size: clamp(2.8rem, 5vw, 4.5rem); letter-spacing: -.04em; margin-bottom: 1rem; }
.hero-panel p  { color: var(--muted); line-height: 1.8; margin-bottom: 2rem; }
.hero-actions  { display: flex; flex-wrap: wrap; gap: 1rem; }

.info-section {
  width: min(860px, 100%); margin: 0 auto;
  padding: 2rem; border-radius: 20px;
  border: 1px solid rgba(255,221,0,.14);
  background: rgba(14,14,14,.95);
}
.info-section h2 { font-size: 1.6rem; margin-bottom: .75rem; }
.info-section p  { color: var(--muted); line-height: 1.75; }

/* ── Login page ──────────────────────────────────────────────────────────── */
body.login-page {
  background:
    linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)),
    url("https://media.discordapp.net/attachments/1300192151342415953/1301298600508133406/image.png?ex=6a0add83&is=6a098c03&hm=6103e418f586dbe873143db1f91d3a2805ad9ee16ac88e5e19b14f2d58a50c9a&=&format=webp&quality=lossless&width=1651&height=468")
    center / cover no-repeat fixed;
}

.login-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 3rem 1.5rem;
}
.login-card {
  width: min(480px, 100%);
  padding: 2.5rem; border-radius: 28px;
  border: 1px solid var(--border);
  background: rgba(10,10,10,.88);
  backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 1.5rem;
}
.login-badge {
  display: inline-flex; align-self: flex-start;
  padding: .45rem .9rem; border-radius: 999px;
  border: 1px solid rgba(255,221,0,.4);
  background: rgba(255,221,0,.07);
  color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase;
}
.login-card h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.03em; }
.login-card p  { color: var(--muted); line-height: 1.75; }
.login-card .btn-primary { width: 100%; }

.error-panel {
  padding: 1.1rem 1.25rem; border-radius: 16px;
  border: 1px solid rgba(255,80,80,.35);
  background: rgba(255,60,60,.08);
}
.error-panel h3 { font-size: 1rem; margin-bottom: .4rem; color: #ff8a8a; }
.error-panel p  { font-size: .88rem; color: rgba(245,245,245,.75); line-height: 1.6; }

/* ── Application page ────────────────────────────────────────────────────── */
body.app-page {
  background:
    radial-gradient(circle at top left, rgba(255,221,0,.12), transparent 30%),
    linear-gradient(180deg, #0f0f0d 0%, #050505 100%);
}

.app-main { flex: 1; display: grid; gap: 2rem; padding: 1.5rem 1.5rem 4rem; }

.app-hero { padding: 2rem 0 .5rem; }
.app-hero-panel {
  width: min(1100px, 100%); margin: 0 auto;
  padding: 3rem; border-radius: 30px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,221,0,.07), rgba(255,255,255,.02)), rgba(12,12,12,.9);
  backdrop-filter: blur(12px);
}
.app-hero-panel .kicker {
  display: inline-flex; padding: .5rem .9rem; border-radius: 999px;
  border: 1px solid rgba(255,221,0,.28); background: rgba(255,221,0,.07);
  color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: 1.25rem;
}
.app-hero-panel h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -.04em; margin-bottom: 1rem; }
.app-hero-panel p  { color: rgba(245,245,245,.72); line-height: 1.85; max-width: 600px; }

.app-shell {
  width: min(1100px, 100%); margin: 0 auto;
  padding: 1.5rem; border-radius: 30px;
  border: 1px solid rgba(255,221,0,.14);
  background: rgba(9,9,9,.85);
  backdrop-filter: blur(12px);
}

.shell-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1.5rem; padding: 1rem 1rem 1.5rem;
}
.shell-head-left .label {
  display: inline-flex; padding: .45rem .85rem; border-radius: 999px;
  border: 1px solid rgba(255,221,0,.28); background: rgba(255,221,0,.07);
  color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: .85rem;
}
.shell-head-left h2 { font-size: clamp(1.8rem, 2.5vw, 2.6rem); letter-spacing: -.03em; margin-bottom: .6rem; }
.shell-head-left p  { color: rgba(245,245,245,.68); line-height: 1.75; max-width: 580px; }
.shell-meta { display: grid; gap: .6rem; min-width: 200px; }
.shell-meta span {
  padding: .75rem 1rem; border-radius: 14px; text-align: center;
  border: 1px solid rgba(255,221,0,.15);
  background: linear-gradient(180deg, rgba(255,221,0,.07), rgba(255,221,0,.02));
  color: rgba(255,245,204,.9); font-size: .88rem;
}

/* login gate & status panel */
.login-gate {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0 1rem 1.25rem; padding: 1.25rem 1.5rem; border-radius: 20px;
  border: 1px solid rgba(255,221,0,.22);
  background: linear-gradient(135deg, rgba(255,221,0,.1), rgba(255,221,0,.03));
}
.login-gate p { color: var(--text); line-height: 1.6; }

.status-panel {
  margin: 0 1rem 1.25rem; padding: 1.5rem; border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,221,0,.09), rgba(255,255,255,.02));
}
.status-panel h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.status-panel p  { color: rgba(245,245,245,.72); line-height: 1.75; }

/* progress */
.progress { padding: 0 .5rem 1rem; display: grid; gap: .75rem; }
.progress-row { display: flex; justify-content: space-between; align-items: center; }
.progress-label { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,245,204,.7); }
.progress-count { font-size: .95rem; font-weight: 700; }
.progress-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.progress-fill {
  height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,221,0,.9), #fff4ba);
  box-shadow: 0 0 20px rgba(255,221,0,.3);
  transition: width .22s ease;
}

/* question steps */
.app-form { display: grid; gap: 1rem; }

.step {
  display: none; min-height: 400px;
  padding: 2rem; border-radius: 24px;
  border: 1px solid rgba(255,221,0,.13);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent), rgba(15,15,15,.92);
  backdrop-filter: blur(12px);
  grid-template-rows: auto 1fr auto; gap: 1.5rem;
}
.step.active { display: grid; }

.step-head { display: grid; gap: .75rem; }
.step-num {
  display: inline-flex; width: fit-content;
  padding: .45rem .85rem; border-radius: 999px;
  border: 1px solid rgba(255,221,0,.28); background: rgba(255,221,0,.07);
  color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase;
}
.step-head h3 { font-size: clamp(1.8rem, 2.5vw, 2.4rem); letter-spacing: -.04em; }

.field { display: grid; gap: .5rem; }
.field label { font-size: .92rem; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; padding: .9rem 1rem;
  border: 1px solid rgba(255,221,0,.14); border-radius: 14px;
  background: rgba(5,5,5,.98); color: var(--text);
  font: inherit; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(245,245,245,.3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: rgba(255,221,0,.5);
  box-shadow: 0 0 0 3px rgba(255,221,0,.07);
}
.field textarea { min-height: 120px; resize: vertical; }

.step-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.step-actions .btn-secondary, .step-actions .btn-primary { min-width: 130px; }

/* ── Admin page ──────────────────────────────────────────────────────────── */
.admin-board { display: grid; gap: 1.25rem; padding: .5rem 1rem 1rem; }
.admin-board-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.admin-board-head h3 { font-size: 1.4rem; }

.admin-list { display: grid; gap: 1rem; }

.admin-card {
  padding: 1.5rem; border-radius: 22px;
  border: 1px solid rgba(255,221,0,.13);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent), rgba(15,15,15,.92);
}
.admin-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1.5rem; margin-bottom: 1.25rem;
}
.admin-card-head .status-badge {
  display: inline-flex; padding: .35rem .75rem; border-radius: 999px;
  border: 1px solid rgba(255,221,0,.28); background: rgba(255,221,0,.07);
  color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: .6rem;
}
.admin-card-head h4 { font-size: 1.4rem; margin-bottom: .3rem; }
.admin-card-head p  { color: var(--muted); font-size: .88rem; }

.admin-actions { display: grid; gap: .6rem; min-width: 160px; }
.admin-actions .btn-primary, .admin-actions .btn-secondary { width: 100%; padding: .7rem 1rem; }

.admin-reviewed { display: grid; gap: .3rem; min-width: 160px; }
.admin-reviewed span { font-size: .82rem; color: var(--muted); }

.answers-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem;
}
.answer-item {
  padding: .9rem 1rem; border-radius: 14px;
  border: 1px solid rgba(255,221,0,.09);
  background: rgba(6,6,6,.88);
}
.answer-item strong { display: block; font-size: .82rem; margin-bottom: .35rem; color: rgba(255,255,255,.9); }
.answer-item p { font-size: .88rem; color: rgba(245,245,245,.7); line-height: 1.6; white-space: pre-wrap; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { text-align: center; padding: 1.5rem 2rem 3rem; color: var(--muted); font-size: .88rem; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .shell-head { flex-direction: column; align-items: flex-start; }
  .shell-meta { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .answers-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: .6rem; padding: .5rem 1rem; }
  .nav { gap: .75rem; flex-wrap: wrap; justify-content: center; width: 100%; }
  .nav a { padding: .35rem .6rem; font-size: .82rem; }
  .hero { padding: 3rem 1rem; }
  .app-main { padding: .75rem 1rem 3rem; }
  .app-hero-panel, .app-shell, .step, .login-card { padding: 1.25rem; }
  .shell-meta { grid-template-columns: 1fr; }
  .login-gate { flex-direction: column; align-items: flex-start; }
  .step-actions { flex-direction: column; }
  .step-actions .btn-secondary, .step-actions .btn-primary { width: 100%; }
  .admin-card-head { flex-direction: column; }
  .admin-actions, .admin-reviewed { width: 100%; }
}
