/* ============================================================
   贪吃蛇作品展 · 样式
   ============================================================ */

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

:root {
  --bg: #05070a;
  --panel: #0c1117;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #e9eff6;
  --muted: #8b97a6;
  --green: #7ee787;
  --green-ink: #04140a;
  --maxw: 1240px;
  --radius: 18px;
}

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

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景光晕 + 网格 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(126, 231, 135, .10), transparent 62%),
    radial-gradient(820px 500px at 94% 6%, rgba(90, 130, 255, .08), transparent 60%),
    radial-gradient(720px 520px at 2% 34%, rgba(255, 110, 199, .05), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 76%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 76%);
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.wrap {
  width: min(var(--maxw), 100% - 64px);
  margin-inline: auto;
}

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

.hero {
  position: relative;
  padding: clamp(46px, 7vw, 92px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(126, 231, 135, .9);
  animation: pulse 2.4s ease-in-out infinite;
}
.kicker .slash { color: rgba(255, 255, 255, .22); }
.kicker .dim { color: #6d7987; }

h1 {
  margin: 20px 0 0;
  font-size: clamp(64px, 12.5vw, 164px);
  line-height: .84;
  font-weight: 800;
  letter-spacing: -.05em;
  color: #f3f7fb;
  text-shadow: 0 0 80px rgba(126, 231, 135, .12);
}
h1 .dot { color: var(--green); }

.hero-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-top: clamp(24px, 3.5vw, 40px);
}

.lede {
  max-width: 560px;
  margin: 0;
  color: #bcc6d3;
  font-size: clamp(14px, 1.4vw, 16.5px);
  line-height: 1.95;
  letter-spacing: .01em;
}
.lede b { color: var(--text); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, background .25s, border-color .25s, color .25s, box-shadow .25s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--green);
  color: var(--green-ink);
  box-shadow: 0 14px 40px -14px rgba(126, 231, 135, .8);
}
.btn-primary:hover { background: #9af2a2; box-shadow: 0 18px 50px -14px rgba(126, 231, 135, .9); }
.btn-ghost {
  border-color: var(--line-strong);
  color: #cfd8e3;
  background: rgba(255, 255, 255, .02);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .06); }

.stats { display: flex; gap: clamp(22px, 3.4vw, 44px); padding-bottom: 6px; }
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats b {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1;
  color: #f4f8fc;
}
.stats span { font-size: 11px; letter-spacing: .18em; color: var(--muted); }

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -34px;
  width: 100%;
  height: 170px;
  pointer-events: none;
  opacity: .75;
  z-index: -1;
}
.wave-dots { animation: crawl 2.6s linear infinite; }

/* ---------------- Toolbar ---------------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 0;
  background: rgba(5, 7, 10, .72);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.toolbar.stuck {
  background: rgba(5, 7, 10, .88);
  border-bottom-color: var(--line);
}

.toolbar-in {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.search { order: 1; }
.chips { order: 2; }
.tb-right { order: 3; }

.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
  display: block;
}
.search svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6f7d8d;
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .028);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.search input::placeholder { color: #6b7887; }
.search input:focus {
  border-color: rgba(126, 231, 135, .5);
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 0 0 4px rgba(126, 231, 135, .08);
}
.search kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: #798696;
  background: rgba(255, 255, 255, .03);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: #95a2b0;
  font-size: 13px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip .n {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  opacity: .55;
}
.chip.on {
  background: var(--green);
  border-color: var(--green);
  color: var(--green-ink);
  font-weight: 700;
}
.chip.on .n { opacity: .6; }

.result-count {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: .08em;
  color: #6f7c8b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.result-count b { color: var(--text); font-weight: 700; }

/* ---------------- Grid & Card ---------------- */

main { padding: 34px 0 72px; }

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

.card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  cursor: pointer;
  outline: none;
  animation: rise .65s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform .4s cubic-bezier(.2, .7, .2, 1), border-color .3s, box-shadow .4s;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--c, var(--green));
  box-shadow: 0 26px 60px -26px var(--c, var(--green)), 0 0 0 1px var(--c, var(--green)) inset;
}
.card:focus-visible { box-shadow: 0 0 0 3px rgba(126, 231, 135, .45), 0 26px 60px -26px var(--c, var(--green)); }

.shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #05070a; }
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .4s;
  filter: saturate(1.06);
}
.card:hover .shot img { transform: scale(1.05); filter: saturate(1.14) brightness(1.06); }

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(4, 6, 9, .6) 0%, rgba(4, 6, 9, .18) 22%, transparent 42%),
    radial-gradient(120% 90% at 50% 0%, transparent 60%, rgba(0, 0, 0, .18));
  pointer-events: none;
}

.no {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(6, 9, 13, .6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  color: #dbe4ee;
}

.tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--c, var(--green)) 42%, transparent);
  background: rgba(6, 9, 13, .58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--c, var(--green));
}

.play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) scale(.9);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--c, var(--green));
  color: #06090c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 16px 44px -12px var(--c, var(--green));
  transition: opacity .25s, transform .3s cubic-bezier(.2, .7, .2, 1);
}
.play svg { width: 12px; height: 12px; }
.card:hover .play,
.card:focus-visible .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.cap {
  position: relative;
  z-index: 2;
  padding: 14px 16px 15px;
  border-top: 1px solid rgba(255, 255, 255, .05);
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent 70%);
  pointer-events: none;
}
.cap h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #f4f8fc;
}
.cap h3 small {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  color: #93a0ae;
}
.cap .ttl {
  margin: 4px 0 0;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: #9fabb9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cap .desc {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.62;
  letter-spacing: .01em;
  color: #8e9aa8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------- Empty ---------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 90px 0;
  color: var(--muted);
  text-align: center;
}
.empty-ico { font-size: 34px; filter: grayscale(.3); }
.empty p { margin: 0; font-size: 14px; letter-spacing: .04em; }
.empty .btn { margin-top: 12px; height: 40px; }

/* ---------------- Footer ---------------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 42px 0 56px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .015));
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
}
.foot-title {
  margin: 0 0 10px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .22em;
  color: #7f8c9b;
}
.foot-note { margin: 0; font-size: 12.5px; line-height: 1.9; color: #707d8c; }
.foot-right { text-align: right; }
.foot-right p { margin: 0 0 6px; font-size: 12px; color: #707d8c; }

/* ---------------- Modal ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 5, 8, .78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal.open { opacity: 1; pointer-events: auto; }

.shell {
  display: flex;
  flex-direction: column;
  width: min(1280px, 100%);
  height: min(88vh, 940px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: #090d13;
  overflow: hidden;
  box-shadow: 0 60px 140px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .4);
  transform: translateY(14px) scale(.985);
  transition: transform .32s cubic-bezier(.2, .7, .2, 1);
}
.modal.open .shell { transform: none; }

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 19, .94);
  flex: 0 0 auto;
}
.bar .num {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  letter-spacing: .14em;
  color: #768393;
  white-space: nowrap;
}
.bar h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.bar .ttl {
  font-size: 12.5px;
  color: #8d9aa9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34vw;
}
.spacer { flex: 1; }

.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  flex: 0 0 auto;
}
.seg button {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8d9aa9;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--green); color: var(--green-ink); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: #a9b5c3;
  cursor: pointer;
  text-decoration: none;
  transition: color .2s, background .2s, border-color .2s;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .08); border-color: var(--line-strong); }
.icon-btn.close:hover { color: #ff8d8d; border-color: rgba(255, 141, 141, .45); background: rgba(255, 90, 90, .1); }

.stage { position: relative; flex: 1; min-height: 0; background: #000; }
.stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  display: block;
}

.stage-tip {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  transform: translate(-50%, 8px);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(8, 11, 16, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12px;
  letter-spacing: .06em;
  color: #cfd8e3;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s, transform .3s;
}
.stage-tip.show { opacity: 1; transform: translate(-50%, 0); }

.loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #05070a;
  color: #8b97a6;
  font-size: 13px;
  letter-spacing: .1em;
  transition: opacity .35s, visibility .35s;
}
.loader.hide { opacity: 0; visibility: hidden; }
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(126, 231, 135, .25);
  border-top-color: var(--green);
  animation: spin .8s linear infinite;
}

.bar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 42px;
  padding: 0 14px 0 18px;
  border-top: 1px solid var(--line);
  background: #080b10;
  flex: 0 0 auto;
}
.hint {
  font-size: 11.5px;
  color: #7b8795;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.nav button {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: #9aa7b5;
  font-size: 11.5px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.nav button:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, .05); }
.nav-idx {
  min-width: 58px;
  text-align: center;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: #6f7c8a;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 账号 / 投票 / 排行榜 ---------------- */

.tb-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.result-count { margin-left: 0; }

.tb-btn {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: #a9b6c4;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s;
}
.tb-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, .06); }
.tb-btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--green-ink);
  font-weight: 700;
}
.tb-btn.primary:hover { filter: brightness(1.06); }

/* 「我的投票」按钮上的票数小徽标 */
.tb-btn { position: relative; }
.tb-badge {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--green);
  color: var(--green-ink);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  vertical-align: 1px;
}
.tb-badge[hidden] { display: none; }

.acct { display: flex; align-items: center; gap: 8px; }
.acct-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.acct-ticket {
  font-size: 11.5px;
  color: #8b98a7;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, .16);
  white-space: nowrap;
}
.acct-ticket b { color: var(--green); font-weight: 700; }

/* 卡片右下角：投票 */
.vbtn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(6, 9, 13, .66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #c8d3df;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.vbtn svg { opacity: .75; }
.vbtn:hover { color: #fff; border-color: rgba(255, 255, 255, .42); background: rgba(10, 14, 19, .86); transform: translateY(-1px); }
.vbtn.on { color: #ffc857; border-color: rgba(255, 200, 87, .55); background: rgba(58, 41, 10, .74); }
.vbtn.on svg { fill: #ffc857; opacity: 1; }
.vbtn.closed { opacity: .45; cursor: not-allowed; }
.vbtn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

body.offline .vbtn { display: none; }

/* 登录弹窗 */
.dlg {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 5, 8, .74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.dlg[hidden] { display: none; }
.dlg-card {
  width: 100%;
  max-width: 380px;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: #0b1016;
  box-shadow: 0 30px 80px -30px #000;
}
.dlg-card h3 { font-size: 18px; }
.dlg-sub { margin-top: 7px; font-size: 12.5px; line-height: 1.65; color: #8b98a7; }
.field { display: block; margin-top: 14px; }
.field span { display: block; margin-bottom: 6px; font-size: 11.5px; letter-spacing: .06em; color: #8b98a7; }
.field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus {
  border-color: rgba(126, 231, 135, .55);
  box-shadow: 0 0 0 4px rgba(126, 231, 135, .08);
}
.dlg-err { margin-top: 12px; font-size: 12.5px; color: #ff8080; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* 排行榜 */
.board {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 5, 8, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.board[hidden] { display: none; }
.board-in {
  width: 100%;
  max-width: 760px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: #0a0e14;
  box-shadow: 0 40px 100px -40px #000;
  overflow: hidden;
}
.board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.board-head h2 { font-size: 19px; }
.board-head p { margin-top: 4px; font-size: 12px; color: #7f8c9b; }
.board-list { overflow-y: auto; padding: 10px 14px 14px; }
.brow { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; }
.brow + .brow { border-top: 1px solid rgba(255, 255, 255, .04); }
.brow.mine { background: rgba(126, 231, 135, .06); }
.brank {
  width: 26px;
  text-align: center;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: #6f7c8b;
}
.brow.gold .brank { color: #ffc857; font-weight: 700; }
.brow.silver .brank { color: #cfd8e3; font-weight: 700; }
.brow.bronze .brank { color: #e0985f; font-weight: 700; }
.bthumb {
  width: 78px;
  height: 49px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #05070a;
}
.bmain { flex: 1 1 auto; min-width: 0; }
.bname { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; }
.bname small { font-weight: 400; font-size: 10px; color: #6f7c8b; font-family: ui-monospace, Consolas, monospace; }
.bmine { padding: 2px 6px; border-radius: 999px; background: var(--green); color: var(--green-ink); font-size: 9.5px; font-weight: 700; }
.bttl { margin-top: 2px; font-size: 11.5px; color: #7f8c9b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bbar { height: 4px; margin-top: 6px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bbar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #7ee787, #63b3ff); }
.bnum, .bplay { flex: 0 0 auto; min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.bnum b { font-size: 18px; color: var(--text); }
.bnum span, .bplay span { margin-left: 2px; font-size: 9.5px; color: #6f7c8b; }
.bplay b { font-size: 13px; color: #9aa7b5; }
.board-foot { padding: 10px 20px; border-top: 1px solid var(--line); font-size: 11.5px; color: #7f8c9b; }

/* 「我的投票」：比排行榜窄一点，行里多一个撤回按钮 */
.mypane .board-in { max-width: 640px; }
.brank.bheart { display: grid; place-items: center; color: var(--green); }
.unvote {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: transparent;
  color: #9aa7b5;
  font-size: 12px;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.unvote:hover:not(:disabled) { color: #ff9d9d; border-color: rgba(255, 120, 120, .5); background: rgba(255, 90, 90, .08); }
.unvote:disabled { opacity: .4; cursor: not-allowed; }

.mypane-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 46px 24px 52px;
  text-align: center;
  color: #6f7c8b;
}
.mypane-empty svg { color: rgba(126, 231, 135, .55); }
.mypane-empty p { margin-top: 4px; font-size: 14px; font-weight: 600; color: #b9c4d0; }
.mypane-empty span { max-width: 360px; font-size: 12px; line-height: 1.65; }

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 80;
  transform: translate(-50%, 12px);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(12, 17, 23, .96);
  color: var(--text);
  font-size: 12.5px;
  box-shadow: 0 18px 40px -18px #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s, transform .24s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[hidden] { display: none; }

/* ---------------- 动效 ---------------- */

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.82); }
}
@keyframes crawl { to { stroke-dashoffset: -17; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 右上角常驻：排行榜 / 账号 ---------------- */

.top-actions {
  position: fixed;
  top: 18px;
  right: 26px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(6, 9, 13, .55);
  border: 1px solid rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -30px #000;
  transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
}
.top-actions[hidden] { display: none; }
.top-actions .tb-btn { height: 32px; }
.top-actions.collapsed {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
}
body.overlay-open .top-actions {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
}

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

@media (max-width: 900px) {
  .wrap { width: calc(100% - 40px); }
  .result-count { display: none; }
  .hero-wave { height: 120px; bottom: -22px; }
  .tb-right { display: none; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding-top: 40px; }
  h1 { font-size: clamp(56px, 19vw, 96px); }
  .kicker { font-size: 10px; letter-spacing: .18em; gap: 9px; flex-wrap: wrap; }
  .lede br { display: none; }
  .hero-body { gap: 26px; }
  .stats { gap: 26px; }
  .stats b { font-size: 22px; }
  .toolbar { padding: 10px 0; }
  .toolbar-in { gap: 10px; }
  .search { flex: 1 1 100%; max-width: none; }
  .search kbd { display: none; }
  .chips {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; height: 33px; font-size: 12px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  main { padding: 22px 0 48px; }
  .cap h3 { font-size: 17px; }
  .foot-right { text-align: left; }

  .top-actions { top: 10px; right: 12px; gap: 6px; padding: 5px; }
  .top-actions .tb-btn { height: 30px; padding: 0 11px; font-size: 12px; }
  .top-actions .acct-ticket { display: none; }
  .top-actions .acct-name { font-size: 12px; }

  .modal { padding: 0; }
  .shell {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .bar { padding: 8px 8px 8px 12px; gap: 8px; }
  .bar .ttl { display: none; }
  .bar h2 { font-size: 14.5px; }
  .bar .num { font-size: 9px; }
  .seg button { padding: 0 8px; font-size: 10.5px; }
  .icon-btn { width: 34px; height: 34px; }
  .bar-foot { height: 46px; padding: 0 10px; }
  .bar-foot .hint { display: none; }
  .nav { width: 100%; justify-content: space-between; }

  .acct-name { display: none; }
  .tb-btn { height: 31px; padding: 0 11px; font-size: 12px; }
  .vbtn { height: 27px; padding: 0 8px; font-size: 11px; }
  .board { padding: 0; }
  .board-in { max-height: 100dvh; height: 100dvh; max-width: none; border-radius: 0; border: 0; }
  .bthumb { width: 58px; height: 36px; }
  .bplay { display: none; }
  .bnum b { font-size: 16px; }
  .dlg { padding: 14px; }
}

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