:root {
  --font: DM Sans, Noto Sans SC, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  --bg: #0b0d12; --bg-2: #10131c;
  --surface: rgba(255,255,255,.045); --surface-2: rgba(255,255,255,.075); --surface-solid: #151925;
  --border: rgba(255,255,255,.10); --border-strong: rgba(255,255,255,.20);
  --text: #f2f4f9; --text-2: #a6adc0; --text-3: #6f7791;
  --accent: #7c8cff; --accent-2: #4dd4c0;
  --grad: linear-gradient(110deg, #7c8cff 0%, #a78bfa 35%, #4dd4c0 75%, #ffd479 100%);
  --shadow: 0 18px 50px rgba(0,0,0,.42); --shadow-sm: 0 6px 20px rgba(0,0,0,.25);
  --radius: 18px; --radius-sm: 12px; --maxw: 1240px;
  --ease: cubic-bezier(.22,1,.36,1);
}
html[data-theme=light] {
  --bg: #f4f6fb; --bg-2: #eaeef7;
  --surface: rgba(255,255,255,.72); --surface-2: rgba(255,255,255,.95); --surface-solid: #fff;
  --border: rgba(20,28,55,.10); --border-strong: rgba(20,28,55,.19);
  --text: #141a2b; --text-2: #4d566f; --text-3: #7d869e;
  --accent: #4b5bd6; --accent-2: #0e9c8a;
  --shadow: 0 18px 50px rgba(35,48,90,.14); --shadow-sm: 0 6px 20px rgba(35,48,90,.10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font);
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .35s, color .35s; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
::selection { background: rgba(124,140,255,.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .30; }
.o1 { width: 560px; height: 560px; top: -220px; left: -120px; background: #5a5ce8; animation: drift 22s var(--ease) infinite alternate; }
.o2 { width: 480px; height: 480px; top: 60px; right: -180px; background: #1ba98f; animation: drift 26s var(--ease) infinite alternate-reverse; }
.o3 { width: 380px; height: 380px; top: 620px; left: 55%; background: #b8428c; opacity: .16; animation: drift 30s var(--ease) infinite alternate; }
html[data-theme=light] .orb { opacity: .13; }
.grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .18;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 75%);
}
@keyframes drift { to { transform: translate3d(90px,70px,0) scale(1.15); } }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 28px;
  backdrop-filter: blur(18px) saturate(160%);
}
.topbar::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--bg) 40%, transparent); opacity: .85;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .14em; font-size: 17px; }
.brand-mark { font-size: 24px; }
.brand-sub { display: block; font-size: 10px; letter-spacing: .22em; color: var(--text-3); font-weight: 600; margin-top: -2px; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.nav-link { padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-size: 14px; font-weight: 600; transition: .2s; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; font-size: 18px;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); color: var(--text-2); transition: .22s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.hero { max-width: var(--maxw); margin: 0 auto; padding: 74px 28px 40px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 99px;
  background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500;
}
.hero-badge b { color: var(--text); font-weight: 800; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(77,212,192,0); } 100% { box-shadow: 0 0 0 0 rgba(77,212,192,0); } }
.hero h1 { margin: 28px 0 18px; font-size: clamp(42px,7.2vw,84px); line-height: 1.08; font-weight: 900; letter-spacing: -.045em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.hero-desc { margin: 0 auto; max-width: 680px; color: var(--text-2); font-size: 17px; line-height: 1.8; }
.hero-desc code { padding: 2px 7px; border-radius: 6px; background: var(--surface-2); font-size: 13px; color: var(--accent); }
.search-wrap { position: relative; max-width: 720px; margin: 38px auto 0; text-align: left; z-index: 20; }
.search-box {
  position: relative; display: flex; align-items: center;
  background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: var(--shadow); transition: .25s var(--ease);
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124,140,255,.16), var(--shadow); }
.search-icon { width: 21px; height: 21px; margin-left: 20px; color: var(--text-3); flex: none; }
#search { flex: 1; min-width: 0; padding: 19px 14px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; font-weight: 500; }
#search::placeholder { color: var(--text-3); font-weight: 400; }
#search::-webkit-search-cancel-button { display: none; }
.search-kbd { margin-right: 12px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-3); font-size: 12px; }
.clear-btn { width: 34px; height: 34px; margin-right: 12px; border: 0; border-radius: 9px; background: var(--surface-2); color: var(--text-2); font-size: 20px; line-height: 1; }
.quick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.quick-label { color: var(--text-3); font-size: 12.5px; }
.chip { padding: 7px 13px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; transition: .2s var(--ease); }
.chip:hover { color: var(--text); border-color: var(--accent); background: var(--surface-2); transform: translateY(-2px); }
.chip.lucky { margin-left: auto; }
.config {
  max-width: 720px; margin: 22px auto 0; padding: 18px 20px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.config-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.config-head b { font-size: 13.5px; }
.config-head .ghint { color: var(--text-3); font-size: 12px; }
.config-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#appId { flex: 1; min-width: 180px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-solid); color: var(--text); font-size: 14px; outline: 0; }
#appId:focus { border-color: var(--accent); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.seg button { padding: 7px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text-3); font-size: 12.5px; font-weight: 700; }
.seg button.on { background: var(--accent); color: #fff; }
.config-note { margin: 12px 0 0; color: var(--text-3); font-size: 11.5px; line-height: 1.7; }
.stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 0; margin: 52px auto 0; max-width: 760px; }
.stat { flex: 1; min-width: 120px; padding: 0 24px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { display: block; margin-top: 4px; color: var(--text-3); font-size: 12.5px; }
.explore { max-width: var(--maxw); margin: 0 auto; padding: 70px 28px 40px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.section-head h2 { margin: 0 0 6px; font-size: 27px; font-weight: 800; }
.muted { margin: 0; color: var(--text-3); font-size: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.filter {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 600; transition: .22s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.filter.active { color: #fff; border-color: transparent; background: linear-gradient(120deg, var(--accent), #9b7bf5); box-shadow: 0 8px 24px rgba(124,140,255,.3); }
.fcount { padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.14); font-size: 11px; font-weight: 700; }
.filter:not(.active) .fcount { background: var(--surface-2); color: var(--text-3); }
.group { margin-bottom: 42px; }
.group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.group-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.group-head .gcount { padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--text-3); font-size: 11.5px; font-weight: 700; }
.group-head .gline { flex: 1; height: 1px; background: var(--border); }
.group-head .gdesc { color: var(--text-3); font-size: 12.5px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px,1fr)); gap: 11px; }
.card {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s, background .25s, box-shadow .25s;
  animation: fadeUp .4s var(--ease) both; text-align: left; width: 100%;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(124,140,255,.13), transparent 60%); opacity: 0; transition: .3s; }
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-flag { position: relative; font-size: 27px; line-height: 1; flex: none; }
.card-body { position: relative; flex: 1; min-width: 0; }
.card-zh { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-en { display: block; margin-top: 2px; color: var(--text-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { position: relative; flex: none; color: var(--text-3); font-size: 10.5px; text-align: right; line-height: 1.5; }
.card-meta b { display: block; color: var(--text-2); font-size: 11px; letter-spacing: .04em; }
.card-arrow { position: relative; flex: none; color: var(--text-3); transition: .2s; }
.card:hover .card-arrow { color: var(--accent); transform: translate(2px,-2px); }
mark { background: rgba(124,140,255,.3); color: inherit; border-radius: 3px; }
.empty { padding: 70px 20px; text-align: center; }
.empty h3 { margin: 12px 0 6px; }
.empty p { margin: 0 0 20px; color: var(--text-3); }
.btn-primary { padding: 11px 22px; border: 0; border-radius: 11px; background: linear-gradient(120deg, var(--accent), #9b7bf5); color: #fff; font-weight: 700; }
.feature-strip { max-width: var(--maxw); margin: 20px auto 80px; padding: 28px; display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.feat { display: flex; gap: 13px; }
.feat-ico { font-size: 22px; flex: none; }
.feat b { font-size: 14px; }
.feat p { margin: 5px 0 0; color: var(--text-3); font-size: 12.5px; line-height: 1.6; }
.footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 36px 28px; text-align: center; }
.footer-brand { font-weight: 800; letter-spacing: .14em; }
.footer p { margin: 12px 0 0; color: var(--text-3); font-size: 12.5px; line-height: 1.7; }
.footer a { color: var(--text-2); border-bottom: 1px dotted var(--border-strong); }
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(4,6,12,.7); backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(460px,100%); padding: 28px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface-solid); box-shadow: var(--shadow); }
.modal-card h3 { margin: 0 0 16px; font-size: 19px; }
.modal-close { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 20px; }
.modal-card p, .modal-card li { color: var(--text-2); font-size: 13.5px; line-height: 1.85; }
.modal-card code { padding: 2px 6px; border-radius: 5px; background: var(--surface-2); font-size: 12px; word-break: break-all; color: var(--accent); }
.modal-card ul { padding-left: 20px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 100; padding: 11px 20px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-solid); color: var(--text); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); }
.toast.hide { display: none; }
@media (max-width: 720px) {
  .topbar { padding: 13px 18px; }
  .topnav { display: none; }
  .hero { padding: 44px 20px 24px; }
  .hero-desc { font-size: 15px; }
  .desktop-only { display: none; }
  .stat { min-width: 50%; padding: 14px 10px; border-bottom: 1px solid var(--border); }
  .stat:nth-child(2) { border-right: 0; }
  .explore { padding: 50px 20px 30px; }
  .cards { grid-template-columns: repeat(auto-fill,minmax(152px,1fr)); gap: 9px; }
  .card-meta { display: none; }
  .feature-strip { margin: 10px 20px 60px; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
