:root {
  color-scheme: dark;
  --bg: #11131b;
  --panel: #191c27;
  --panel-2: #1d202d;
  --line: #2b2f3d;
  --text: #f3f4f8;
  --muted: #9a9daf;
  --accent: #a895ff;
  --accent-strong: #8d78fa;
  --green: #67dfac;
  --red: #ff8291;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "DM Sans", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
.topbar, footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar { border-bottom: 1px solid rgba(255,255,255,.055); }
.brand { display: inline-flex; gap: 10px; align-items: center; font: 800 17px Manrope, sans-serif; letter-spacing: -.4px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: #14131d; background: var(--accent); font: 800 16px Manrope, sans-serif; }
nav, .hero-actions, .dashboard-user { display: flex; align-items: center; gap: 24px; }
nav a:not(.button), .muted, .hero-note, .section-heading > p, .feature-card p, .panel-heading p, .dashboard-heading p, footer > span { color: var(--muted); }
nav a:not(.button) { font-size: 13px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.button-primary { color: #161321; background: var(--accent); }
.button-primary:hover { background: #b5a7ff; }
.button-muted { background: #20232f; border-color: #303342; }
.button-danger { color: #fff; background: #8d3948; border-color: #a64758; }
.button-small { min-height: 38px; padding: 0 14px; font-size: 13px; }
.hero { position: relative; width: min(1120px, calc(100% - 48px)); min-height: 540px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-copy { position: relative; z-index: 1; max-width: 640px; padding: 72px 0; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #c1b6ff; letter-spacing: .2px; text-transform: none; font-size: 13px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(103,223,172,.55); }
.status-dot.status-offline { background: var(--red); box-shadow: 0 0 12px rgba(255,130,145,.4); }
h1, h2, h3, p { margin-top: 0; }
.hero h1, .dashboard-heading h1 { margin: 21px 0 16px; font: 800 clamp(38px, 5vw, 58px)/1.14 Manrope, sans-serif; letter-spacing: -2.4px; }
.hero h1 span { color: var(--accent); }
.hero-copy > p { max-width: 535px; color: #b0b2c0; font-size: 16px; line-height: 1.8; }
.hero-actions { margin-top: 27px; gap: 12px; }
.hero-note { margin-top: 15px; font-size: 12px; }
.hero-glow { position: absolute; z-index: 0; width: 400px; height: 400px; right: 100px; top: 65px; background: #6951db; opacity: .13; filter: blur(130px); border-radius: 50%; pointer-events: none; }
.status-card { position: relative; z-index: 1; flex: 0 0 285px; padding: 26px; border: 1px solid #303343; border-radius: 18px; background: linear-gradient(145deg, #1d202d, #171923); box-shadow: 0 24px 70px rgba(0,0,0,.2); }
.status-card-head, .status-row { display: flex; align-items: center; justify-content: space-between; }
.status-icon { color: var(--accent); font-size: 23px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid rgba(103,223,172,.2); border-radius: 20px; color: var(--green); background: rgba(103,223,172,.07); font-size: 11px; font-weight: 700; }
.pill-offline { border-color: rgba(255,130,145,.2); color: var(--red); background: rgba(255,130,145,.07); }
.status-number { margin-top: 24px; font: 800 44px Manrope, sans-serif; }
.status-label, .status-row { color: var(--muted); font-size: 13px; }
.status-divider { height: 1px; margin: 24px 0 14px; background: var(--line); }
.status-row { padding: 7px 0; }
.status-row strong { color: var(--text); font-weight: 600; }
.section { width: min(1120px, calc(100% - 48px)); margin: auto; }
.features { padding: 55px 0 84px; border-top: 1px solid rgba(255,255,255,.055); }
.section-heading { text-align: center; }
.section-heading h2 { margin: 11px 0 8px; font: 800 32px Manrope, sans-serif; letter-spacing: -1px; }
.section-heading > p { margin-bottom: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.feature-card, .panel { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.feature-card { padding: 23px; }
.feature-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--accent); background: rgba(168,149,255,.12); font-size: 20px; }
.feature-card h3 { margin: 17px 0 6px; font: 700 16px Manrope, sans-serif; }
.feature-card p { margin: 0; font-size: 13px; line-height: 1.7; }
code { color: #c6baff; font: 12px "DM Sans", sans-serif; }
.setup { padding: 24px 0 70px; }
.setup-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin: 32px 0 22px; }
.setup-steps > div { display: flex; align-items: flex-start; gap: 12px; color: #c1c2ce; font-size: 13px; }
.setup-steps span { color: var(--accent); font: 700 13px Manrope, sans-serif; }
.setup-steps p { margin: 0; }
.text-link { color: var(--accent); font-size: 13px; font-weight: 700; }
footer { min-height: 85px; border-top: 1px solid rgba(255,255,255,.055); font-size: 12px; }
.dashboard-page { min-height: 100vh; display: flex; flex-direction: column; }
.dashboard-main { width: min(1120px, calc(100% - 48px)); flex: 1; margin: 0 auto; padding: 52px 0 72px; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 25px; }
.dashboard-heading h1 { margin: 8px 0; font-size: 34px; letter-spacing: -1px; }
.dashboard-heading p { margin: 0; font-size: 13px; }
.dashboard-user { gap: 11px; }
.user-name { font-size: 13px; font-weight: 600; }
.user-avatar { width: 30px; height: 30px; object-fit: cover; border-radius: 50%; }
.panel { padding: 22px; }
.guild-picker { max-width: 480px; }
#guild-picker { max-width: 480px; margin-bottom: 18px; }
label { display: block; margin: 0 0 7px; color: #c9cad4; font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; color: var(--text); background: #12141d; border: 1px solid #343747; border-radius: 9px; outline: none; }
input, select { min-height: 43px; padding: 0 12px; }
textarea { min-height: 100px; padding: 11px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(141,120,250,.12); }
.panel > label + select { margin-bottom: 12px; }
.notice { margin: 16px 0; padding: 12px 15px; border: 1px solid #644d25; border-radius: 9px; color: #efd39a; background: #332b1b; font-size: 13px; }
.empty-state { margin: 30px 0; padding: 60px 20px; text-align: center; border: 1px dashed #383b4a; border-radius: 15px; background: rgba(25,28,39,.55); }
.empty-icon { margin-bottom: 8px; color: var(--accent); font-size: 29px; }
.empty-state h2 { margin-bottom: 7px; font: 700 20px Manrope, sans-serif; }
.empty-state p { margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
.guild-summary { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.guild-avatar { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; overflow: hidden; border-radius: 15px; color: #171522; background: var(--accent); font: 800 20px Manrope, sans-serif; }
.guild-avatar img { width: 100%; height: 100%; object-fit: cover; }
.guild-title { flex: 1; min-width: 0; }
.guild-title h2 { overflow: hidden; margin: 0 0 2px; font: 700 17px Manrope, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.guild-title .muted, .guild-stat span { font-size: 11px; }
.guild-stat { display: grid; gap: 1px; text-align: right; }
.guild-stat strong { font: 700 17px Manrope, sans-serif; }
.guild-stat span { color: var(--muted); }
.manage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0 0 2px; font: 700 16px Manrope, sans-serif; }
.panel-heading p { margin: 0; font-size: 12px; }
.panel form > label:not(:first-child) { margin-top: 14px; }
.form-hint { margin: 8px 0 15px; color: var(--muted); font-size: 11px; }
.panel form > .button { margin-top: 1px; }
.button-row { display: flex; gap: 10px; margin-top: 17px; }
.button-row .button { flex: 1; }
.toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: min(420px, calc(100% - 44px)); padding: 12px 16px; border: 1px solid #3c4651; border-radius: 10px; color: var(--text); background: #242a34; box-shadow: 0 12px 35px rgba(0,0,0,.3); font-size: 13px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }
.toast-visible { opacity: 1; transform: translateY(0); }
.toast-error { border-color: #74434c; background: #39232a; }

@media (max-width: 800px) {
  .hero { min-height: auto; padding: 28px 0 46px; }
  .hero-copy { padding: 48px 0; }
  .hero-glow { right: 0; }
  .status-card { flex-basis: 240px; padding: 20px; }
  .feature-grid { gap: 11px; }
  .feature-card { padding: 18px; }
}
@media (max-width: 640px) {
  .topbar, footer, .hero, .section, .dashboard-main { width: min(100% - 32px, 520px); }
  .topbar { min-height: 68px; }
  nav { gap: 12px; }
  nav a:not(.button) { display: none; }
  .hero { display: block; }
  .hero-copy { padding: 47px 0 29px; }
  .hero h1 { font-size: 39px; letter-spacing: -1.7px; }
  .hero-copy > p { font-size: 14px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .status-card { max-width: 350px; }
  .features { padding: 48px 0; }
  .feature-grid, .setup-steps, .manage-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 20px; }
  .setup { padding: 5px 0 45px; }
  .setup-steps { gap: 15px; }
  footer > span { max-width: 150px; text-align: right; }
  .dashboard-main { padding: 35px 0 50px; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .dashboard-heading h1 { font-size: 28px; }
  .dashboard-user { gap: 7px; }
  .guild-summary { flex-wrap: wrap; gap: 12px; }
  .guild-title { min-width: calc(100% - 70px); }
  .guild-stat { min-width: 30%; flex: 1; text-align: left; }
  .guild-stat:nth-of-type(3) { text-align: center; }
  .guild-stat:nth-of-type(4) { text-align: right; }
}
