/* ============================================================
   baobao.game — service hub
   ============================================================ */

:root {
  --bg: #06070c;
  --bg-elev: #0b0d15;
  --text: #eef1f8;
  --muted: #8e94aa;
  --dim: #5c6280;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #6ee7ff;
  --maxw: 1120px;
  --radius: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC",
    sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas,
    monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ------------------------------- backdrop ------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  will-change: transform;
}

.orb--a {
  width: 680px;
  height: 680px;
  top: -300px;
  left: -160px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.42), transparent 68%);
  animation: drift-a 30s ease-in-out infinite;
}

.orb--b {
  width: 620px;
  height: 620px;
  top: 8%;
  right: -240px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.34), transparent 68%);
  animation: drift-b 36s ease-in-out infinite;
}

.orb--c {
  width: 560px;
  height: 560px;
  bottom: -280px;
  left: 38%;
  background: radial-gradient(circle, rgba(14, 116, 144, 0.34), transparent 68%);
  animation: drift-c 42s ease-in-out infinite;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 12%, transparent 76%);
  mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 12%, transparent 76%);
}

.grain {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.028;
  mix-blend-mode: overlay;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, transparent 40%, rgba(3, 4, 8, 0.72) 100%);
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(60px, 50px, 0) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-70px, 60px, 0) scale(1.06); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, -50px, 0) scale(1.1); }
}

/* -------------------------------- topbar -------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.topbar[data-scrolled="true"] {
  background: rgba(6, 7, 12, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}

.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: 17px;
}

.brand__mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #9ee9ff;
  filter: drop-shadow(0 0 12px rgba(110, 231, 255, 0.45));
}

.brand__mark svg {
  width: 26px;
  height: 26px;
}

.brand__dot {
  color: #7dd3fc;
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7280;
  flex: none;
}

.live-dot[data-state="online"] {
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: ping 2.6s ease-out infinite;
}

.live-dot[data-state="partial"] {
  background: #fbbf24;
}

.live-dot[data-state="offline"] {
  background: #f87171;
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* --------------------------------- page --------------------------------- */

.page {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px 96px;
}

/* --------------------------------- hero --------------------------------- */

.hero {
  padding: clamp(52px, 8.5vh, 104px) 0 clamp(40px, 5.5vh, 60px);
  max-width: 760px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: #7c8aa8;
  text-transform: uppercase;
  animation: fade-up 0.9s var(--ease) both;
}

.eyebrow__line {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, #6ee7ff, transparent);
}

h1 {
  margin: 0 0 26px;
  font-size: clamp(2.6rem, 6.6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 780;
  text-wrap: balance;
  animation: fade-up 0.9s var(--ease) 0.06s both;
}

.grad {
  background: linear-gradient(96deg, #8ff0ff 0%, #b8a8ff 42%, #ffb6de 78%, #8ff0ff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 12s linear infinite;
}

@keyframes sheen {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  line-height: 1.78;
  color: var(--muted);
  animation: fade-up 0.9s var(--ease) 0.14s both;
}

.lede b {
  color: #c8d3ea;
  font-weight: 550;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  animation: fade-up 0.9s var(--ease) 0.22s both;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 28px;
  margin-right: 28px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}

.stat b {
  font-size: 26px;
  font-weight: 680;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat span {
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.stat .badge {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: #8ff0ff;
  padding: 4px 0 3px;
}

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

/* -------------------------------- section ------------------------------- */

.section {
  margin-top: clamp(8px, 2vh, 24px);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.section__head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #96a0ba;
}

.section__tools {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.updated {
  font-size: 12px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background-color 0.3s, transform 0.3s var(--ease);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  color: #bfe9ff;
  border-color: rgba(110, 231, 255, 0.32);
  background: rgba(110, 231, 255, 0.07);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn[data-busy="true"] svg {
  animation: spin 0.9s linear infinite;
}

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

/* --------------------------------- grid --------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 18px;
}

.card {
  --accent: #6ee7ff;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 248px;
  padding: 24px 24px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(168deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02) 58%),
    rgba(11, 13, 22, 0.6);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.55s var(--ease), border-color 0.45s ease, box-shadow 0.55s var(--ease);
  animation: card-in 0.75s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 80ms);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent 4%, var(--accent) 50%, transparent 96%);
  opacity: 0.75;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    color-mix(in srgb, var(--accent) 15%, transparent),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: -1;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  box-shadow:
    0 30px 70px -34px color-mix(in srgb, var(--accent) 62%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  outline: none;
}

.card:hover::after,
.card:focus-visible::after {
  opacity: 1;
}

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  box-shadow: 0 0 26px -10px color-mix(in srgb, var(--accent) 75%, transparent);
  flex: none;
}

.card__icon svg {
  width: 23px;
  height: 23px;
  transition: transform 0.5s var(--ease);
}

.card:hover .card__icon svg,
.card:focus-visible .card__icon svg {
  transform: scale(1.08);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.024);
  font-size: 11.5px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

.status__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6b7280;
}

.status[data-state="online"] .status__dot {
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: ping 2.6s ease-out infinite;
}

.status[data-state="degraded"] .status__dot {
  background: #fbbf24;
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5);
  animation: ping-warn 2.8s ease-out infinite;
}

@keyframes ping-warn {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.status[data-state="offline"] .status__dot {
  background: #f87171;
}

.status[data-state="unknown"] .status__dot {
  background: #94a3b8;
}

.card__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 640;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.card__host {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--dim);
  word-break: break-all;
}

.card__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: #9aa1b8;
  flex: 1;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7f88a3;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.tag--warn {
  color: #f3cf8b;
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.07);
  text-transform: none;
  letter-spacing: 0.02em;
}

.card__go {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  flex: none;
  transition: color 0.35s, border-color 0.35s, background-color 0.35s, transform 0.45s var(--ease);
}

.card__go svg {
  width: 16px;
  height: 16px;
}

.card:hover .card__go {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translate(2px, -2px);
}

.card__num {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.24);
  align-self: center;
  margin-right: 2px;
  user-select: none;
}

/* ------------------------------- skeleton ------------------------------- */

.card--skeleton {
  animation: none;
  pointer-events: none;
}

.card--static {
  animation: none;
  opacity: 1;
  transform: none;
}

.sk {
  border-radius: 8px;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.028) 28%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.028) 72%
  );
  background-size: 220% 100%;
  animation: shimmer 1.7s ease-in-out infinite;
}

.sk--icon { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 22px; }
.sk--title { width: 52%; height: 18px; margin-bottom: 12px; }
.sk--line { width: 100%; height: 11px; margin-bottom: 9px; }
.sk--short { width: 64%; }

@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -60% 0; }
}

/* -------------------------------- notice -------------------------------- */

.notice {
  margin-top: 20px;
  padding: 13px 16px;
  border-radius: 13px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.055);
  color: #e8cd94;
  font-size: 13px;
  line-height: 1.6;
}

.notice[hidden] {
  display: none;
}

.noscript {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 13px;
}

.noscript a {
  color: #8ff0ff;
}

/* --------------------------------- footer ------------------------------- */

.footer {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 28px 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}

.footer p {
  margin: 0;
}

.footer__tech {
  font-family: var(--mono);
  letter-spacing: 0.02em;
  text-align: right;
}

/* --------------------------------- toast -------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 40;
  transform: translate(-50%, 18px);
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 255, 0.24);
  background: rgba(10, 14, 24, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #cdf3ff;
  font-size: 13px;
  box-shadow: 0 22px 50px -22px rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.5s var(--ease);
}

.toast[data-show="true"] {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------ responsive ------------------------------ */

@media (max-width: 720px) {
  .topbar__inner,
  .page,
  .footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .topbar__status {
    font-size: 12px;
  }

  .hero {
    padding-top: 56px;
  }

  h1 {
    letter-spacing: -0.035em;
  }

  .hero__meta {
    gap: 18px 0;
  }

  .stat {
    padding-right: 24px;
    margin-right: 24px;
  }

  .stat b {
    font-size: 22px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .footer__tech {
    text-align: left;
  }
}

.status-short {
  display: none;
}

@media (max-width: 560px) {
  .status-full {
    display: none;
  }

  .status-short {
    display: inline;
  }

  .topbar__status {
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .stat--wide {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
