/* ===== 可调参数：想让背景更清楚就调小 --shade-*，面板更透就调小 --panel-a ===== */
:root {
  --shade-top: .05; --shade-bot: .18;
  --panel-a: .46; --panel-blur: 18px;
  --blue: #0071e3; --blue-link: #2997ff; --green: #30d158; --red: #ff453a; --orange: #ff9f0a; --yellow: #ffd60a;
  --text: #f5f5f7; --sub: #c7c7cc; --mute: #98989d; --hair: rgba(255, 255, 255, .14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro SC", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); font: 400 17px/1.47 var(--font); letter-spacing: -.022em; -webkit-font-smoothing: antialiased; }
a { color: var(--blue-link); text-decoration: none; } a:hover { text-decoration: underline; }
button { font: inherit; letter-spacing: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.panel { background: rgba(22, 22, 24, var(--panel-a)); backdrop-filter: saturate(180%) blur(var(--panel-blur)); -webkit-backdrop-filter: saturate(180%) blur(var(--panel-blur)); border-radius: 22px; }

/* ===== 背景视频墙 ===== */
#wall { position: fixed; inset: 0; z-index: 0; display: flex; gap: 8px; padding: 0 4px; overflow: hidden; pointer-events: none; }
#shade { position: fixed; inset: 0; z-index: 1; pointer-events: none; transition: opacity .6s;
  background: linear-gradient(180deg, rgba(0, 0, 0, var(--shade-top)), rgba(0, 0, 0, var(--shade-bot))); }
.col { flex: 1; min-width: 0; }
.track { animation: wall-up var(--d, 90s) linear infinite; will-change: transform; }
.col:nth-child(even) .track { animation-direction: reverse; }
@keyframes wall-up { to { transform: translateY(-50%); } }
.tile { position: relative; display: block; aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: 8px; overflow: hidden; background: #1c1c1e; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  animation: frame 9s linear infinite, zoom 9s linear infinite; animation-delay: calc(3s * var(--n, 0) - 1s * var(--o, 0)); }
.tile img:nth-child(2) { --n: 1; } .tile img:nth-child(3) { --n: 2; }
@keyframes frame { 0% { opacity: 0; } 6% { opacity: 1; } 33% { opacity: 1; } 39% { opacity: 0; } 100% { opacity: 0; } }
@keyframes zoom { 0% { transform: scale(1); } 100% { transform: scale(1.06); } }
.tile::after { content: attr(data-n); position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 7px; font-size: 12px; font-weight: 500; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7)); opacity: 0; transition: opacity .25s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.wall-mode #wall { pointer-events: auto; }
body.wall-mode #shade { opacity: 0; }
body.wall-mode .tile:hover::after { opacity: 1; }
body.wall-mode .tile:hover { transform: scale(1.03); transition: transform .25s; z-index: 2; }
.app { position: relative; z-index: 2; transition: opacity .5s, transform .5s; }
body.wall-mode .app { opacity: 0; pointer-events: none; transform: scale(.985); }
.wallbtn { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 6; border: 0; color: var(--text); font-size: 14px; font-weight: 500; padding: 10px 20px; border-radius: 980px;
  background: rgba(60, 60, 67, .55); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 4px 24px rgba(0, 0, 0, .35); transition: background .2s; }
.wallbtn:hover { background: rgba(90, 90, 96, .65); }

/* ===== 导航栏（48px 半透明，和 apple.com 一致） ===== */
.nav { position: sticky; top: 0; z-index: 5; height: 48px; background: rgba(22, 22, 24, .56); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--hair); }
.nav-in { max-width: 980px; height: 100%; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.votes { font-size: 13px; color: var(--sub); background: rgba(255, 255, 255, .12); border-radius: 980px; padding: 3px 12px; font-variant-numeric: tabular-nums; }

/* ===== Hero（中间的字压在照片墙上：径向暗色衬底 + 白字 + 多层阴影，保证一眼能读） ===== */
.hero { position: relative; text-align: center; padding: 72px 0 44px; isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 52%; width: min(980px, 130%); height: 150%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .62) 45%, rgba(0, 0, 0, 0) 100%); filter: blur(8px); }
.eyebrow { margin: 0 0 8px; font-size: 21px; font-weight: 600; color: #ffb340; letter-spacing: .02em; text-shadow: 0 1px 2px #000, 0 2px 16px rgba(0, 0, 0, .9); }
.hero h1 { margin: 0; font-size: clamp(48px, 10vw, 104px); line-height: 1.02; font-weight: 800; letter-spacing: -.045em; color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .65), 0 6px 40px rgba(0, 0, 0, .9); }
.sub { margin: 20px auto 0; max-width: 580px; font-size: clamp(17px, 2.3vw, 22px); line-height: 1.4; font-weight: 500; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 2px 18px rgba(0, 0, 0, .85); }

/* ===== 分段控件（macOS / iOS Segmented Control） ===== */
.seg { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 20px; padding: 3px; gap: 2px; border-radius: 980px; overflow-x: auto;
  background: rgba(118, 118, 128, .36); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
.seg button { border: 0; background: transparent; color: var(--text); font-size: 15px; font-weight: 500; padding: 7px 26px; border-radius: 980px; white-space: nowrap; transition: background .25s, color .25s, box-shadow .25s; }
.seg button.on { background: #f5f5f7; color: #1d1d1f; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }

/* ===== 筛选 ===== */
.filters { padding: 10px 20px; }
.filters .row { display: flex; align-items: flex-start; gap: 14px; padding: 6px 0; }
.filters .row + .row { border-top: .5px solid var(--hair); }
.lbl { color: var(--mute); font-size: 14px; width: 64px; white-space: nowrap; line-height: 30px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.chip { border: 0; background: rgba(255, 255, 255, .1); color: var(--text); font-size: 14px; border-radius: 980px; padding: 0 14px; line-height: 30px; transition: background .2s, color .2s; }
.chip:hover { background: rgba(255, 255, 255, .2); }
.chip.on { background: #f5f5f7; color: #1d1d1f; font-weight: 500; }
.hint { width: fit-content; max-width: 100%; color: #fff; font-size: 13px; font-weight: 500; margin: 16px 0 10px; min-height: 28px; padding: 3px 14px; border-radius: 980px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* ===== 榜单（一整块分组列表，行间是发丝线） ===== */
.list { list-style: none; margin: 0; padding: 6px 0; overflow: hidden; }
.item { display: flex; align-items: center; gap: 16px; padding: 14px 22px; cursor: pointer; position: relative; transition: background .2s; }
.item + .item::before { content: ""; position: absolute; top: 0; left: 22px; right: 22px; height: .5px; background: var(--hair); }
.item:hover { background: rgba(255, 255, 255, .08); }
.item:hover::before, .item:hover + .item::before { opacity: 0; }
.rank { width: 38px; text-align: center; font-size: 22px; font-weight: 600; color: var(--mute); flex: none; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.rank.t1 { color: var(--yellow); } .rank.t2 { color: #e5e5ea; } .rank.t3 { color: #e8a16a; }
.avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; object-fit: cover; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 600; }
.info { flex: 1; min-width: 0; }
.name { font-weight: 600; font-size: 17px; line-height: 1.3; display: flex; align-items: center; gap: 8px; }
.name span.t, .name a.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: 11px; font-weight: 500; border-radius: 980px; padding: 1px 8px; line-height: 16px; flex: none; background: rgba(255, 255, 255, .14); color: var(--sub); }
.badge.demo { background: rgba(255, 159, 10, .2); color: var(--orange); }
.meta { color: var(--mute); font-size: 13px; margin-top: 1px; }
.tags { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.tag { font-size: 11px; color: var(--sub); background: rgba(255, 255, 255, .1); border-radius: 980px; padding: 1px 9px; line-height: 16px; }
.main { text-align: right; min-width: 96px; flex: none; }
.main b { font-size: 24px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.main small { display: block; color: var(--mute); font-size: 12px; letter-spacing: 0; }
.up { color: var(--green) !important; }
.acts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; min-width: 78px; }
.btn { border: 0; background: transparent; color: var(--blue-link); font-size: 14px; padding: 0; line-height: 26px; transition: opacity .2s, background .2s; }
.btn.fill { background: var(--blue); color: #fff; padding: 0 16px; border-radius: 980px; line-height: 30px; font-weight: 500; }
.btn.fill:hover { background: #0077ed; }
.btn.fill:active { background: #006edb; transform: scale(.97); }
.btn.link:hover { text-decoration: underline; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.more { display: flex; justify-content: center; padding: 18px 0 14px; position: relative; color: var(--mute); font-size: 13px; }
.more::before { content: ""; position: absolute; top: 0; left: 22px; right: 22px; height: .5px; background: var(--hair); }
.more .btn.fill { line-height: 36px; padding: 0 24px; font-size: 15px; }
.empty { text-align: center; color: var(--sub); padding: 64px 0; }
.foot { width: fit-content; margin: 0 auto; text-align: center; color: #fff; font-size: 12px; padding: 4px 14px; margin-top: 32px; margin-bottom: 96px; border-radius: 980px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* ===== 详情弹窗（Sheet） ===== */
.mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: flex-start; justify-content: center; padding: 48px 14px; overflow-y: auto; z-index: 10; }
.mask[hidden], .toast[hidden] { display: none; }
.modal { background: rgba(28, 28, 30, .92); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); border-radius: 22px; width: 100%; max-width: 600px; padding: 28px; position: relative; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.modal h2 { margin: 0 0 2px; font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.modal .close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(118, 118, 128, .4); color: var(--sub); font-size: 18px; line-height: 30px; padding: 0; }
.modal .close:hover { background: rgba(118, 118, 128, .6); }
.modal h3 { font-size: 13px; font-weight: 600; margin: 24px 0 8px; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.stars { display: flex; gap: 4px; font-size: 30px; color: #48484a; }
.stars span { cursor: pointer; transition: transform .15s; } .stars span:hover { transform: scale(1.12); } .stars span.on { color: var(--yellow); }
textarea { width: 100%; height: 72px; border: 0; border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 15px; resize: none; background: rgba(118, 118, 128, .24); color: var(--text); }
textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; }
textarea::placeholder { color: var(--mute); }
.cnt { text-align: right; color: var(--mute); font-size: 12px; margin-top: 4px; }
.chip.tg.on { background: rgba(10, 132, 255, .22); color: var(--blue-link); }
.rev { padding: 12px 0; border-top: .5px solid var(--hair); font-size: 15px; }
.rev .st { color: var(--yellow); font-size: 12px; }
.rev .tm { color: var(--mute); font-size: 12px; margin-left: 8px; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: rgba(60, 60, 67, .85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: #fff; font-size: 14px; padding: 10px 20px; border-radius: 980px; z-index: 20; }

@media (max-width: 734px) {
  .wrap { padding: 0 14px; }
  .hero { padding: 40px 0 24px; }
  .seg button { padding: 7px 18px; }
  .filters { padding: 8px 14px; }
  .item { gap: 10px; padding: 12px 14px; }
  .item + .item::before { left: 14px; right: 14px; }
  .avatar { width: 42px; height: 42px; font-size: 18px; }
  .rank { width: 28px; font-size: 17px; }
  .name { font-size: 15px; }
  .main { min-width: 70px; } .main b { font-size: 18px; }
  .acts { min-width: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  .track, .tile img { animation: none; }
  .tile img:first-child { opacity: 1; }
}

/* ===== 来自 YouTube 的热门评论 ===== */
.ytc-src { font-size: 12px; color: var(--mute); margin: -2px 0 8px; }
.ytc { background: rgba(118, 118, 128, .2); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.ytc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.ytc-au { color: var(--sub); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytc-like { color: var(--mute); flex: none; font-variant-numeric: tabular-nums; }
.ytc-tx { margin: 6px 0 8px; font-size: 15px; line-height: 1.45; word-break: break-word; }
.ytc-ln { font-size: 12px; }

/* ===== 顶栏链接 / 详情弹窗新增 ===== */
.nav .links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; justify-content: center; }
.nav .links a { color: var(--sub); font-size: 14px; padding: 4px 10px; border-radius: 980px; white-space: nowrap; }
.nav .links a:hover { background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }
.modal .actions { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.modal .chart svg { display: block; } .modal .chart .ax { fill: var(--mute); font-size: 11px; }
.reply { padding: 8px 12px; border-radius: 10px; background: rgba(10, 132, 255, .16); font-size: 14px; margin-top: 6px; }
@media (max-width: 734px) { .nav .logo { display: none; } }

.name a.t { color: inherit; } .name a.t:hover { text-decoration: none; }
