/* ─── RESET & BASE ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #08090d;
  --bg-2:      #0e1018;
  --bg-3:      #13151f;
  --border:    rgba(255,255,255,.08);
  --text:      #eceef5;
  --text-dim:  #6b7080;
  --radius:    20px;
  --radius-lg: 28px;

  --s1-from:   #f59e0b;
  --s1-to:     #ef4444;
  --s2-from:   #6366f1;
  --s2-to:     #a855f7;
}

html { height: 100%; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100%;
  overflow-x: hidden;
}

/* ─── BACKGROUND ───────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 100%);
}

.bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}
.bg__glow--1 {
  width: 700px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,.18), transparent 70%);
  top: -180px; left: -150px;
}
.bg__glow--2 {
  width: 500px; height: 400px;
  background: radial-gradient(circle, rgba(168,85,247,.14), transparent 70%);
  top: -100px; right: -120px;
}

.bg__particles { position: absolute; inset: 0; }
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  from { transform: translateY(0) scale(1); opacity: .6; }
  to   { transform: translateY(-100vh) scale(.4); opacity: 0; }
}

/* ─── PAGE ─────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 60px;
}

/* ─── LOGO ─────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo__icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 24px rgba(99,102,241,.4);
}

.logo__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ─── HEADLINE ─────────────────────────────────── */
.headline {
  text-align: center;
  margin-bottom: 64px;
  max-width: 560px;
}

.headline__eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 14px;
}

.headline__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #a78bfa 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.headline__sub {
  color: var(--text-dim);
  font-size: 1rem;
}

/* ─── SERVERS GRID ─────────────────────────────── */
.servers {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 2), 1fr);
  gap: 20px;
  width: 100%;
  max-width: min(1200px, calc(var(--grid-cols, 2) * 500px));
  align-items: start;
}

.no-servers {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--text-dim);
}
.no-servers a { color: var(--accent-2); }

/* divider removed — now using CSS grid */

/* ─── SERVER CARD ──────────────────────────────── */
.server-card {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease, border-color .35s ease;
  cursor: default;
}

.server-card:hover {
  transform: translateY(-8px) scale(1.01);
}

.server-card:hover {
  border-color: var(--cb);
  box-shadow: 0 32px 80px var(--cg), 0 0 0 1px var(--cb);
}

/* Glow overlay */
.server-card__glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 240px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  background: radial-gradient(ellipse at 50% 0%, var(--cg) 0%, transparent 70%);
}
.server-card:hover .server-card__glow { opacity: 1; }

/* Top bar */
.server-card__top {
  position: absolute;
  top: 16px; left: 16px; right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

/* Badge */
.server-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 10px;
  letter-spacing: .04em;
  background: linear-gradient(135deg, var(--cf), var(--ct));
  color: #fff;
  box-shadow: 0 4px 20px var(--cs);
}

/* Status */
.server-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  font-weight: 500;
  color: #4ade80;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 999px;
  padding: 5px 12px;
  backdrop-filter: blur(8px);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.status-dot--online {
  background: #22c55e;
  animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* ─── SCENE ────────────────────────────────────── */
.server-card__scene {
  height: 200px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.scene { position: absolute; inset: 0; }

/* DAY SCENE (S1) */
.scene--day .scene__sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #1a3560 0%, #2c5f9e 45%, #5b8fcf 75%, #8db8e8 100%);
}

.scene--day .scene__sun {
  position: absolute;
  top: 28px; right: 80px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe066 40%, #ffb700 100%);
  box-shadow: 0 0 0 8px rgba(255,200,0,.15), 0 0 40px rgba(255,200,0,.5);
  animation: sunFloat 6s ease-in-out infinite;
}
@keyframes sunFloat {
  0%,100%{ transform: translateY(0); }
  50%    { transform: translateY(-5px); }
}

.scene__cloud {
  position: absolute;
  background: rgba(255,255,255,.9);
  border-radius: 999px;
  animation: cloudDrift linear infinite;
}
.scene__cloud::before, .scene__cloud::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
}
.sc--1 { width: 70px; height: 22px; top: 36px; left: 60px; animation-duration: 18s; }
.sc--1::before { width: 34px; height: 34px; top: -18px; left: 8px; }
.sc--1::after  { width: 26px; height: 26px; top: -13px; left: 32px; }
.sc--2 { width: 50px; height: 16px; top: 55px; right: 140px; animation-duration: 24s; animation-direction: reverse; }
.sc--2::before { width: 24px; height: 24px; top: -12px; left: 6px; }
.sc--2::after  { width: 20px; height: 20px; top: -10px; left: 22px; }
@keyframes cloudDrift {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(16px); }
  100% { transform: translateX(0); }
}

.scene__mountain {
  position: absolute;
  bottom: 48px;
  width: 0;
  height: 0;
  border-style: solid;
}
.sm--1 { left: 30px;  border-width: 0 60px 90px 60px; border-color: transparent transparent #2d4a2d transparent; }
.sm--2 { left: 120px; border-width: 0 80px 110px 80px; border-color: transparent transparent #253c25 transparent; }

.scene--day .scene__ground {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: linear-gradient(180deg, #4a7a2c 0%, #3a6020 40%, #2d4a18 100%);
}
.scene--day .scene__ground::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 12px;
  background: linear-gradient(180deg, #5a9a3a, #4a7a2c);
}

.scene__tree {
  position: absolute;
  bottom: 48px;
}
.scene__tree::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 24px;
  background: #6b3f1f;
}
.scene__tree::after {
  content: '';
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 18px 28px 18px;
  border-color: transparent transparent #2d7a2c transparent;
}
.scene__tree::before { border-radius: 2px; }

.st--1 { left: 18px; }
.st--2 { right: 30px; }
.st--3 { left: 50%; transform: translateX(-50%); }

/* Castle */
.scene__castle {
  position: absolute;
  bottom: 48px;
  right: 80px;
  width: 64px;
  height: 60px;
  background: #2a3a5a;
  border-radius: 2px;
}
.scene__castle::before {
  content: '';
  position: absolute;
  top: -14px; left: 0; right: 0;
  height: 14px;
  background:
    repeating-linear-gradient(90deg, #2a3a5a 0px, #2a3a5a 10px, transparent 10px, transparent 16px);
}
.scene__castle::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 28px;
  background: #0a1020;
  border-radius: 999px 999px 0 0;
}
.scene__flag {
  position: absolute;
  bottom: 104px; right: 90px;
  width: 3px; height: 20px;
  background: #8a9ab5;
}
.scene__flag::after {
  content: '';
  position: absolute;
  top: 0; left: 3px;
  width: 14px; height: 10px;
  background: #ef4444;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* NIGHT SCENE (S2) */
.scene--night .scene__sky--night {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #030510 0%, #080d25 40%, #0e1535 70%, #1a2040 100%);
}

.scene__star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle ease-in-out infinite alternate;
}
.ss--1 { width: 3px; height: 3px; top: 20px; left: 30%;  animation-duration: 2.1s; }
.ss--2 { width: 2px; height: 2px; top: 35px; left: 55%;  animation-duration: 1.7s; animation-delay: .4s; }
.ss--3 { width: 4px; height: 4px; top: 15px; right: 30%; animation-duration: 2.4s; animation-delay: .8s; box-shadow: 0 0 4px white; }
.ss--4 { width: 2px; height: 2px; top: 50px; left: 20%;  animation-duration: 1.9s; animation-delay: .2s; }
.ss--5 { width: 3px; height: 3px; top: 28px; right: 20%; animation-duration: 2.8s; animation-delay: 1s; }
@keyframes twinkle {
  from { opacity: .3; transform: scale(.8); }
  to   { opacity: 1;  transform: scale(1.2); }
}

.scene__moon {
  position: absolute;
  top: 22px; right: 70px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #e8dfc0;
  box-shadow: 0 0 0 6px rgba(232,223,192,.1), 0 0 30px rgba(232,223,192,.3);
}
.scene__moon::after {
  content: '';
  position: absolute;
  top: 6px; right: 4px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #0e1535;
}

.scene__ground--dark {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: linear-gradient(180deg, #1a1f35 0%, #10152a 100%);
}
.scene__ground--dark::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 8px;
  background: #22294a;
}

/* Towers (S2) */
.scene__tower {
  position: absolute;
  bottom: 48px;
  background: linear-gradient(180deg, #1e2540 0%, #141830 100%);
  border-radius: 3px 3px 0 0;
}
.scene__tower::before {
  content: '';
  position: absolute;
  top: -12px; left: 0; right: 0;
  height: 12px;
  background:
    repeating-linear-gradient(90deg, #1e2540 0px, #1e2540 8px, transparent 8px, transparent 12px);
}
.scene__tower::after {
  content: '';
  position: absolute;
  inset: 6px;
  background: repeating-linear-gradient(
    180deg, transparent, transparent 10px,
    rgba(99,102,241,.12) 10px, rgba(99,102,241,.12) 12px
  );
}
.st2--1 { left: 40px;  width: 42px; height: 100px; }
.st2--2 { left: 160px; width: 56px; height: 130px; }
.st2--3 { right: 40px; width: 46px; height: 110px; }

/* Lights */
.scene__light {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 10px #a78bfa, 0 0 20px rgba(167,139,250,.5);
  animation: lightGlow 1.8s ease-in-out infinite alternate;
}
@keyframes lightGlow {
  from { opacity: .6; transform: scale(.9); }
  to   { opacity: 1;  transform: scale(1.1); }
}
.sl--1 { bottom: 80px; left: 52px;  animation-delay: 0s; }
.sl--2 { bottom: 90px; left: 175px; animation-delay: .6s; }
.sl--3 { bottom: 85px; right: 53px; animation-delay: 1.1s; }

/* ─── BODY ─────────────────────────────────────── */
.server-card__body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 2;
}

/* Top accent line */
.server-card__body::before {
  content: '';
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cb), transparent);
}

.server-card__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}

.server-card__desc {
  font-size: .88rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 20px;
}

/* Tags */
.server-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  font-size: .74rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tag--red    { background: rgba(239,68,68,.1);   color: #f87171; border-color: rgba(239,68,68,.2); }
.tag--green  { background: rgba(34,197,94,.1);   color: #4ade80; border-color: rgba(34,197,94,.2); }
.tag--orange { background: rgba(245,158,11,.1);  color: #fbbf24; border-color: rgba(245,158,11,.2); }
.tag--blue   { background: rgba(56,189,248,.1);  color: #7dd3fc; border-color: rgba(56,189,248,.2); }
.tag--purple { background: rgba(168,85,247,.1);  color: #c084fc; border-color: rgba(168,85,247,.2); }
.tag--cyan   { background: rgba(6,182,212,.1);   color: #22d3ee; border-color: rgba(6,182,212,.2); }
.tag--yellow { background: rgba(234,179,8,.1);   color: #facc15; border-color: rgba(234,179,8,.2); }
.tag--pink   { background: rgba(236,72,153,.1);  color: #f472b6; border-color: rgba(236,72,153,.2); }

/* Mini stats */
.server-card__stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 20px;
}

.mini-stat {
  flex: 1;
  text-align: center;
}

.mini-stat__num {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.mini-stat__label {
  font-size: .7rem;
  color: var(--text-dim);
}

.mini-stat__sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* IP row */
.server-card__ip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ip-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-shrink: 0;
}

.ip-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: all .2s;
  font-family: 'Space Grotesk', monospace;
  color: var(--text);
}
.ip-btn:hover {
  border-color: var(--cb);
  background: color-mix(in srgb, var(--cf) 7%, transparent);
}

.ip-text { font-size: .85rem; font-weight: 600; }
.ip-icon { color: var(--text-dim); display: flex; }

/* Play button */
.play-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all .25s ease;
  color: #fff;
  margin-top: auto;
}

.play-btn {
  background: linear-gradient(135deg, var(--cf), var(--ct));
  box-shadow: 0 4px 24px var(--cg);
}
.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px var(--cs);
}
.play-btn:active { transform: translateY(0); }

/* ─── LOGO BAR ─────────────────────────────────── */
.logo-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 56px;
}

/* ─── STATUS DOT STATES ─────────────────────────── */
.status-dot--loading {
  background: #6b7080;
  animation: none;
}
.status-dot--online {
  background: #22c55e;
  animation: statusPulse 2s infinite;
}
.status-dot--offline {
  background: #ef4444;
  animation: none;
}

.server-status--offline {
  color: #f87171 !important;
  background: rgba(239,68,68,.1) !important;
  border-color: rgba(239,68,68,.2) !important;
}

/* ─── SKELETON ──────────────────────────────────── */
.skeleton {
  display: inline-block;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-3) 25%, #1e2235 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton--num { width: 48px; height: 18px; }
.skeleton--ver { width: 64px; height: 18px; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── REFRESH ROW ───────────────────────────────── */
.server-card__refresh {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 20px;
}

.refresh-time {
  font-size: .7rem;
  color: var(--text-dim);
}

.refresh-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 4px;
  transition: color .2s;
}
.refresh-btn:hover { color: var(--text); }
.refresh-btn.spinning svg { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── MODAL ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.modal__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color .2s;
}
.modal__close:hover { color: var(--text); }

.modal__body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.modal__footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--border);
}

/* Settings groups */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-group__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.server-badge--sm {
  font-size: .72rem !important;
  padding: 3px 10px !important;
}

.settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-row--inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.settings-label {
  font-size: .78rem;
  color: var(--text-dim);
  font-weight: 500;
}

.settings-input-wrap {
  display: flex;
  gap: 8px;
}

.settings-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  transition: border-color .2s;
  outline: none;
}
.settings-input:focus {
  border-color: rgba(99,102,241,.5);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.settings-input::placeholder { color: #3a3f55; }

.settings-test-btn {
  flex-shrink: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.settings-test-btn:hover {
  color: var(--text);
  border-color: rgba(99,102,241,.3);
}
.settings-test-btn.testing {
  color: #fbbf24;
  border-color: rgba(245,158,11,.3);
  pointer-events: none;
}
.settings-test-btn.success { color: #4ade80; border-color: rgba(34,197,94,.3); }
.settings-test-btn.fail    { color: #f87171; border-color: rgba(239,68,68,.3); }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: .2s;
}
.toggle__slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: .2s;
}
.toggle input:checked + .toggle__slider { background: rgba(99,102,241,.25); border-color: rgba(99,102,241,.4); }
.toggle input:checked + .toggle__slider::before { transform: translateX(20px); background: #818cf8; }

.settings-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: .84rem;
  outline: none;
  cursor: pointer;
}

#interval-row { display: none; }
#interval-row.visible { display: flex; }

/* Modal buttons */
.modal-btn {
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  transition: all .2s;
}
.modal-btn--ghost {
  background: var(--bg-3);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.modal-btn--ghost:hover { color: var(--text); }
.modal-btn--primary {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,.3);
}
.modal-btn--primary:hover { box-shadow: 0 6px 24px rgba(99,102,241,.45); transform: translateY(-1px); }

/* ─── FOOTER ───────────────────────────────────── */
.foot {
  margin-top: 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.foot p:first-child {
  font-size: .85rem;
  color: var(--text-dim);
}
.foot__copy {
  font-size: .75rem;
  color: #3a3f55;
}
.foot__link {
  color: #3a3f55;
  text-decoration: none;
}
.foot__link:hover {
  color: #5a6080;
}

/* ─── TOAST ────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  opacity: 0;
  background: #1a1f30;
  border: 1px solid rgba(99,102,241,.3);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: .88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  z-index: 999;
  pointer-events: none;
  white-space: nowrap;
}
.toast svg { color: #4ade80; flex-shrink: 0; }
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ─── RESPONSIVE ───────────────────────────────── */
@media (max-width: 900px) {
  .servers { grid-template-columns: 1fr !important; max-width: 500px; }
}

@media (max-width: 480px) {
  .page { padding: 32px 16px 48px; }
  .headline__title { font-size: 2rem; }
  .server-card__body { padding: 22px 20px 24px; }
  .server-card__stats { padding: 12px 14px; }
}
