:root {
  --bg-primary: #09142b;
  --bg-secondary: #0f2247;
  --card-bg: rgba(9, 26, 57, 0.72);
  --card-border: rgba(120, 165, 255, 0.2);
  --text-main: #e8f1ff;
  --text-muted: #8eaad8;
  --accent: #3d89ff;
  --accent-strong: #2362d9;
  --ok: #3bdb91;
  --warn: #ff9d5c;
  --bad: #ff6e80;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(4, 10, 27, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Onest", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 15% 20%, rgba(49, 102, 215, 0.45), transparent 44%),
    radial-gradient(circle at 85% 4%, rgba(32, 66, 140, 0.48), transparent 37%),
    linear-gradient(155deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(146, 180, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 180, 246, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 95%);
}

.page {
  position: relative;
  z-index: 1;
  width: min(680px, 100% - 24px);
  margin: 0 auto;
  padding: 28px 0 34px;
}

.header {
  background: rgba(10, 22, 47, 0.82);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(9px);
  box-shadow: var(--shadow);
  padding: 22px;
  animation: rise 0.35s ease;
}

.brand {
  color: var(--text-main);
  text-decoration: none;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand:hover {
  color: #9bc0ff;
}

.check-button {
  margin-top: 16px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #f4f8ff;
  cursor: pointer;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.check-button:hover {
  filter: brightness(1.08);
}

.check-button:active {
  transform: translateY(1px);
}

.check-button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.summary {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.proxy-list {
  margin-top: 16px;
  display: grid;
  gap: 11px;
}

.proxy-item {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: 0 10px 32px rgba(5, 14, 35, 0.33);
  transition: transform 0.2s ease, border-color 0.2s ease;
  animation: rise 0.4s ease;
}

.proxy-item:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 175, 255, 0.48);
}

.proxy-title {
  color: var(--text-main);
  font-size: 18px;
  font-weight: 600;
}

.proxy-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.proxy-endpoint {
  color: var(--text-muted);
  font-size: 13px;
}

.proxy-status {
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid transparent;
}

.proxy-status.unknown {
  color: #c6d8ff;
  border-color: rgba(173, 195, 240, 0.35);
  background: rgba(91, 123, 186, 0.2);
}

.proxy-status.online {
  color: #bcffdd;
  border-color: rgba(59, 219, 145, 0.42);
  background: rgba(27, 115, 80, 0.33);
}

.proxy-status.timeout {
  color: #ffd1ad;
  border-color: rgba(255, 157, 92, 0.48);
  background: rgba(165, 91, 38, 0.33);
}

.proxy-status.offline {
  color: #ffd2d8;
  border-color: rgba(255, 110, 128, 0.5);
  background: rgba(142, 41, 58, 0.35);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .page {
    width: calc(100% - 18px);
    padding-top: 16px;
  }

  .header {
    padding: 18px;
  }

  .brand {
    font-size: 28px;
  }

  .proxy-title {
    font-size: 17px;
  }
}
