:root {
  --bg: #0f1115;
  --panel: #181b22;
  --panel-2: #1f232c;
  --border: #2a2f3a;
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --ok: #3ba55d;
  --danger: #ed4245;
  --gold: #f0b232;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5;
}
h1, h2 { margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.25rem; background: var(--panel); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.userbox { display: flex; align-items: center; gap: .6rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); }
.container { max-width: 880px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.hero { padding: 2.5rem 1.5rem; text-align: center; }
.hero p { color: var(--muted); margin-bottom: 1.5rem; }

.btn {
  display: inline-block; border: 0; border-radius: 8px; padding: .55rem 1rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--panel-2); }
.btn:focus-visible, .switch input:focus-visible + .slider, .server-card:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.server-card {
  display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 1.25rem 1rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font: inherit; cursor: pointer; text-align: center;
}
.server-card:hover { border-color: var(--accent); background: var(--panel-2); }
.server-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--panel-2);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.3rem; object-fit: cover;
}
.server-name { font-weight: 600; word-break: break-word; }

#backBtn { margin-bottom: 1rem; }
.list { margin-top: 1rem; overflow: hidden; }
.feature-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: 0; }
.feature-info { min-width: 0; }
.feature-name { font-weight: 600; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.feature-desc { color: var(--muted); font-size: .92rem; }
.badge {
  font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px;
  background: rgba(240,178,50,.15); color: var(--gold); border: 1px solid rgba(240,178,50,.4);
}

.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.slider { position: absolute; inset: 0; background: #3a4050; border-radius: 999px; transition: background .15s; pointer-events: none; }
.slider::before {
  content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .15s;
}
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .slider { opacity: .45; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--border); padding: .7rem 1.1rem;
  border-radius: 10px; max-width: 90vw; box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
.toast.error { border-color: var(--danger); }
[hidden] { display: none !important; }
@media (max-width: 480px) { .feature-row { padding: .85rem 1rem; } }
