/* ============================================================
   前台导航页样式
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #eaf1ff;
  --ink-dim: rgba(234, 241, 255, .52);
  --ink-faint: rgba(234, 241, 255, .3);
  --line: rgba(255, 255, 255, .14);
  --line-soft: rgba(255, 255, 255, .08);
  --glass: rgba(7, 15, 36, .55);
  --glass-hi: rgba(12, 23, 50, .68);
  --accent: #8ab4ff;
  --accent-soft: rgba(138, 180, 255, .16);
  --radius: 16px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: #04091a;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 背景层 ---------- */

.bg {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #12295c 0%, #081633 45%, #04091a 100%);
}
.bg img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  animation: drift 46s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: scale(1.04) translate3d(0, 0, 0); }
  100% { transform: scale(1.1) translate3d(-1.2%, -1%, 0); }
}

.veil {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(110% 70% at 50% 0%, rgba(10, 24, 60, .5), rgba(3, 8, 22, .84) 62%, rgba(2, 6, 17, .94) 100%),
    linear-gradient(180deg, rgba(5, 12, 32, .3), rgba(2, 6, 17, .7));
}

/* ---------- 主容器 ---------- */

.wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 0 24px 0;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

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

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 0 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  color: #cfe0ff;
  background: linear-gradient(145deg, rgba(138, 180, 255, .28), rgba(138, 180, 255, .08));
  border: 1px solid rgba(160, 200, 255, .3);
  box-shadow: 0 6px 24px rgba(70, 120, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.brand-name {
  font-size: 1.02rem; font-weight: 600; letter-spacing: .08em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .4);
}
.top-actions { display: flex; align-items: center; gap: 14px; }
.top-meta {
  font-size: .74rem; letter-spacing: .04em; color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.btn-ghost {
  display: inline-flex; align-items: center; height: 32px; padding: 0 15px;
  border-radius: 999px; font-size: .76rem; letter-spacing: .04em;
  color: rgba(255, 255, 255, .8); text-decoration: none;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  transition: background .22s, border-color .22s, color .22s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* ---------- 主视觉 ---------- */

.hero { text-align: center; padding: 32px 0 26px; }

.clock {
  font-size: clamp(3rem, 11.5vw, 5.4rem);
  font-weight: 200; line-height: 1; letter-spacing: .06em;
  color: #fff; font-variant-numeric: tabular-nums;
  text-shadow: 0 6px 44px rgba(0, 0, 0, .55), 0 0 1px rgba(255, 255, 255, .5);
}
.dateline {
  margin-top: 12px; margin-bottom: 28px;
  font-size: .8rem; letter-spacing: .26em; color: rgba(234, 241, 255, .48);
  font-variant-numeric: tabular-nums;
}

.search {
  display: flex; align-items: center;
  max-width: 660px; margin: 0 auto; height: 54px;
  border-radius: 999px; overflow: visible;
  background: rgba(4, 10, 26, .58);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(16px) saturate(1.2);
  transition: border-color .24s, box-shadow .24s, background .24s;
}
.search:focus-within {
  background: rgba(4, 10, 26, .72);
  border-color: rgba(160, 200, 255, .44);
  box-shadow: 0 22px 62px rgba(0, 0, 0, .45), 0 0 0 3px rgba(120, 165, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.engine { position: relative; flex: 0 0 auto; padding-left: 8px; }
.engine::after {
  content: ""; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 26px; background: rgba(255, 255, 255, .16);
}
.engine-current {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 88px; height: 40px; padding: 0 12px;
  border: 0; border-radius: 999px; background: transparent;
  color: rgba(255, 255, 255, .82); font-family: inherit; font-size: .82rem; font-weight: 500;
  cursor: pointer; transition: background .2s, color .2s;
}
.engine-current:hover, .engine-picker-open .engine-current {
  background: rgba(255, 255, 255, .08); color: #fff;
}
.engine-badge {
  display: inline-grid; place-items: center;
  width: 21px; height: 21px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); font-size: .68rem; font-weight: 700;
}
.engine-arrow {
  width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.4px solid rgba(255, 255, 255, .7);
  border-bottom: 1.4px solid rgba(255, 255, 255, .7);
  transform: rotate(45deg); transition: transform .2s, margin-top .2s;
}
.engine-picker-open .engine-arrow { transform: rotate(225deg); margin-top: 3px; }

.engine-menu {
  position: absolute; left: 8px; top: calc(100% + 12px); z-index: 30;
  width: 150px; padding: 7px; border-radius: 15px;
  background: rgba(9, 17, 40, .94);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px);
  opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.engine-picker-open .engine-menu { opacity: 1; transform: none; pointer-events: auto; }
.engine-option {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 10px; background: transparent;
  color: rgba(255, 255, 255, .74); font-family: inherit; font-size: .82rem;
  cursor: pointer; text-align: left; transition: background .16s, color .16s;
}
.engine-option:hover, .engine-option.active { background: rgba(255, 255, 255, .12); color: #fff; }

.search-input {
  flex: 1; min-width: 0; height: 100%;
  padding: 0 16px; border: 0; outline: 0; background: transparent;
  color: #fff; font-family: inherit; font-size: .94rem; letter-spacing: .02em;
}
.search-input::placeholder { color: rgba(255, 255, 255, .38); }

.search-btn {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 54px; height: 100%; border: 0; border-left: 1px solid rgba(255, 255, 255, .14);
  border-radius: 0 999px 999px 0; background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .88); cursor: pointer;
  transition: background .22s, color .22s;
}
.search-btn:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 14px;
}
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 13px; border-radius: 999px;
  font-size: .72rem; letter-spacing: .03em; color: rgba(255, 255, 255, .66);
  background: rgba(3, 9, 24, .42);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer; transition: all .22s;
}
.chip:hover { color: #fff; background: rgba(3, 9, 24, .66); border-color: rgba(255, 255, 255, .28); }

/* ---------- 广告位 ---------- */

.ad-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  max-width: 920px; width: 100%; margin: 6px auto 0;
}
.ad-cell {
  position: relative; aspect-ratio: 7 / 2; overflow: hidden;
  border-radius: var(--radius);
}
.ad-item {
  position: absolute; inset: 0; display: block; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(135deg, rgba(9, 21, 50, .5), rgba(24, 42, 78, .34));
  box-shadow: 0 12px 34px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1), border-color .28s, box-shadow .28s;
}
.ad-item:hover {
  transform: translateY(-2px) scale(1.012);
  border-color: rgba(255, 255, 255, .34);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.ad-item img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

.ad-flag {
  position: absolute; top: 7px; right: 7px; z-index: 3;
  display: inline-flex; align-items: center; height: 17px; padding: 0 6px;
  border-radius: 4px; font-size: 10px; font-weight: 500; line-height: 1;
  letter-spacing: .1em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  background: rgba(0, 0, 0, .58);
  border: 1px solid rgba(255, 255, 255, .42);
  backdrop-filter: blur(4px);
}

.ad-empty {
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, rgba(9, 21, 50, .34), rgba(24, 42, 78, .2));
  border: 1px dashed rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  color: rgba(234, 241, 255, .44);
  text-align: center;
}
.ad-empty-inner { position: relative; width: 100%; height: 100%; display: grid; place-content: center; gap: 4px; }
.ad-empty b { font-size: .78rem; font-weight: 500; letter-spacing: .12em; color: rgba(234, 241, 255, .58); }
.ad-empty small { font-size: .66rem; color: rgba(234, 241, 255, .34); }
.ad-empty .ad-flag { top: 7px; right: 7px; }

.ad-note {
  max-width: 920px; width: 100%; margin: 8px auto 0;
  font-size: .68rem; letter-spacing: .03em; color: rgba(234, 241, 255, .3);
  text-align: right; padding-right: 2px;
}

/* ---------- 侧栏广告 ---------- */

.side-ad {
  position: fixed; top: 50%; z-index: 5; width: 166px;
  aspect-ratio: 14 / 31; transform: translateY(-50%);
}
.side-ad-left { left: 26px; }
.side-ad-right { right: 26px; }
.side-ad:empty { display: none; }
.side-ad .ad-item { border-radius: 16px; }
.side-ad .ad-item:hover { transform: translateY(calc(-2px)); }
.side-ad .ad-flag { top: 8px; right: 8px; }

@media (max-width: 1460px) { .side-ad { display: none; } }
@media (max-height: 600px) { .side-ad { display: none; } }

/* ---------- 区块 ---------- */

.sec { margin-top: 34px; }
.sec-head {
  display: flex; align-items: center; gap: 9px; margin-bottom: 14px;
}
.sec-dot {
  flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(150, 196, 255, .9);
  box-shadow: 0 0 14px rgba(110, 165, 255, .55), 0 0 28px rgba(110, 165, 255, .22);
  animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(110, 165, 255, .5), 0 0 28px rgba(110, 165, 255, .2); }
  50% { box-shadow: 0 0 20px rgba(110, 165, 255, .75), 0 0 40px rgba(110, 165, 255, .34); }
}
.sec-icon { font-size: .9rem; line-height: 1; }
.sec-title {
  font-size: .9rem; font-weight: 600; letter-spacing: .12em; color: rgba(255, 255, 255, .92);
}
.sec-count {
  font-size: .68rem; color: rgba(234, 241, 255, .34); letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.sec-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02));
}

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

.card {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-width: 0; padding: 13px 15px;
  border-radius: var(--radius); text-decoration: none; color: #fff;
  background: rgba(6, 14, 34, .52);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1), border-color .28s, box-shadow .28s, background .28s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .08), transparent 55%);
  opacity: .8; transition: opacity .28s;
}
.card:hover {
  transform: translateY(-4px);
  background: rgba(10, 21, 48, .68);
  border-color: rgba(255, 255, 255, .26);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.card:hover::before { opacity: .4; }

.ico {
  position: relative; flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 11px; overflow: hidden;
  display: grid; place-items: center;
  background: rgba(120, 150, 255, .12);
  border: 1px solid rgba(140, 175, 255, .16);
  font-size: 1rem; font-weight: 600; color: #dfe9ff;
}
.ico img { width: 100%; height: 100%; object-fit: contain; background: rgba(255, 255, 255, .04); }
.ico-letter { text-shadow: 0 1px 6px rgba(0, 0, 0, .35); letter-spacing: .02em; }

.inf { min-width: 0; flex: 1; }
.nm {
  font-size: .93rem; font-weight: 600; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds {
  margin-top: 4px; font-size: 11.5px; line-height: 16px; height: 16px;
  color: rgba(234, 241, 255, .42);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 搜索状态 ---------- */

.search-state {
  display: none; max-width: 680px; margin: 18px auto 0;
  padding: 10px 14px; text-align: center;
  font-size: .78rem; letter-spacing: .03em; color: rgba(234, 241, 255, .6);
  border-top: 1px solid rgba(255, 255, 255, .1);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.search-state.show { display: block; }
.search-state.empty { color: rgba(255, 205, 130, .8); }

/* ---------- 统计 / 页脚 ---------- */

.stats {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px 16px; margin-top: 48px;
  font-size: .72rem; letter-spacing: .04em; color: rgba(234, 241, 255, .3);
  font-variant-numeric: tabular-nums;
}
.stats-item { display: inline-flex; align-items: baseline; gap: 4px; }
.stats-item b { color: rgba(234, 241, 255, .52); font-weight: 600; }
.stats-sep { color: rgba(234, 241, 255, .2); }

.foot {
  margin-top: auto; padding: 26px 0 26px;
  text-align: center; font-size: .7rem; letter-spacing: .08em;
  color: rgba(234, 241, 255, .28);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.foot a { color: rgba(234, 241, 255, .38); text-decoration: none; }
.foot a:hover { color: rgba(234, 241, 255, .75); }
.foot-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.foot-links span { opacity: .4; }

/* ---------- 出现动画 ---------- */

.reveal { animation: rise .5s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 移动端 ---------- */

@media (max-width: 760px) {
  .wrap { padding: 0 14px; }
  .topbar { padding-top: 12px; }
  .top-meta { display: none; }
  .hero { padding: 14px 0 16px; }
  .clock { font-size: 3rem; letter-spacing: .02em; }
  .dateline { margin-top: 9px; margin-bottom: 18px; font-size: .72rem; letter-spacing: .12em; }
  .search { height: 50px; border-radius: 16px; }
  .engine { padding-left: 4px; }
  .engine-current { min-width: 68px; height: 38px; padding: 0 8px; font-size: .76rem; gap: 5px; }
  .engine-menu { left: 0; width: 138px; }
  .search-input { padding: 0 10px; font-size: .86rem; }
  .search-btn { width: 46px; border-radius: 0 16px 16px 0; }
  .chips { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-top: 12px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
  .ad-cell { border-radius: 12px; }
  .ad-item { border-radius: 12px; }
  .ad-flag { top: 5px; right: 5px; height: 16px; font-size: 9.5px; }
  .ad-note { font-size: .62rem; margin-top: 6px; }
  .sec { margin-top: 24px; }
  .sec-title { font-size: .82rem; letter-spacing: .06em; }
  .sec-head { margin-bottom: 10px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .card { padding: 10px 10px; gap: 9px; border-radius: 13px; }
  .card:hover { transform: none; }
  .ico { width: 34px; height: 34px; border-radius: 9px; font-size: .86rem; }
  .nm { font-size: .82rem; }
  .ds { font-size: 10.5px; line-height: 14px; height: 14px; }
  .stats { margin-top: 30px; font-size: .66rem; gap: 6px 10px; }
  .foot { padding: 22px 0 20px; }
}

@media (max-width: 420px) {
  .clock { font-size: 2.5rem; }
  .ad-grid { grid-template-columns: 1fr; }
  .ad-cell { aspect-ratio: 7 / 2; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 11px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .bg img, .sec-dot, .reveal { animation: none !important; }
  .card, .ad-item { transition: none; }
}
