:root {
  --bg: #0f1115;
  --bg-card: #171a21;
  --bg-input: #1e222b;
  --border: #2a2f3a;
  --text: #e6e8ec;
  --text-muted: #8b92a5;
  --accent: #7c5cff;
  --accent-2: #00d4aa;
  --accent-3: #ff6b6b;
  --accent-4: #3b82f6;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(15,17,21,.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  font-weight: 700; font-size: 1.35rem; letter-spacing: -0.03em;
  color: var(--text);
}
.logo span { color: var(--accent); }
nav { display: flex; gap: 1.5rem; }
nav a { color: var(--text-muted); font-size: .9rem; }
nav a:hover, nav a.active { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: .75rem;
}
.hero p { color: var(--text-muted); max-width: 480px; margin: 0 auto 2rem; }

/* Cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .5rem;
}
.card h2 .dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.dot-purple { background: var(--accent); }
.dot-green  { background: var(--accent-2); }
.dot-red    { background: var(--accent-3); }
.dot-blue   { background: var(--accent-4); }

/* Forms */
label {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
input, select, textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .65rem .85rem;
  color: var(--text);
  font-size: .9rem;
  margin-bottom: 1rem;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }

.row { display: flex; gap: .75rem; }
.row > * { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem;
  padding: .65rem 1.2rem;
  border-radius: 8px;
  border: none;
  font-size: .9rem; font-weight: 500;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-success { background: var(--accent-2); color: #0f1115; }
.btn-danger  { background: var(--accent-3); color: #fff; }
.btn-info    { background: var(--accent-4); color: #fff; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-block { width: 100%; }

/* Status badges */
.badge {
  display: inline-block;
  font-size: .7rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-weight: 500;
}
.badge-on  { background: rgba(0,212,170,.15); color: var(--accent-2); }
.badge-off { background: rgba(255,107,107,.15); color: var(--accent-3); }

/* Toggle switch */
.switch {
  position: relative;
  width: 42px; height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: .2s;
}
.slider:before {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
input:checked + .slider { background: var(--accent-2); }
input:checked + .slider:before { transform: translateX(18px); }

.form-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .5rem; gap: 1rem; flex-wrap: wrap;
}

/* Server list */
.server-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.server-item:last-child { border-bottom: none; }
.server-info { display: flex; align-items: center; gap: .75rem; }
.flag {
  width: 28px; height: 20px;
  border-radius: 3px;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}

/* Responsive */
@media (max-width: 640px) {
  nav { display: none; }
  .row { flex-direction: column; gap: 0; }
  .hero { padding: 2.5rem 0 2rem; }
}