/* ==========================================================================
   G 的星图 · 站点导航
   ========================================================================== */

:root {
  --bg: #06070c;
  --bg-soft: #0a0c14;
  --text: #eef1f9;
  --text-strong: #ffffff;
  --muted: #9aa4ba;
  --dim: #69738a;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
  --line-strong: rgba(255, 255, 255, 0.16);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-3: rgba(255, 255, 255, 0.11);
  --header-bg: rgba(6, 7, 12, 0.76);
  --toolbar-bg: rgba(6, 7, 12, 0.84);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.038));
  --card-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.115), rgba(255, 255, 255, 0.055));
  --card-shadow: 0 20px 50px -34px rgba(0, 0, 0, 0.95);
  --input-bg: rgba(255, 255, 255, 0.045);
  --glass: rgba(12, 14, 24, 0.82);
  --orbit-bg: rgba(10, 12, 22, 0.68);
  --ring-line: rgba(255, 255, 255, 0.09);
  --focus: #a78bfa;
  --ok: #34d399;
  --bad: #fb7185;
  --warn: #fbbf24;
  --grad-1: #c7d2fe;
  --grad-2: #a78bfa;
  --grad-3: #67e8f9;
  --grad-4: #f9a8d4;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --radius: 20px;
  --max: 1240px;
}

html[data-theme="light"] {
  --bg: #f4f5fa;
  --bg-soft: #eceefa;
  --text: #171a24;
  --text-strong: #0b0d15;
  --muted: #5b6478;
  --dim: #8a93a8;
  --line: rgba(18, 24, 40, 0.09);
  --line-soft: rgba(18, 24, 40, 0.06);
  --line-strong: rgba(18, 24, 40, 0.16);
  --surface: rgba(255, 255, 255, 0.7);
  --surface-2: #ffffff;
  --surface-3: #ffffff;
  --header-bg: rgba(248, 249, 253, 0.8);
  --toolbar-bg: rgba(244, 245, 250, 0.84);
  --card-bg: linear-gradient(180deg, #ffffff, #fbfbfe);
  --card-bg-hover: #ffffff;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 16px 40px -28px rgba(16, 24, 40, 0.22);
  --input-bg: #ffffff;
  --glass: rgba(255, 255, 255, 0.88);
  --orbit-bg: rgba(255, 255, 255, 0.84);
  --ring-line: rgba(18, 24, 40, 0.1);
  --focus: #6d5efc;
  --ok: #059669;
  --bad: #e11d48;
  --warn: #d97706;
  --grad-1: #312e81;
  --grad-2: #6d28d9;
  --grad-3: #0e7490;
  --grad-4: #be185d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  -webkit-text-size-adjust: 100%;
}

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

html[data-theme="light"] body {
  background:
    radial-gradient(1100px 560px at 50% -12%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    var(--bg);
}

::selection {
  background: rgba(139, 124, 255, 0.35);
  color: #fff;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   背景：星空 / 极光 / 颗粒
   -------------------------------------------------------------------------- */

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  pointer-events: none;
}

html[data-theme="light"] #stars {
  opacity: 0.16;
  filter: invert(1);
}

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

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

.orb-a {
  width: 660px;
  height: 660px;
  left: -16%;
  top: -26%;
  background: radial-gradient(circle at 45% 45%, rgba(99, 102, 241, 0.55), rgba(99, 102, 241, 0) 66%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.orb-b {
  width: 580px;
  height: 580px;
  right: -14%;
  top: 2%;
  background: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.3), rgba(236, 72, 153, 0) 66%);
  animation: drift-b 31s ease-in-out infinite alternate;
}

.orb-c {
  width: 760px;
  height: 760px;
  left: 18%;
  bottom: -46%;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.22), rgba(34, 211, 238, 0) 66%);
  animation: drift-c 34s ease-in-out infinite alternate;
}

html[data-theme="light"] .orb {
  opacity: 0.55;
}

html[data-theme="light"] .orb-a {
  background: radial-gradient(circle at 45% 45%, rgba(129, 140, 248, 0.4), rgba(129, 140, 248, 0) 66%);
}

html[data-theme="light"] .orb-b {
  background: radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.24), rgba(244, 114, 182, 0) 66%);
}

html[data-theme="light"] .orb-c {
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.16), rgba(34, 211, 238, 0) 66%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

html[data-theme="light"] .grain {
  opacity: 0.03;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, 5%, 0) scale(1.08); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-5%, 4%, 0) scale(1); }
}

@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3%, -4%, 0) scale(1.1); }
}

/* --------------------------------------------------------------------------
   顶栏
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-in {
  max-width: var(--max);
  height: 72px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: conic-gradient(from 140deg, #6d5efc, #22d3ee, #f472b6, #6d5efc);
  box-shadow: 0 10px 28px -14px rgba(109, 94, 252, 0.95);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 11.5px;
  background: #0a0b13;
}

html[data-theme="light"] .brand-mark::before {
  background: #ffffff;
}

.brand-mark > span {
  position: relative;
  font-weight: 800;
  font-size: 19px;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2) 52%, var(--grad-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 3px;
}

.brand-copy b {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-copy small {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.3em;
  color: var(--dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clock {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-right: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clock-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

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

.theme-btn .ico {
  grid-area: 1 / 1;
  transition: opacity 0.32s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.theme-btn .ico-sun {
  opacity: 0;
  transform: rotate(-80deg) scale(0.55);
}

.theme-btn .ico-moon {
  opacity: 1;
  transform: none;
}

html[data-theme="light"] .theme-btn .ico-sun {
  opacity: 1;
  transform: none;
}

html[data-theme="light"] .theme-btn .ico-moon {
  opacity: 0;
  transform: rotate(80deg) scale(0.55);
}

.admin-btn:hover svg {
  transform: rotate(35deg);
}

.admin-btn svg {
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 82px 28px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 424px;
  gap: 40px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.live-dot {
  position: relative;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  opacity: 0;
  animation: ping 2.8s ease-out infinite;
}

.eyebrow.is-off .live-dot {
  background: var(--bad);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.15);
}

.eyebrow.is-off .live-dot::after {
  border-color: var(--bad);
}

@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.7; }
  70%, 100% { transform: scale(1.8); opacity: 0; }
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 5.3vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 650;
  color: var(--text-strong);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(104deg, var(--grad-1) 0%, var(--grad-2) 34%, var(--grad-3) 70%, var(--grad-4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.005em;
}

.only-wide {
  display: block;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  max-width: 588px;
  margin-top: 32px;
  padding: 0 14px 0 18px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--input-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 60px -44px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

html[data-theme="light"] .search {
  box-shadow: 0 18px 44px -34px rgba(16, 24, 40, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.search:focus-within {
  border-color: rgba(139, 124, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.13), 0 24px 60px -40px rgba(109, 94, 252, 0.8);
}

.search-ico {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: var(--dim);
}

.search:focus-within .search-ico {
  color: var(--focus);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15.5px;
  letter-spacing: 0.005em;
}

.search input::placeholder {
  color: var(--dim);
}

.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-kbd {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  user-select: none;
}

.search-clear {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.search-clear[hidden] {
  display: none;
}

.search-clear:hover {
  color: var(--text);
  border-color: var(--line);
}

.search-clear svg {
  width: 13px;
  height: 13px;
}

.recent {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  color: var(--dim);
}

.recent[hidden] {
  display: none;
}

.recent-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.recent-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  transition: 0.22s ease;
}

.recent-list a:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.recent-list .r-emoji {
  font-size: 13px;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   轨道装饰
   -------------------------------------------------------------------------- */

.orbit-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.orbit {
  position: relative;
  width: 424px;
  height: 424px;
  display: grid;
  place-items: center;
}

.orbit::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 94, 252, 0.2), rgba(109, 94, 252, 0) 66%);
  filter: blur(18px);
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ring-1 {
  inset: 38px;
  border: 1px dashed var(--ring-line);
  animation: spin 80s linear infinite;
}

.ring-2 {
  inset: 82px;
  border: 1px solid var(--ring-line);
  opacity: 0.72;
  animation: spin 54s linear infinite reverse;
}

.ring-3 {
  inset: 4px;
  border: 1px solid var(--line-soft);
  opacity: 0.6;
}

.orbit-core {
  position: relative;
  z-index: 2;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 28%, #c7d2fe 0%, #818cf8 26%, #6d5efc 58%, #312e81 100%);
  box-shadow:
    0 0 70px rgba(109, 94, 252, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 1px 2px rgba(255, 255, 255, 0.45);
  animation: core-glow 6s ease-in-out infinite;
}

.orbit-core span {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(20, 12, 70, 0.5);
}

.orbit-core::after {
  content: "";
  position: absolute;
  inset: -13px;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.28);
  animation: pulse-ring 4.4s ease-in-out infinite;
}

@keyframes core-glow {
  0%, 100% { box-shadow: 0 0 60px rgba(109, 94, 252, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 2px rgba(255, 255, 255, 0.45); }
  50% { box-shadow: 0 0 90px rgba(109, 94, 252, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.45); }
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(0.96); opacity: 0.35; }
  50% { transform: scale(1.06); opacity: 0.8; }
}

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

.orbit-node {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: rotate(var(--a)) translateY(calc(-1 * var(--r))) rotate(calc(-1 * var(--a)));
  text-decoration: none;
}

.orbit-emoji {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  background: var(--orbit-bg);
  border: 1px solid rgba(var(--rgb), 0.32);
  box-shadow:
    0 14px 30px -16px rgba(var(--rgb), 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.orbit-node:hover .orbit-emoji {
  transform: translate(-50%, -50%) scale(1.12);
  border-color: rgba(var(--rgb), 0.65);
  box-shadow: 0 18px 38px -14px rgba(var(--rgb), 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.orbit-label {
  position: absolute;
  top: 36px;
  left: 0;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.orbit-node:hover .orbit-label {
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}

/* --------------------------------------------------------------------------
   工具条 / 分类
   -------------------------------------------------------------------------- */

.toolbar {
  position: sticky;
  top: 72px;
  z-index: 50;
  background: var(--toolbar-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}

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

.chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  margin: -2px;
  flex: 1 1 auto;
  min-width: 0;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  color: var(--text);
  background: var(--surface);
}

.chip.is-active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.chip-emoji {
  font-size: 13px;
  line-height: 1;
}

.chip-count {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 999px;
}

.chip.is-active .chip-count {
  color: var(--text);
  background: var(--surface-2);
}

.sync {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-size: 11.5px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.sync-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.sync-dot.is-busy {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14);
  animation: blink 1.1s ease-in-out infinite;
}

@keyframes blink {
  50% { opacity: 0.3; }
}

.sync-text {
  font-variant-numeric: tabular-nums;
}

.sync-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.sync-btn:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

.sync-btn svg {
  width: 15px;
  height: 15px;
}

.sync-btn.is-spinning svg {
  animation: spin 0.9s linear infinite;
}

/* --------------------------------------------------------------------------
   站点分组与卡片
   -------------------------------------------------------------------------- */

.sites {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 28px 76px;
  min-height: 52vh;
}

.group {
  margin-bottom: 42px;
}

.group:last-child {
  margin-bottom: 0;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}

.group-emoji {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--line);
}

.group-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.group-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
}

.group-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent 78%);
}

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

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 218px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--rgb), 0.19);
  background:
    radial-gradient(130% 100% at 0% 0%, rgba(var(--rgb), 0.11), rgba(var(--rgb), 0) 58%),
    var(--card-bg);
  box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1),
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.4s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--rgb), 0.16), rgba(var(--rgb), 0) 62%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--rgb), 0.5), transparent);
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--rgb), 0.52);
  background:
    radial-gradient(130% 100% at 0% 0%, rgba(var(--rgb), 0.16), rgba(var(--rgb), 0) 60%),
    var(--card-bg-hover);
  box-shadow: 0 28px 64px -30px rgba(var(--rgb), 0.55), var(--card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

html[data-theme="light"] .card:hover {
  box-shadow: 0 26px 54px -30px rgba(var(--rgb), 0.45), 0 2px 4px rgba(16, 24, 40, 0.04);
}

.card:hover::before,
.card:hover::after {
  opacity: 1;
}

.card:active {
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(150deg, rgba(var(--rgb), 0.34), rgba(var(--rgb), 0.08));
  border: 1px solid rgba(var(--rgb), 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 26px -16px rgba(var(--rgb), 0.85);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}

html[data-theme="light"] .card-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 22px -16px rgba(var(--rgb), 0.7);
}

.card:hover .card-icon {
  transform: scale(1.04) rotate(-2deg);
}

.card-arrow {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--dim);
  display: grid;
  place-items: center;
  transition: 0.3s ease;
}

.card-arrow svg {
  width: 13px;
  height: 13px;
}

.card:hover .card-arrow {
  color: #fff;
  background: rgba(var(--rgb), 0.32);
  border-color: rgba(var(--rgb), 0.55);
  transform: translate(1px, -1px);
}

html[data-theme="light"] .card:hover .card-arrow {
  color: #fff;
}

.card-tag {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #98a3ba;
  text-transform: uppercase;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 5px 0 7px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.35;
  color: #ffffff;
}

.badge-new {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 5px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  box-shadow: 0 4px 12px -4px rgba(236, 72, 153, 0.7);
}

.card-desc {
  margin: 0 0 16px;
  color: #b3bccd;
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: 0.002em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-theme="light"] .card-desc {
  color: var(--muted);
}

html[data-theme="light"] .card-title {
  color: var(--text-strong);
}

html[data-theme="light"] .card-tag {
  color: #6b7488;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.card-host {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  color: #7e89a0;
  letter-spacing: -0.01em;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: #8994aa;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dim);
}

.state.is-online {
  color: var(--muted);
}

.state.is-online i {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.state.is-offline {
  color: var(--muted);
}

.state.is-offline i {
  background: var(--bad);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.12);
}

.state.is-online i,
.state.is-offline i {
  animation: state-pulse 3.6s ease-in-out infinite;
}

@keyframes state-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.card-enter {
  animation: card-in 0.68s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--i) * 42ms);
}

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

/* --------------------------------------------------------------------------
   骨架屏 / 空状态 / 错误
   -------------------------------------------------------------------------- */

.skeleton {
  padding-top: 4px;
}

.skeleton[hidden] {
  display: none;
}

.sk-head {
  width: 132px;
  height: 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}

.sk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.sk-card {
  position: relative;
  height: 218px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  overflow: hidden;
}

.sk-card::after,
.sk-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.06) 45%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 1.8s ease-in-out infinite;
}

html[data-theme="light"] .sk-card::after,
html[data-theme="light"] .sk-head::after {
  background: linear-gradient(100deg, transparent 20%, rgba(16, 24, 40, 0.045) 45%, transparent 70%);
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.sk-icon {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  margin-bottom: 20px;
  background: var(--surface-2);
}

.sk-line {
  display: block;
  height: 9px;
  border-radius: 5px;
  margin-bottom: 9px;
  background: var(--surface-2);
}

.sk-line.w60 {
  width: 58%;
}

.sk-line.w80 {
  width: 80%;
}

.empty,
.error {
  max-width: 430px;
  margin: 64px auto 20px;
  padding: 38px 28px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
}

.empty[hidden],
.error[hidden] {
  display: none;
}

.empty-icon {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 12px;
}

.empty h3,
.error h3 {
  margin: 0 0 7px;
  font-size: 17px;
  font-weight: 600;
}

.empty p,
.error p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.btn-ghost {
  height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--focus);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   页脚 / 提示
   -------------------------------------------------------------------------- */

.footer {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 28px 48px;
  border-top: 1px solid var(--line-soft);
}

.footer-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12.5px;
}

.brand-mark-sm {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  box-shadow: none;
}

.brand-mark-sm::before {
  inset: 1px;
  border-radius: 7px;
}

.brand-mark-sm > span {
  font-size: 12.5px;
}

.footer-dot {
  color: var(--dim);
}

.footer-slogan {
  color: var(--dim);
  font-size: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-meta {
  margin-top: 18px;
  color: var(--dim);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.footer-meta b {
  color: var(--muted);
  font-weight: 600;
}

.footer-beian {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  color: var(--dim);
  font-size: 11px;
}

.footer-beian a {
  color: var(--dim);
  text-decoration: none;
}

.footer-beian a:hover {
  color: var(--muted);
  text-decoration: underline;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 90;
  transform: translate(-50%, 16px);
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  color: var(--text);
  font-size: 13px;
  box-shadow: 0 22px 54px -22px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  width: min(90vw, 560px);
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  color: var(--text);
  font-size: 13px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 64px;
    gap: 0;
  }

  .orbit-wrap {
    display: none;
  }

  .hero h1 {
    font-size: clamp(40px, 7vw, 60px);
  }
}

@media (max-width: 900px) {
  .grid,
  .sk-grid {
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  }

  .clock-date {
    display: none;
  }
}

@media (max-width: 720px) {
  .header-in {
    height: 62px;
    padding: 0 20px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand-mark::before {
    border-radius: 10.5px;
  }

  .brand-mark > span {
    font-size: 17px;
  }

  .brand-copy b {
    font-size: 13.5px;
  }

  .clock {
    display: none;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .hero {
    padding: 44px 20px 20px;
  }

  .hero h1 {
    margin-top: 18px;
    font-size: clamp(36px, 10.4vw, 48px);
    letter-spacing: -0.03em;
  }

  .lede {
    font-size: 14.5px;
    line-height: 1.75;
  }

  .only-wide {
    display: inline;
  }

  .search {
    height: 54px;
    margin-top: 26px;
    padding: 0 12px 0 16px;
    border-radius: 16px;
    gap: 10px;
  }

  .search input {
    font-size: 15px;
  }

  .search-kbd {
    display: none;
  }

  .toolbar {
    top: 62px;
  }

  .toolbar-in {
    padding: 8px 16px;
    gap: 10px;
  }

  .chip {
    height: 34px;
    padding: 0 11px;
    font-size: 12.5px;
  }

  .sync-text {
    display: none;
  }

  .sync {
    display: none;
  }

  .sites {
    padding: 24px 16px 60px;
  }

  .group {
    margin-bottom: 34px;
  }

  .grid,
  .sk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card {
    min-height: 208px;
    padding: 16px;
    border-radius: 17px;
  }

  .card-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 20px;
  }

  .card-arrow {
    width: 27px;
    height: 27px;
  }

  .card-tag {
    margin-top: 14px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .card-title {
    font-size: 15px;
    margin: 4px 0 6px;
    gap: 5px;
    flex-wrap: wrap;
  }

  .card-desc {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 13px;
    -webkit-line-clamp: 2;
  }

  .card-foot {
    padding-top: 11px;
    gap: 6px;
  }

  .card-host {
    font-size: 9.5px;
  }

  .state {
    font-size: 9.5px;
    gap: 4px;
  }

  .footer {
    padding: 28px 20px 40px;
  }

  .footer-slogan {
    display: none;
  }

  .footer-in {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .grid,
  .sk-grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 196px;
  }

  .card-desc {
    -webkit-line-clamp: 3;
  }

  .footer-brand {
    font-size: 12px;
  }
}

@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;
  }
}

html.no-motion *,
html.no-motion *::before,
html.no-motion *::after {
  animation: none !important;
  transition: none !important;
}
