:root {
  color-scheme: dark;
  --bg: #0b1224;
  --panel: rgba(15, 23, 42, 0.68);
  --panel-border: rgba(255, 255, 255, 0.08);
  --accent: #38bdf8;
  --accent-strong: #22d3ee;
  --warn: #f59e0b;
  --danger: #f87171;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: #e2e8f0;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.15), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.18), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(14, 116, 144, 0.25), transparent 50%),
    #0b1224;
}

.blob {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 16s ease-in-out infinite alternate;
}

.blob-a {
  top: -80px;
  left: -60px;
  background: rgba(14, 165, 233, 0.65);
}

.blob-b {
  bottom: 10%;
  right: -80px;
  background: rgba(59, 130, 246, 0.55);
  animation-delay: 2s;
}

.blob-c {
  top: 40%;
  left: 40%;
  background: rgba(34, 211, 238, 0.5);
  animation-delay: 4s;
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(40px, -30px) scale(1.1);
  }
}

.glass-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  backdrop-filter: blur(16px);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: transparent;
  display: grid;
  place-items: center;
  box-shadow: none;
  overflow: hidden;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.6);
  transition: 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(51, 65, 85, 0.75);
}

.action-btn-primary {
  background: linear-gradient(120deg, #0ea5e9, #38bdf8);
  border: none;
  color: #0b1224;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.35);
}

.action-btn-alt {
  background: rgba(15, 118, 110, 0.25);
  border-color: rgba(20, 184, 166, 0.45);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 4px;
}

.status-icon-bg {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  display: grid;
  place-items: center;
}

.progress-wrap {
  margin-top: 20px;
  position: relative;
  height: 3px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
  transition: width 1s linear;
}

.node-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: 0.3s ease;
  cursor: pointer;
}

.node-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.4);
}

.node-card.fastest {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
}

.node-card.offline {
  opacity: 0.6;
  border-color: rgba(248, 113, 113, 0.6);
}

.node-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ping-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 8px currentColor;
}

.domain-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.7);
  transition: 0.2s ease;
}

.domain-card:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
}

.toast-container {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  z-index: 100;
}

.toast-container.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .action-btn {
    width: 100%;
    justify-content: center;
  }
}
