/* ==========================================================================
   WEB3A · 网页 3A 游戏导航（作品库）
   设计语言：深色影院感 + 香槟金强调色，大面积留白、细发丝线、动态预览
   ========================================================================== */

/* ------------------------------ 设计变量 ------------------------------ */
:root {
  --bg: #05060a;
  --bg-soft: #090b12;
  --surface: rgba(18, 21, 30, 0.66);
  --surface-solid: #10131c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f7;
  --text-dim: #c3cad8;
  --muted: #98a2b5;
  --muted-dark: #6c7488;
  --gold: #e9cb8d;
  --gold-strong: #f4dca6;
  --gold-deep: #c19a58;
  --danger: #ff8a7a;

  --shell: 1320px;
  --header-h: 76px;
  --radius: 20px;
  --space: clamp(48px, 6vw, 84px);

  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 40px 80px -50px rgba(0, 0, 0, 0.95);

  --font-sans: "Inter", "Segoe UI Variable", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Inter", "Segoe UI Variable Display", "Segoe UI", "PingFang SC",
    "Microsoft YaHei UI", system-ui, sans-serif;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
ol,
ul,
fieldset {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(233, 203, 141, 0.32);
  color: #fff;
}

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

/* hidden 属性必须能压过组件自身的 display（.state 等是 flex） */
[hidden] {
  display: none !important;
}

html[data-lang="en"] body {
  letter-spacing: 0.005em;
}

/* ------------------------------ 通用工具 ------------------------------ */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #171207;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}

.skip-link:focus-visible {
  transform: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

html[data-lang="zh"] .eyebrow {
  letter-spacing: 0.16em;
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: pulse 2.8s ease-in-out infinite;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

html[data-lang="zh"] .section-title {
  letter-spacing: 0.03em;
}

.section-desc {
  max-width: 46ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ------------------------------ 背景层 ------------------------------ */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(28, 34, 52, 0.55), transparent 60%),
    var(--bg);
}

.backdrop__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.backdrop__glow--gold {
  width: 52vw;
  height: 52vw;
  top: -18vw;
  right: -12vw;
  background: radial-gradient(circle, rgba(201, 154, 88, 0.42), transparent 68%);
  animation: drift 26s ease-in-out infinite alternate;
}

.backdrop__glow--ice {
  width: 46vw;
  height: 46vw;
  top: 26vh;
  left: -16vw;
  background: radial-gradient(circle, rgba(110, 146, 214, 0.24), transparent 70%);
  animation: drift 32s ease-in-out infinite alternate-reverse;
}

.backdrop__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(85% 60% at 50% 12%, #000 15%, transparent 78%);
  opacity: 0.5;
}

.backdrop__grain {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  opacity: 0.16;
  mix-blend-mode: overlay;
}

/* ------------------------------ 按钮 ------------------------------ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    transform 0.3s var(--ease),
    background-color 0.25s,
    border-color 0.25s,
    color 0.25s,
    box-shadow 0.3s var(--ease);
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn__arrow {
  transition: transform 0.3s var(--ease);
}

.btn__plus {
  display: none;
  width: 16px;
  height: 16px;
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.btn--primary {
  background: linear-gradient(135deg, #f7e2b4 0%, var(--gold) 42%, var(--gold-deep) 100%);
  color: #1a1408;
  box-shadow:
    0 12px 32px -16px rgba(233, 203, 141, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 44px -18px rgba(233, 203, 141, 0.96),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.btn--ghost:hover {
  border-color: rgba(233, 203, 141, 0.55);
  background: rgba(233, 203, 141, 0.08);
  color: var(--gold-strong);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 9px 17px;
  font-size: 0.84rem;
}

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

/* ------------------------------ 顶部导航 ------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  transition: background-color 0.35s var(--ease), border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(5, 6, 10, 0.78);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 34px);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(233, 203, 141, 0.28));
}

.brand__mark svg {
  width: 100%;
  height: 100%;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__text strong {
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.brand__text em {
  font-style: normal;
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: var(--muted-dark);
}

/* Logo 右侧的一句话说明 */
.brand-tagline {
  margin: 0;
  padding-left: clamp(12px, 1.4vw, 20px);
  border-left: 1px solid var(--line);
  color: var(--muted-dark);
  font-size: 0.72rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.brand-tagline span {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* 搜索框 */
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: clamp(180px, 20vw, 260px);
  height: 40px;
  padding: 0 40px 0 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s, width 0.3s var(--ease);
}

.search:focus-within {
  border-color: rgba(233, 203, 141, 0.5);
  background: rgba(233, 203, 141, 0.06);
  box-shadow: 0 0 0 3px rgba(233, 203, 141, 0.1);
}

.search__icon {
  position: absolute;
  left: 13px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.search__icon svg {
  width: 100%;
  height: 100%;
}

.search input {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 0.86rem;
  color: var(--text);
  appearance: none;
}

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

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

.search__kbd {
  position: absolute;
  right: 10px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.68rem;
  color: var(--muted-dark);
  background: rgba(255, 255, 255, 0.04);
}

/* 语言切换 */
.lang {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.lang__btn {
  min-width: 32px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.lang__btn:hover {
  color: var(--text);
}

.lang__btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(233, 203, 141, 0.96), rgba(193, 154, 88, 0.92));
  color: #191207;
  box-shadow: 0 4px 14px -6px rgba(233, 203, 141, 0.8);
}

/* ------------------------------ 作品库 ------------------------------ */
.library {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + clamp(34px, 4.5vw, 62px)) 0 var(--space);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* 标题区压成一行：标签 + 标题 + 一句话说明，右侧作品数 */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 28px;
  margin-bottom: 22px;
}

.section-head__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  min-width: 0;
  max-width: none;
}

.section-head__text .eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
}

html[data-lang="zh"] .section-head__text .eyebrow {
  letter-spacing: 0.14em;
}

.section-head__text .section-title {
  margin-top: 0;
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  line-height: 1.15;
}

.section-head__text .section-desc {
  margin-top: 0;
  max-width: 58ch;
  font-size: 0.86rem;
  line-height: 1.5;
}

@media (min-width: 861px) {
  .section-head__text .section-desc {
    padding-left: 16px;
    border-left: 1px solid var(--line-strong);
  }
}

.section-head__count {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted-dark);
  white-space: nowrap;
}

/* ------------------------------ 工具栏 ------------------------------ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 24px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.chip-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}

.chip-filter:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.chip-filter[aria-pressed="true"] {
  border-color: rgba(233, 203, 141, 0.5);
  background: rgba(233, 203, 141, 0.12);
  color: var(--gold-strong);
}

.chip-filter__count {
  font-size: 0.68rem;
  color: var(--muted-dark);
}

.chip-filter[aria-pressed="true"] .chip-filter__count {
  color: rgba(233, 203, 141, 0.7);
}

.toolbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.2s;
  white-space: nowrap;
}

.toggle:hover {
  color: var(--text);
}

.toggle__track {
  position: relative;
  display: block;
  width: 34px;
  height: 19px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  transition: background-color 0.25s, border-color 0.25s;
}

.toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.25s var(--ease), background-color 0.25s;
}

.toggle[aria-pressed="true"] .toggle__track {
  border-color: rgba(233, 203, 141, 0.6);
  background: rgba(233, 203, 141, 0.22);
}

.toggle[aria-pressed="true"] .toggle__thumb {
  transform: translateX(15px);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(233, 203, 141, 0.7);
}

.select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 32px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.select__label {
  color: var(--muted-dark);
}

.select select {
  appearance: none;
  border: 0;
  background: none;
  font-size: 0.78rem;
  color: var(--text-dim);
  padding-right: 2px;
  cursor: pointer;
}

.select select:focus-visible {
  outline: none;
}

.select select option {
  background: #12151d;
  color: var(--text);
}

.select__arrow {
  position: absolute;
  right: 11px;
  width: 14px;
  height: 14px;
  color: var(--muted-dark);
  pointer-events: none;
}

/* ------------------------------ 卡片网格 ------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
}

.card {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(24, 27, 39, 0.72), rgba(11, 13, 20, 0.92));
  overflow: hidden;
  transition:
    transform 0.5s var(--ease),
    border-color 0.35s,
    box-shadow 0.5s var(--ease);
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(233, 203, 141, 0.14),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 2;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(233, 203, 141, 0.34);
  box-shadow:
    0 44px 90px -46px rgba(0, 0, 0, 0.98),
    0 0 0 1px rgba(233, 203, 141, 0.12);
}

.card:hover::after,
.card:focus-within::after {
  opacity: 1;
}

.card__link {
  display: block;
  height: 100%;
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0b0d14;
}

.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__poster {
  transform: scale(1.02);
  transition: transform 1.2s var(--ease), opacity 0.5s;
}

.card__gif {
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  z-index: 1;
}

.card.is-playing .card__gif {
  opacity: 1;
}

.card:hover .card__poster {
  transform: scale(1.08);
}

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(5, 6, 10, 0.42) 0%, transparent 34%, transparent 58%, rgba(5, 6, 10, 0.72) 100%);
  pointer-events: none;
}

.card__badge {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid rgba(233, 203, 141, 0.42);
  border-radius: 999px;
  background: rgba(20, 16, 8, 0.66);
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-strong);
  backdrop-filter: blur(8px);
}

.card__badge::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.card__hint {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 3;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  transition: opacity 0.3s;
}

.card.is-playing .card__hint {
  opacity: 0;
}

.card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(8, 9, 14, 0.42);
  color: #fff;
  backdrop-filter: blur(6px);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.35s, transform 0.45s var(--ease), background-color 0.3s;
}

.card__play svg {
  width: 20px;
  height: 20px;
  margin-left: 3px;
}

.card:hover .card__play,
.card:focus-within .card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  background: rgba(233, 203, 141, 0.9);
  color: #16110a;
  border-color: transparent;
}

.card__report {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(8, 9, 14, 0.5);
  color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s, transform 0.3s var(--ease), border-color 0.2s, color 0.2s;
}

.card__report svg {
  width: 15px;
  height: 15px;
}

.card:hover .card__report,
.card__report:focus-visible {
  opacity: 1;
  transform: none;
}

.card__report:hover {
  border-color: rgba(255, 138, 122, 0.6);
  color: var(--danger);
}

.card__body {
  padding: 20px 22px 22px;
}

.card__titles {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.card__title {
  font-size: 1.16rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.card__subtitle {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.card__tagline {
  margin-top: 9px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--gold-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__desc {
  /* 隐藏卡片简介 */
  display: none;
  margin-top: 10px;
  font-size: 0.84rem;
  line-height: 1.62;
  color: var(--muted);
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.tags li {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  transition: gap 0.25s var(--ease);
}

.card__cta svg {
  width: 14px;
  height: 14px;
}

.card:hover .card__cta {
  gap: 9px;
  color: var(--gold-strong);
}

.card.is-hidden {
  display: none;
}

/* ------------------------------ 列表状态 ------------------------------ */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 72px 20px;
  text-align: center;
  color: var(--muted);
}

.state h2 {
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--text);
}

.state p {
  max-width: 42ch;
  font-size: 0.88rem;
}

.state .btn {
  margin-top: 10px;
}

.state__spinner {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.state__glyph {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-dark);
  margin-bottom: 4px;
}

.state__glyph svg {
  width: 26px;
  height: 26px;
}

.state--error h2 {
  color: var(--danger);
}

/* ------------------------------ 页脚 ------------------------------ */
.site-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: 0;
  border-top: 1px solid var(--line);
  background: rgba(6, 7, 12, 0.6);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
  padding-block: clamp(18px, 2.4vw, 26px);
}

.footer__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
}

.footer__brand .brand__mark {
  width: 30px;
  height: 30px;
}

.footer__brand .brand__text strong {
  font-size: 0.94rem;
}

.footer__about {
  margin-top: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: balance;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 0;
  font-size: 0.83rem;
}

.footer__links a {
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--gold);
}

.footer__bottom {
  border-top: 1px solid var(--line);
}

.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  font-size: 0.7rem;
  color: var(--muted-dark);
}

.footer__copy {
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ------------------------------ 回到顶部 ------------------------------ */
.to-top {
  position: fixed;
  right: clamp(16px, 2.4vw, 34px);
  bottom: clamp(16px, 2.4vw, 34px);
  z-index: 50;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(10, 12, 18, 0.72);
  color: var(--text-dim);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s var(--ease), border-color 0.2s, color 0.2s;
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  border-color: rgba(233, 203, 141, 0.5);
  color: var(--gold);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

/* ------------------------------ Toast ------------------------------ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 120;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 20px;
  border: 1px solid rgba(233, 203, 141, 0.35);
  border-radius: 999px;
  background: rgba(14, 16, 24, 0.95);
  color: var(--text);
  font-size: 0.82rem;
  text-align: center;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.35s var(--ease);
}

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

/* ------------------------------ 动效 ------------------------------ */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease-out) var(--delay, 0ms),
    transform 0.9s var(--ease-out) var(--delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-4vw, 5vh, 0) scale(1.12);
  }
}

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

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1024px) {
  .section-head {
    gap: 20px;
  }

  .brand-tagline {
    font-size: 0.68rem;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 66px;
  }

  .brand-tagline {
    display: none;
  }

  .search {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .search__icon {
    left: 50%;
    transform: translateX(-50%);
  }

  .search input {
    width: 0;
    padding: 0;
    opacity: 0;
  }

  .search__kbd {
    display: none;
  }

  .search:focus-within {
    width: min(62vw, 280px);
    padding: 0 14px 0 38px;
    justify-content: flex-start;
  }

  .search:focus-within .search__icon {
    left: 13px;
    transform: none;
  }

  .search:focus-within input {
    width: 100%;
    opacity: 1;
  }

  /* 搜索展开时先把语言切换和提交按钮让出来，避免被挤出屏幕 */
  .search:focus-within ~ .lang,
  .search:focus-within ~ .btn--sm {
    display: none;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .toolbar__right {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-head__aside {
    align-self: flex-end;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer__links {
    padding-top: 0;
  }
}

@media (max-width: 700px) {
  .chips {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

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

  .chip-filter {
    flex: 0 0 auto;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .brand__text em {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .btn--sm {
    padding: 8px 13px;
  }

  .btn--sm span {
    display: none;
  }

  .btn--sm .btn__arrow {
    display: none;
  }

  .btn--sm .btn__plus {
    display: block;
  }

  .lang__btn {
    min-width: 28px;
    padding: 4px 7px;
  }

  .toast {
    bottom: 20px;
  }
}

@media (hover: none) {
  .card__report {
    opacity: 0.75;
    transform: none;
  }

  .card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.92);
  }

  .card__hint {
    display: none;
  }
}

/* ------------------------------ 打印 ------------------------------ */
@media print {
  .backdrop,
  .site-header,
  .to-top,
  .toast {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ------------------------------ 减少动态效果 ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
