:root {
  --shield-ink: #12121a;
  --shield-muted: #5c5b6a;
  --shield-line: rgba(18, 18, 26, 0.08);
  --shield-accent: #5148ff;
  --shield-accent-deep: #3b33d4;
  --shield-accent-soft: #ebe9ff;
  --shield-bg: #f4f3fa;
  --shield-surface: #ffffff;
  --shield-success: #0f9f6e;
  --shield-danger: #d1435b;
  --shield-font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--shield-bg);
  color: var(--shield-ink);
  font-family: var(--shield-font);
  -webkit-font-smoothing: antialiased;
}

.shield-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shield-ambiance {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 12% -5%, rgba(81, 72, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 8%, rgba(124, 116, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 110%, rgba(81, 72, 255, 0.1), transparent 50%),
    linear-gradient(180deg, #f7f6fc 0%, #efedf8 100%);
}

.shield-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: shield-drift 14s ease-in-out infinite;
}

.shield-orb--a {
  width: 280px;
  height: 280px;
  top: 12%;
  left: -60px;
  background: rgba(81, 72, 255, 0.22);
}

.shield-orb--b {
  width: 340px;
  height: 340px;
  right: -80px;
  bottom: 8%;
  background: rgba(124, 116, 255, 0.18);
  animation-delay: -5s;
  animation-duration: 18s;
}

.shield-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(18, 18, 26, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 18, 26, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.shield-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 4vw, 40px);
}

.shield-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.shield-brand img {
  height: 28px;
  width: auto;
  display: block;
}

.shield-top-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(81, 72, 255, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--shield-accent-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.shield-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 12px 20px 40px;
}

.shield-panel {
  width: min(440px, 100%);
  padding: 28px 26px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 24px 60px rgba(40, 35, 90, 0.1),
    0 2px 8px rgba(18, 18, 26, 0.04);
  backdrop-filter: blur(14px);
  animation: shield-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.shield-kicker {
  margin: 0 0 8px;
  color: var(--shield-accent-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shield-brand-title {
  margin: 0;
  font-family: var(--shield-font);
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--shield-ink);
  white-space: nowrap;
}

.shield-lead {
  margin: 10px 0 0;
  color: var(--shield-muted);
  font-size: 15px;
  line-height: 1.5;
  max-width: 34ch;
}

.shield-server {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #faf9ff, #f3f1fb);
  border: 1px solid var(--shield-line);
}

.shield-server-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid rgba(81, 72, 255, 0.12);
  box-shadow: 0 8px 20px rgba(81, 72, 255, 0.08);
}

.shield-server-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shield-server-mark--brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.shield-server-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--shield-muted);
}

.shield-server-name {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--shield-ink);
  line-height: 1.2;
  word-break: break-word;
}

.shield-state {
  margin-top: 18px;
  display: grid;
  gap: 14px;
  justify-items: stretch;
  animation: shield-fade 0.35s ease both;
}

.shield-state--success {
  justify-items: center;
  text-align: center;
}

.shield-status {
  margin: 0;
  color: var(--shield-muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.shield-success-title {
  margin: 0;
  font-family: var(--shield-font);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--shield-ink);
}

.shield-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, #18b983, var(--shield-success));
  box-shadow: 0 12px 28px rgba(15, 159, 110, 0.28);
  animation: shield-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.shield-error-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(160deg, #ef6b7f, var(--shield-danger));
}

.shield-captcha {
  display: flex;
  justify-content: center;
  min-height: 78px;
  padding: 4px 0;
}

.shield-btn {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 15px 18px;
  background: linear-gradient(180deg, #635bff 0%, var(--shield-accent) 55%, var(--shield-accent-deep) 100%);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 12px 28px rgba(81, 72, 255, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
  text-align: center;
  text-decoration: none;
}

.shield-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 16px 34px rgba(81, 72, 255, 0.34);
}

.shield-btn:active:not(:disabled) {
  transform: translateY(0);
}

.shield-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.shield-btn--ghost {
  background: #fff;
  color: var(--shield-ink);
  border: 1px solid var(--shield-line);
  box-shadow: none;
}

.shield-btn--ghost:hover:not(:disabled) {
  filter: none;
  background: #faf9ff;
  box-shadow: none;
}

.shield-note {
  margin: 0;
  color: var(--shield-muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.shield-ip {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--shield-accent-soft);
  color: var(--shield-accent-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
}

.shield-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(209, 67, 91, 0.08);
  color: var(--shield-danger);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.shield-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 18px 20px 28px;
  color: var(--shield-muted);
  font-size: 12px;
  font-weight: 500;
}

.shield-spinner {
  width: 40px;
  height: 40px;
  margin: 4px auto 0;
  border: 3px solid rgba(81, 72, 255, 0.14);
  border-top-color: var(--shield-accent);
  border-radius: 50%;
  animation: shield-spin 0.75s linear infinite;
}

@keyframes shield-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shield-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shield-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shield-pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shield-drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -22px);
  }
}

@media (max-width: 520px) {
  .shield-panel {
    padding: 24px 18px 20px;
    border-radius: 20px;
  }

  .shield-top {
    padding-top: 16px;
  }

  .shield-brand img {
    height: 24px;
  }

  .shield-brand-title {
    white-space: normal;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shield-orb,
  .shield-panel,
  .shield-state,
  .shield-check,
  .shield-spinner {
    animation: none !important;
  }
}

/* Directory home */
.shield-page--directory {
  overflow: auto;
}

.shield-dir {
  flex: 1;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 12px 20px 48px;
}

.shield-dir-hero {
  max-width: 560px;
  margin: 8px 0 36px;
  animation: shield-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.shield-dir-lead {
  max-width: 42ch;
}

.shield-dir-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.shield-dir-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(81, 72, 255, 0.14);
  backdrop-filter: blur(8px);
}

.shield-dir-stat-value {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--shield-accent-deep);
}

.shield-dir-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--shield-muted);
}

.shield-dir-section-head {
  margin-bottom: 16px;
}

.shield-dir-section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shield-dir-section-head p {
  margin: 4px 0 0;
  color: var(--shield-muted);
  font-size: 13px;
}

.shield-dir-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.shield-dir-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 16px 40px rgba(40, 35, 90, 0.08);
  animation: shield-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.shield-dir-card:nth-child(2) {
  animation-delay: 0.04s;
}

.shield-dir-card:nth-child(3) {
  animation-delay: 0.08s;
}

.shield-dir-card:nth-child(4) {
  animation-delay: 0.12s;
}

.shield-dir-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shield-dir-card-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(81, 72, 255, 0.12);
}

.shield-dir-card-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shield-dir-card-mark--brand img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.shield-dir-card-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 159, 110, 0.1);
  color: var(--shield-success);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shield-dir-card-name {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: break-word;
}

.shield-dir-card-sub {
  margin: 0 0 8px;
  color: var(--shield-muted);
  font-size: 13px;
  line-height: 1.4;
}

.shield-dir-card-btn {
  margin-top: auto;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shield-dir-empty {
  padding: 28px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed #d7dde8;
  text-align: center;
}

.shield-dir-empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.shield-dir-empty-text {
  margin: 6px 0 0;
  color: var(--shield-muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .shield-dir {
    padding-top: 4px;
  }

  .shield-dir-hero {
    margin-bottom: 28px;
  }
}
