:root {
  --bg-1: #080d18;
  --bg-2: #111b2c;
  --card: rgba(13, 23, 40, 0.72);
  --line: rgba(157, 203, 255, 0.22);
  --text: #ebf4ff;
  --muted: #93a8c8;
  --accent: #4ec1ff;
  --accent-2: #ffd65c;
  --ok: #84f6b4;
  --danger: #ff8996;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: Cairo, sans-serif;
  background:
    radial-gradient(1000px 700px at 15% -10%, #1d3352 0%, transparent 55%),
    radial-gradient(900px 640px at 110% 0%, #23423e 0%, transparent 60%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

.fx {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}
.fx-1 { width: 320px; height: 320px; background: #43beff; inset: -90px auto auto 10%; }
.fx-2 { width: 420px; height: 420px; background: #ffd65c; inset: auto 8% -160px auto; }
.fx-3 { width: 280px; height: 280px; background: #56f8b4; inset: 40% auto auto -100px; }

.layout {
  position: relative;
  z-index: 1;
  max-width: 1460px;
  margin: 0 auto;
  padding: 22px;
}
.hidden { display: none !important; }

.glass {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(11px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.auth-shell {
  width: min(560px, 96%);
  margin: 12vh auto;
  text-align: center;
  padding: 34px 26px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(80, 152, 255, 0.14), rgba(0, 0, 0, 0.1)),
    rgba(9, 18, 33, 0.85);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}
.brand-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #d3e5ff;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.auth-shell h1 {
  margin: 4px 0 10px;
  font-family: Changa, sans-serif;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
}
.auth-shell p { margin: 0 auto 20px; color: var(--muted); max-width: 460px; }
.auth-meta { margin-top: 12px; color: #b6cae8; font-size: 0.9rem; }

.btn {
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 16px;
  font-family: Cairo, sans-serif;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8ae6ff);
  color: #082030;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.topbar {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.userbox { display: flex; flex-direction: column; gap: 2px; }

.board {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 12px;
}

.servers,
.control { min-height: 78vh; padding: 14px; }

.servers-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.servers-head h2 { margin: 0; font-size: 1.1rem; }
.pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
}

.guild-grid {
  display: grid;
  gap: 10px;
  max-height: calc(78vh - 40px);
  overflow: auto;
  padding-left: 2px;
}
.guild-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  background: rgba(14, 27, 48, 0.6);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.guild-card:hover,
.guild-card.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(78, 193, 255, 0.2), rgba(255, 214, 92, 0.07));
  transform: translateY(-2px);
}
.guild-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  background: #18314f;
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.guild-name { font-weight: 700; line-height: 1.2; }
.guild-state { color: var(--muted); font-size: 0.84rem; }

.hero {
  padding: 16px;
  border-radius: 16px;
  background:
    linear-gradient(120deg, rgba(78, 193, 255, 0.23), rgba(255, 214, 92, 0.1)),
    rgba(13, 25, 45, 0.75);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.hero h2 { margin: 0 0 4px; font-family: Changa, sans-serif; }
.hero p { margin: 0; color: var(--muted); }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(12, 22, 38, 0.65);
}
.metric .label { color: var(--muted); font-size: 0.82rem; }
.metric .value { font-size: 1.15rem; font-weight: 800; margin-top: 4px; }

.toolbar {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 13, 24, 0.85);
  color: var(--text);
  padding: 10px;
  font-family: Cairo, sans-serif;
}
textarea { resize: vertical; min-height: 80px; }
label { color: var(--muted); font-size: 0.84rem; display: block; margin-bottom: 4px; }

.command-list {
  max-height: 55vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  background: rgba(8, 15, 27, 0.5);
}
.command-item {
  border: 1px solid rgba(157, 203, 255, 0.2);
  border-radius: 13px;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(12, 25, 43, 0.68);
}
.command-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.command-name { font-weight: 800; font-size: 1.02rem; }
.shortcuts { color: var(--muted); font-size: 0.84rem; margin-top: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn-save { background: linear-gradient(120deg, #66d3ff, #9de7ff); color: #042234; }
.btn-mini { padding: 8px 11px; border-radius: 10px; font-size: 0.9rem; }

.status {
  margin-top: 10px;
  color: var(--ok);
  font-size: 0.9rem;
  min-height: 20px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1080px) {
  .board { grid-template-columns: 1fr; }
  .servers, .control { min-height: auto; }
  .metrics { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr; }
}