/* =========================================================
   林风小站 · LinFengChan —— 毛玻璃个人博客
   主题色：#7288fd（纯蓝系）| 字体：MiSans / DSEG7 数码管
   背景：壁纸（10% 模糊）+ 天气联动（晴 / 阴 / 雨）
   ========================================================= */

/* ---------- 字体 ---------- */
@font-face {
  font-family: 'DSEG7-Classic';
  src: url('fonts/DSEG7Classic-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- 主题变量 ---------- */
:root {
  color-scheme: light;
  --font: "MiSans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;

  --bg-1: #e4ecff;
  --bg-2: #f0f4ff;
  --text: #232a40;
  --text-2: rgba(35, 42, 64, 0.62);
  --text-3: rgba(35, 42, 64, 0.42);

  --glass: rgba(255, 255, 255, 0.34);
  --glass-strong: rgba(255, 255, 255, 0.58);
  --glass-soft: rgba(255, 255, 255, 0.22);
  --border: rgba(255, 255, 255, 0.66);
  --border-strong: rgba(255, 255, 255, 0.92);
  --shadow: 0 24px 60px rgba(72, 92, 190, 0.16), 0 4px 14px rgba(72, 92, 190, 0.08);
  --shadow-hover: 0 32px 80px rgba(72, 92, 190, 0.26), 0 8px 24px rgba(72, 92, 190, 0.1);

  --accent: #7288fd;
  --accent-2: #8fa8ff;
  --accent-soft: rgba(114, 136, 253, 0.15);
  --grad: linear-gradient(135deg, #7288fd, #8fa8ff);
  --grad-text: linear-gradient(120deg, #5f78f5, #8fa8ff);
  --ok: #2fb97f;
  --ok-soft: rgba(47, 185, 127, 0.16);
  --err: #f05c6c;
  --err-soft: rgba(240, 92, 108, 0.16);

  --blur: 26px;
  --radius: 22px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg-1: #0a0e22;
  --bg-2: #131a38;
  --text: #eef1fb;
  --text-2: rgba(238, 241, 251, 0.64);
  --text-3: rgba(238, 241, 251, 0.4);

  --glass: rgba(18, 23, 46, 0.4);
  --glass-strong: rgba(24, 30, 58, 0.66);
  --glass-soft: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.24);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 32px 80px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.35);

  --accent: #8fa1ff;
  --accent-2: #aec2ff;
  --accent-soft: rgba(143, 161, 255, 0.16);
  --grad: linear-gradient(135deg, #7288fd, #9db2ff);
  --grad-text: linear-gradient(120deg, #93a8ff, #c0d0ff);
  --ok: #3fd393;
  --ok-soft: rgba(63, 211, 147, 0.18);
  --err: #ff7a8c;
  --err-soft: rgba(255, 122, 140, 0.18);
}

/* ---------- 天气主题（晴 / 阴 / 雨） ---------- */
body.weather-sunny {
  --bg-1: #dcebff;
  --bg-2: #fdf4e0;
}
html[data-theme="dark"] body.weather-sunny {
  --bg-1: #10152e;
  --bg-2: #1a2145;
}
body.weather-cloudy {
  --bg-1: #c3cbdc;
  --bg-2: #e3e7f1;
}
body.weather-rain {
  --bg-1: #97a2c1;
  --bg-2: #c4cadb;
}
body.weather-snow {
  --bg-1: #9aa6c2;
  --bg-2: #c9cfde;
}
body.weather-sunny .blob { opacity: 0.7; }
body.weather-cloudy .blob { opacity: 0.34; filter: blur(70px) saturate(0.45); }
body.weather-rain .blob { opacity: 0.26; filter: blur(70px) saturate(0.35); }
body.weather-snow .blob { opacity: 0.3; filter: blur(70px) saturate(0.45); }
html[data-theme="dark"] body.weather-sunny .blob { opacity: 0.38; }
html[data-theme="dark"] body.weather-cloudy .blob { opacity: 0.2; }
html[data-theme="dark"] body.weather-rain .blob { opacity: 0.16; }
html[data-theme="dark"] body.weather-snow .blob { opacity: 0.18; }
html[data-theme="dark"] body.weather-rain { --bg-1: #0b0f24; --bg-2: #151b3d; }
html[data-theme="dark"] body.weather-cloudy { --bg-1: #0c1026; --bg-2: #171d40; }
html[data-theme="dark"] body.weather-snow { --bg-1: #0d1229; --bg-2: #182046; }

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

html {
  scroll-behavior: smooth;
  /* 始终保留滚动条槽位：打开弹窗锁定滚动时，视口宽度不变，顶栏/内容不位移 */
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font);
  font-weight: 330;
  color: var(--text);
  background: var(--bg-1);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.7s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

b,
strong {
  font-weight: 520;
}

h1, h2, h3 {
  font-weight: 630;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

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

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

input, textarea {
  font-family: inherit;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--text) 38%, transparent);
  background-clip: padding-box;
}

/* ---------- 背景层（z-index 0：Chrome 的 backdrop-filter 不采样负 z-index 层，故背景与内容都用正层级） ---------- */
/* 底色渐变（固定层） */
.bg-base {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, var(--bg-1), var(--bg-2) 55%, var(--bg-1));
  transition: background 0.7s ease;
  pointer-events: none;
}

/* 壁纸（10% 模糊，右侧渐隐） */
.bg-wall {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("../assets/wallpaper.jpg");
  background-repeat: no-repeat;
  background-position: 78% 22%;
  background-size: cover;
  opacity: 0.92;
  filter: blur(10px) saturate(1.08);
  -webkit-mask-image: linear-gradient(100deg, transparent 24%, #000 82%);
  mask-image: linear-gradient(100deg, transparent 24%, #000 82%);
  transition: opacity 0.9s ease, filter 0.9s ease;
  pointer-events: none;
}

html[data-theme="dark"] .bg-wall {
  opacity: 0.5;
  filter: blur(10px) brightness(0.72) saturate(0.9);
}

@media (max-width: 900px) {
  .bg-wall {
    background-position: 84% 10%;
    opacity: 0.55;
    -webkit-mask-image: linear-gradient(100deg, transparent 46%, #000 99%);
    mask-image: linear-gradient(100deg, transparent 46%, #000 99%);
  }
  html[data-theme="dark"] .bg-wall {
    opacity: 0.3;
  }
}

/* 光斑 + 噪点 + 雨幕 */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.62;
  will-change: transform;
}

.blob-1 {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle at 35% 35%, #9fb0ff, #7288fd 70%);
  animation: drift1 26s ease-in-out infinite alternate;
}

.blob-2 {
  width: 460px;
  height: 460px;
  top: 30%;
  right: -140px;
  background: radial-gradient(circle at 60% 40%, #bcd2ff, #8fa8ff 75%);
  animation: drift2 30s ease-in-out infinite alternate;
}

.blob-3 {
  width: 420px;
  height: 420px;
  bottom: -160px;
  left: 30%;
  background: radial-gradient(circle at 50% 50%, #8fe0d2, #57b8d0 75%);
  opacity: 0.45;
  animation: drift3 34s ease-in-out infinite alternate;
}

/* blob-4：左下角光斑，为迷你播放器毛玻璃提供可模糊的细节（壁纸 mask 左侧透明，左下角原本只有纯渐变） */
.blob-4 {
  width: 520px;
  height: 520px;
  bottom: -200px;
  left: -140px;
  background: radial-gradient(circle at 40% 40%, #aab9ff, #7288fd 72%);
  opacity: 0.5;
  animation: drift4 29s ease-in-out infinite alternate;
}

html[data-theme="dark"] .blob {
  opacity: 0.28;
}

@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(90px, 70px) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate(0, 0) scale(1.05); }
  to { transform: translate(-110px, 90px) scale(0.92); }
}
@keyframes drift3 {
  from { transform: translate(0, 0) scale(0.95); }
  to { transform: translate(70px, -80px) scale(1.12); }
}
@keyframes drift4 {
  from { transform: translate(0, 0) scale(0.96); }
  to { transform: translate(60px, -50px) scale(1.08); }
}

/* 雨/雪粒子（DOM 粒子 + 纯 CSS 动画；整体模糊化处理，卡片内外皆为柔和雨幕/雪影） */
.rain-dom,
.snow-dom {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  display: none;
  filter: blur(5px);
}

body.weather-rain .rain-dom,
body.weather-storm .rain-dom {
  display: block;
}

body.weather-snow .snow-dom {
  display: block;
}

/* 雨滴 */
.rd {
  position: absolute;
  top: -15%;
  width: 2px;
  border-radius: 3px;
  animation: rdFall var(--d, 0.8s) linear infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes rdFall {
  to { transform: translate3d(var(--drift, -30px), 120vh, 0); }
}

/* 雪花（外层下落 + 内层左右摆动，六边形晶体） */
.sf {
  position: absolute;
  top: -5%;
  animation: sfFall var(--d, 7s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.sf > .sf-sway {
  width: 100%;
  height: 100%;
  animation: sfSway var(--sway, 3s) ease-in-out infinite alternate;
}

.sf > .sf-sway svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.55));
}

@keyframes sfFall {
  to { transform: translate3d(var(--drift, 20px), 110vh, 0); }
}

@keyframes sfSway {
  from { transform: translateX(-6px); }
  to { transform: translateX(6px); }
}

/* 灰蒙蒙雾层：阴天与雨天 */
.haze {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.8s ease;
  pointer-events: none;
}

body.weather-cloudy .haze {
  background: rgba(122, 132, 152, 0.26);
}

body.weather-rain .haze {
  background: rgba(92, 102, 128, 0.4);
}

body.weather-snow .haze {
  background: rgba(140, 152, 178, 0.32);
}

html[data-theme="dark"] body.weather-cloudy .haze {
  background: rgba(60, 66, 84, 0.35);
}

html[data-theme="dark"] body.weather-rain .haze {
  background: rgba(48, 54, 74, 0.5);
}

html[data-theme="dark"] body.weather-snow .haze {
  background: rgba(62, 72, 100, 0.42);
}

/* 雨天卡片更实一点：雨明确在卡片后方（透过毛玻璃呈模糊雨幕） */
body.weather-rain {
  --glass: rgba(255, 255, 255, 0.46);
}

html[data-theme="dark"] body.weather-rain {
  --glass: rgba(22, 28, 54, 0.55);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 毛玻璃卡片 ---------- */
.glass,
.glass-card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--border);
}

.glass-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  background: var(--glass-soft);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* 三栏网格：左右 1fr 撑开，导航严格居中 */
.topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  min-width: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(114, 136, 253, 0.4);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.06);
}

.logo-text {
  font-weight: 630;
  font-size: 1.22rem;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-sub {
  font-size: 0.58rem;
  font-weight: 520;
  letter-spacing: 2.6px;
  color: var(--text-3);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-links a {
  position: relative;
  padding: 8px 15px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-2);
  transition: color 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--glass-soft);
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 520;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- 图标按钮 ---------- */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: var(--glass-soft);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.icon-btn:hover {
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(72, 92, 190, 0.18);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 播放/暂停/上一首/下一首为实心扁平图标 */
.play-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: none;
}

#prevBtn svg,
#nextBtn svg {
  fill: currentColor;
  stroke: none;
}

/* 播放模式：三态图标切换 */
.mode-btn .ic-single,
.mode-btn .ic-shuffle {
  display: none;
}
.mode-btn.mode-single .ic-repeat { display: none; }
.mode-btn.mode-single .ic-single { display: block; }
.mode-btn.mode-shuffle .ic-repeat { display: none; }
.mode-btn.mode-shuffle .ic-shuffle { display: block; }
.icon-btn.mode-single,
.icon-btn.mode-shuffle {
  color: var(--accent);
  background: var(--accent-soft);
}

/* 主题切换：日/月渐变 */
.theme-btn .ic-moon {
  display: none;
}
html[data-theme="dark"] .theme-btn .ic-sun {
  display: none;
}
html[data-theme="dark"] .theme-btn .ic-moon {
  display: block;
}

.theme-btn svg {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html[data-theme="dark"] .theme-btn:hover svg {
  transform: rotate(30deg) scale(1.1);
}
.theme-btn:hover svg {
  transform: rotate(-30deg) scale(1.1);
}

/* ---------- 主区域 ---------- */
main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 96px 24px 60px;
  width: 100%;
  flex: 1;
  position: relative;
  z-index: 2; /* 位于背景层之上，保证毛玻璃能采样到背景（含雨幕） */
}

.page {
  display: none;
  animation: pageIn 0.45s ease both;
}

.page.active {
  display: block;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Hero：时钟 + 天气 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 22px;
  align-items: stretch;
  padding: 8px 0 10px;
}

.hero-card {
  text-align: center;
  padding: 44px 30px 34px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 180px at 15% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(420px 200px at 90% 100%, rgba(143, 168, 255, 0.14), transparent 70%);
  pointer-events: none;
}
/* 七段数码管时钟面板（白色数字） */
.clock {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 10px;
  width: fit-content;
  padding: 14px 26px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(9, 13, 30, 0.62), rgba(9, 13, 30, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 3px 16px rgba(0, 0, 0, 0.4), 0 12px 34px rgba(30, 40, 90, 0.2);
  font-variant-numeric: tabular-nums;
}

.clock-num {
  font-family: 'DSEG7-Classic', ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-weight: 700;
  font-size: clamp(2.9rem, 7.6vw, 4.4rem);
  letter-spacing: 2px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 16px rgba(143, 168, 255, 0.75);
}

.clock-sec {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  opacity: 0.9;
}

.clock-colon {
  font-family: 'DSEG7-Classic', ui-monospace, Consolas, monospace;
  font-size: clamp(2rem, 5.2vw, 3rem);
  font-weight: 700;
  color: #cfdcff;
  animation: blink 1s steps(1) infinite;
  line-height: 1;
}

@keyframes blink {
  50% { opacity: 0.2; }
}

.date-line {
  color: var(--text-2);
  font-size: 0.96rem;
  letter-spacing: 1px;
}

.typewriter {
  margin-top: 16px;
  min-height: 1.8em;
  font-size: 1rem;
  color: var(--text-2);
  font-style: italic;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 打字机署名行（留言人，下一行末端） */
.typewriter-name {
  min-height: 1.4em;
  margin-top: 2px;
  font-size: 0.88rem;
  color: var(--text-3);
  text-align: right;
  opacity: 0;
  transition: opacity 0.5s ease;
  font-style: italic;
}

.typewriter-name.show {
  opacity: 1;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 3px;
  background: var(--accent);
  vertical-align: -0.18em;
  animation: caretBlink 0.8s steps(1) infinite;
}

@keyframes caretBlink {
  50% { opacity: 0; }
}

.hero-stats {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 0.86rem;
  color: var(--text-2);
  background: var(--glass-soft);
  border: 1px solid var(--border);
}

.chip b {
  color: var(--text);
}

/* ---------- 天气卡片 ---------- */
.weather-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.weather-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px 160px at 90% 0%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 16px 0 18px;
  position: relative;
}

.weather-icon {
  font-size: 3.3rem;
  line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(114, 136, 253, 0.35));
  animation: wIconFloat 4s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-icon svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes wIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.weather-info {
  min-width: 0;
}

.weather-temp {
  font-size: 2.6rem;
  font-weight: 630;
  line-height: 1.1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.weather-city {
  font-size: 1rem;
  font-weight: 520;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-desc {
  font-size: 0.86rem;
  color: var(--text-2);
}

.weather-meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 0.8rem;
  color: var(--text-3);
  position: relative;
}

/* 天气演示按钮 */
.weather-demo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.wd-label {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-right: 2px;
}

.wd-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: var(--glass-soft);
  border: 1px solid var(--border);
  transition: all 0.22s ease;
}

.wd-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wd-btn:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.wd-btn.active {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
}

/* ---------- 区块 ---------- */
.block {
  margin-top: 46px;
}

.block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.block-title h2,
.card-head h2 {
  font-size: 1.5rem;
  font-weight: 630;
  letter-spacing: 0.5px;
}

.pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 520;
  letter-spacing: 2.4px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.link-more {
  font-size: 0.92rem;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--glass-soft);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.link-more span {
  display: inline-block;
  transition: transform 0.25s ease;
}

.link-more:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.link-more:hover span {
  transform: translateX(4px);
}

/* ---------- 文章 / 留言 行式列表 ---------- */
.list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.list-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.empty-tip {
  padding: 42px 20px;
  text-align: center;
  color: var(--text-dim, #888);
  font-size: 15px;
  letter-spacing: 1px;
}

.list-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.list-cover {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(72, 92, 190, 0.25);
}

.cover-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.list-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.grad-a { background: linear-gradient(135deg, #7288fd, #8fa8ff); }
.grad-b { background: linear-gradient(135deg, #4ec6e8, #7288fd); }
.grad-c { background: linear-gradient(135deg, #f6a0c0, #ff8f6b); }
.grad-d { background: linear-gradient(135deg, #7fe3c4, #4db8c8); }
.grad-e { background: linear-gradient(135deg, #f7c873, #ff9a6b); }
.grad-f { background: linear-gradient(135deg, #a78bfa, #8b7af5); }

.list-info {
  flex: 1;
  min-width: 0;
}

.list-info h3 {
  font-size: 1.06rem;
  font-weight: 630;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-info p {
  font-size: 0.86rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

.list-meta {
  font-size: 0.8rem;
  color: var(--text-3);
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  align-items: center;
}

.list-meta .lm-tag {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 520;
}

/* 卡片右下角：字数 + 已浏览百分比 */
.list-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  flex-shrink: 0;
}

.card-stats {
  font-size: 0.74rem;
  color: var(--text-3);
  background: var(--glass-soft);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

.card-stats .cs-read {
  color: var(--accent);
}

.card-stats .cs-done {
  color: var(--ok);
}

/* ---------- 双栏 ---------- */
.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}

.split-item {
  display: flex;
}

.split-item > .glass-card {
  padding: 26px 26px 22px;
  width: 100%;
}

/* ---------- 音乐播放器 ---------- */
.music-card {
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 任何超长内容都不改变卡片形状 */
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 6px 8px 6px 14px;
  border-radius: 14px;
  background: var(--glass-soft);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-row:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search-row svg {
  width: 17px;
  height: 17px;
  color: var(--text-3);
  flex-shrink: 0;
}

.search-row input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 7px 0;
}

.search-row input::placeholder {
  color: var(--text-3);
}

.search-btn {
  padding: 8px 18px;
  border-radius: 11px;
  background: var(--grad);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 520;
  letter-spacing: 1px;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 16px rgba(114, 136, 253, 0.35);
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(114, 136, 253, 0.45);
}

.search-btn:active {
  transform: translateY(0) scale(0.98);
}

.search-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

/* 播放主体 */
.player-main {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
}

.disc-wrap {
  flex-shrink: 0;
}

.disc {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #3a3f55, #23263a, #3a3f55, #23263a);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 0 0 3px rgba(255, 255, 255, 0.12);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.disc img {
  width: 68%;
  height: 68%;
  border-radius: 50%;
  object-fit: cover;
}

.disc-note {
  position: absolute;
  z-index: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  color: #fff;
  display: flex;
}

.disc-note svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.disc.playing {
  animation: spin 14s linear infinite;
}

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

.player-info {
  flex: 1;
  min-width: 0;
}

.song-title {
  font-size: 1.14rem;
  font-weight: 630;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-artist {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 歌词区：固定高度容器，行内绝对定位——歌词多长都不可能改变卡片形状 */
.lyric-box {
  position: relative;
  height: 3.4em;
  margin-top: 12px;
  overflow: hidden;
}

.lyric-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.92rem;
  color: var(--accent);
  height: 1.6em;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-style: italic;
}

/* 歌词翻译：位于原歌词下一行，颜色更深 */
.lyric-trans {
  position: absolute;
  left: 0;
  right: 0;
  top: 1.8em;
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--text) 46%, transparent);
  height: 1.4em;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

/* 超长歌词：双份文本无缝循环滚动（纯 CSS，不改变卡片大小、不会振动） */
.lyric-line.marquee-loop,
.lyric-trans.marquee-loop {
  right: auto;
  width: max-content;
  animation: marqueeLoop var(--dur, 9s) linear infinite;
}

.lyric-line.marquee-loop > span,
.lyric-trans.marquee-loop > span {
  flex-shrink: 0;
}

@keyframes marqueeLoop {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 16px)); } /* 间隙 32px 的一半 */
}

/* 进度条 */
.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.time {
  font-size: 0.76rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
}

.seek {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text) 16%, transparent);
  outline: none;
  cursor: pointer;
  position: relative;
}

.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.seek::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.seek::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.seek.vol {
  width: 74px;
  flex: none;
}

/* 控制按钮 */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(114, 136, 253, 0.4);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 30px rgba(114, 136, 253, 0.5);
}

.play-btn:active {
  transform: scale(0.96);
}

.play-btn svg {
  width: 24px;
  height: 24px;
}

.play-btn .ic-pause {
  display: none;
}

.play-btn.playing .ic-play {
  display: none;
}

.play-btn.playing .ic-pause {
  display: block;
}

.vol-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.vol-wave {
  opacity: 0.75;
}

.icon-btn.muted {
  color: var(--text-3);
}

/* 音量：正常/静音图标切换 */
.vol-wrap .ic-mute {
  display: none;
}
.icon-btn.muted .ic-vol {
  display: none;
}
.icon-btn.muted .ic-mute {
  display: block;
}

/* 歌单（固定高度，保证播放器卡片尺寸恒定，页面不因搜索结果变形） */
.result-list {
  margin-top: 16px;
  height: 236px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.22s ease;
}

.result-item:hover {
  background: var(--glass-soft);
}

.result-item.active {
  background: var(--accent-soft);
}

.result-item .ri-num {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--glass-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-2);
}

.result-item.active .ri-num {
  background: var(--grad);
  color: #fff;
}

.result-item .ri-info {
  flex: 1;
  min-width: 0;
}

.result-item .ri-title,
.result-item .ri-artist {
  display: block;
}

.result-item .ri-title {
  font-size: 0.92rem;
  font-weight: 520;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-item .ri-artist {
  font-size: 0.76rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-item .ri-time {
  font-size: 0.74rem;
  color: var(--text-3);
  flex-shrink: 0;
}

.result-empty {
  text-align: center;
  color: var(--text-3);
  font-size: 0.88rem;
  padding: 22px 0;
}

/* ---------- 百词斩 ---------- */
.game-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.game-hint {
  font-size: 0.72rem;
  color: var(--text-3);
  text-align: right;
  max-width: 178px;
  line-height: 1.5;
}

/* 语言胶囊四级开关（更圆润，国旗 cover 填充完整） */
.lang-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 14px;
  padding: 5px;
  border-radius: 99px;
  background: var(--glass-soft);
  border: 1px solid var(--border);
}

.lang-slider {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(25% - 5px);
  height: calc(100% - 10px);
  border-radius: 99px;
  background: var(--grad);
  box-shadow: 0 6px 16px rgba(114, 136, 253, 0.45);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 当前语言国旗：显示在“百词斩”标题右侧 */
.lang-flag {
  display: inline-block;
  width: 30px;
  height: 21px;
  border-radius: 4px;
  object-fit: cover;
  vertical-align: -3px;
  margin-left: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.lang-seg {
  position: relative;
  z-index: 1;
  padding: 8px 0;
  border-radius: 99px;
  transition: background 0.25s ease;
}

.lang-seg:hover {
  background: rgba(255, 255, 255, 0.12);
}

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: var(--text-2);
  margin-top: 16px;
}

.game-meta b {
  color: var(--text);
  font-size: 1rem;
}

.game-streak {
  color: #f59e0b;
  font-weight: 520;
  transition: transform 0.25s ease;
}

.game-streak.bump {
  animation: bump 0.4s ease;
}

@keyframes bump {
  50% { transform: scale(1.35); }
}

.game-progress {
  height: 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text) 14%, transparent);
  margin-top: 12px;
  overflow: hidden;
}

.game-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--grad);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.game-word {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 630;
  letter-spacing: 0.5px;
  margin-top: 24px;
  word-break: break-word;
}

.game-phonetic {
  text-align: center;
  color: var(--text-3);
  font-size: 0.9rem;
  margin-top: 4px;
  min-height: 1.4em;
}

.game-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.opt {
  padding: 12px 10px;
  border-radius: 14px;
  font-size: 0.94rem;
  font-weight: 400;
  background: var(--glass-soft);
  border: 1.5px solid var(--border);
  transition: all 0.2s ease;
  word-break: break-word;
}

.opt:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent);
}

.opt.correct {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
  animation: pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.opt.wrong {
  background: var(--err-soft);
  border-color: var(--err);
  color: var(--err);
  animation: shake 0.4s ease;
}

.opt:disabled {
  cursor: default;
}

@keyframes pop {
  50% { transform: scale(1.05); }
}

@keyframes shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.game-feedback {
  text-align: center;
  min-height: 2.2em;
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-2);
}

.game-feedback .fb-ok {
  color: var(--ok);
}
.game-feedback .fb-no {
  color: var(--err);
}
.game-feedback .fb-next {
  font-size: 0.8rem;
  color: var(--text-3);
  font-weight: 330;
}

/* 结算 */
.game-end {
  text-align: center;
  padding: 26px 0 10px;
}

.end-ring {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 6px auto 16px;
}

.end-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 12%, transparent);
  stroke-width: 9;
}

.ring-fg {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.end-score {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.end-score b {
  font-size: 2.2rem;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.end-score span {
  font-size: 0.78rem;
  color: var(--text-3);
}

.end-msg {
  font-size: 1.05rem;
  font-weight: 630;
}

.end-stats {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin: 12px 0 20px;
  font-size: 0.88rem;
  color: var(--text-2);
}

.end-stats b {
  color: var(--text);
}

.btn-primary {
  padding: 12px 30px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 520;
  letter-spacing: 1px;
  box-shadow: 0 10px 24px rgba(114, 136, 253, 0.4);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(114, 136, 253, 0.5);
}

.btn-primary:active {
  transform: scale(0.97);
}

.hidden {
  display: none !important;
}

/* ---------- 留言板 ---------- */
.msg-form {
  max-width: 760px;
  margin: 0 auto 26px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg-form input,
.msg-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--glass-soft);
  border-radius: 13px;
  padding: 11px 15px;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.msg-form input:focus,
.msg-form textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.msg-form input::placeholder,
.msg-form textarea::placeholder {
  color: var(--text-3);
}

.msg-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.msg-count {
  font-size: 0.78rem;
  color: var(--text-3);
}

.msg-list {
  max-width: 760px;
  margin: 0 auto;
}

/* 留言条目（与文章卡片同款行式） */
.msg-card {
  cursor: default;
}

.msg-card:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.msg-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 630;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 6px 16px rgba(114, 136, 253, 0.35);
}

.msg-avatar-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px rgba(114, 136, 253, 0.3);
}

.reply-item .msg-avatar,
.reply-item .msg-avatar-img {
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
  box-shadow: none;
}

.reply-del {
  margin-left: auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.reply-del svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reply-del:hover {
  color: var(--err);
  background: var(--err-soft);
}

.msg-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.msg-head .msg-name {
  font-size: 0.98rem;
  font-weight: 630;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-head .msg-name.anon {
  color: var(--text-3);
  font-weight: 400;
}

.msg-head .msg-time {
  font-size: 0.74rem;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.msg-text {
  font-size: 0.92rem;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.75;
  word-break: break-word;
  white-space: pre-wrap;
}

/* 留言操作：点赞 / 回复 */
.msg-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.msg-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 0.78rem;
  color: var(--text-3);
  background: var(--glass-soft);
  border: 1px solid var(--border);
  transition: all 0.22s ease;
}

.msg-action svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msg-action:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.msg-action.liked {
  color: #ff6b81;
  border-color: rgba(255, 107, 129, 0.5);
  background: rgba(255, 107, 129, 0.12);
}

.msg-action.liked svg {
  fill: currentColor;
  stroke: none;
}

/* 回复输入框（第一级小框） */
.reply-box {
  margin-top: 10px;
  display: none;
  gap: 8px;
  align-items: center;
}

.reply-box.open {
  display: flex;
}

.reply-box input {
  flex: 1;
  min-width: 0;
  padding: 8px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass-soft);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.reply-box input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.reply-box input::placeholder {
  color: var(--text-3);
}

/* 回复列表（第二级及以后与第一级并列） */
.reply-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reply-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--glass-soft);
  border: 1px solid var(--border);
}

.reply-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 630;
  color: #fff;
  background: var(--grad);
}

.reply-body {
  flex: 1;
  min-width: 0;
}

.reply-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.reply-name {
  font-size: 0.86rem;
  font-weight: 630;
}

.reply-name.anon {
  color: var(--text-3);
  font-weight: 400;
}

.reply-time {
  font-size: 0.7rem;
  color: var(--text-3);
}

.reply-text {
  font-size: 0.86rem;
  color: var(--text-2);
  margin-top: 3px;
  word-break: break-word;
  white-space: pre-wrap;
}

/* ---------- 顶栏用户头像与悬浮卡 ---------- */
.user-area {
  position: relative;
}

.user-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-soft);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.25s ease;
}

.user-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(72, 92, 190, 0.18);
}

.user-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.user-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-card {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 220px;
  padding: 18px 16px 14px;
  border-radius: 16px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-hover);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 130;
}

.user-area:hover .user-card,
.user-card.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.uc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  border: 2px solid var(--border-strong);
  display: block;
}

.uc-name {
  font-weight: 630;
  font-size: 0.98rem;
}

.uc-login {
  font-size: 0.76rem;
  color: var(--text-3);
  margin: 2px 0 12px;
}

.uc-logout {
  width: 100%;
  padding: 8px 0;
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-2);
  background: var(--glass-soft);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.uc-logout:hover {
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 45%, transparent);
  background: var(--err-soft);
}

/* 留言游客模式提示 */
.guest-hint {
  font-size: 0.76rem;
  color: var(--text-3);
}

/* ---------- 浅草寺抽签 ---------- */
.omikuji-wrap {
  max-width: 560px;
  margin: 0 auto;
}

.omikuji-card {
  padding: 26px;
  text-align: center;
}

.omikuji-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.omikuji-title {
  font-size: 1.05rem;
  font-weight: 630;
  letter-spacing: 3px;
  color: var(--accent);
}

.omikuji-date {
  font-size: 0.78rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* 签纸：红绫带 + 和纸纹理 + 竖排汉诗 + 朱印 */
.omikuji-slip {
  position: relative;
  width: 254px;
  min-height: 480px;
  margin: 0 auto;
  border-radius: 6px;
  background-image: url("../assets/tex/washi.jpg");
  background-size: cover;
  border: 1px solid #d9c196;
  box-shadow: 0 20px 46px rgba(96, 66, 26, 0.38), inset 0 0 44px rgba(140, 105, 55, 0.2);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.slip-band {
  display: none;
}

/* 汉诗竖排：从右到左、从上到下 */
.slip-poem {
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: pre;
  font-family: "Songti SC", "Noto Serif TC", "MingLiU", "SimSun", serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  line-height: 1.7em;
  color: #33271a;
  margin: 30px auto 0;
  width: fit-content;
}

/* 逐字点亮：初始透明，抽签时逐个显现（版式自始固定，字不位移） */
.slip-poem .pc {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.slip-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 20px;
}

.slip-num {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 1.15rem;
  font-weight: 630;
  letter-spacing: 3px;
  color: #6b4c22;
}

/* 等级：红色行草，斜着盖在右下角，外套斑驳红框（印章质感） */
.slip-seal {
  position: absolute;
  bottom: 62px;
  right: 16px;
  transform: rotate(-12deg);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 50px;
  padding: 8px 12px;
}

.slip-seal.show {
  opacity: 1;
}

.seal-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.seal-text {
  font-family: "STXingkai", "Xingkai SC", "KaiTi", "STKaiti", cursive;
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: 3px;
  color: #c02626;
  text-shadow: 0 1px 0 rgba(120, 20, 20, 0.15);
}

.omikuji-slip.draw {
  animation: slipIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slipIn {
  0% { opacity: 0; transform: translateY(26px) rotate(-1.5deg) scale(0.97); }
  60% { opacity: 1; transform: translateY(-6px) rotate(0.6deg); }
  100% { opacity: 1; transform: none; }
}

.omikuji-meaning {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--glass-soft);
  border: 1px dashed var(--border);
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.8;
  text-align: left;
}

.omikuji-btn {
  margin-top: 18px;
  min-width: 140px;
}

.omikuji-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.omikuji-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ---------- 留言登录行 ---------- */
.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--border);
  flex-wrap: wrap;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 12px;
  background: #24292e;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 520;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

html[data-theme="dark"] .login-btn {
  background: #3b4252;
}

.login-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(36, 41, 46, 0.35);
}

.login-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 520;
}

.login-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

/* 撤回按钮 */
.msg-action.danger:hover {
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 45%, transparent);
  background: var(--err-soft);
}

/* ---------- 文章页 ---------- */
.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 12px;
  background: #24292e;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 520;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

html[data-theme="dark"] .login-btn {
  background: #3b4252;
}

.login-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(36, 41, 46, 0.35);
}

.login-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 520;
}

.login-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

/* 撤回按钮 */
.msg-action.danger:hover {
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 45%, transparent);
  background: var(--err-soft);
}

/* ---------- 文章页 ---------- */
.page-head {
  text-align: center;
  padding: 30px 0 34px;
}

.page-head h1 {
  font-size: 2.2rem;
  font-weight: 630;
  letter-spacing: 1px;
}

.page-head p {
  color: var(--text-2);
  margin-top: 8px;
}

/* ---------- 关于 ---------- */
.about-card {
  max-width: 640px;
  margin: 10px auto 0;
  text-align: center;
  padding: 48px 36px 40px;
}

.about-avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 630;
  color: #fff;
  box-shadow: 0 14px 34px rgba(114, 136, 253, 0.4);
}

.about-card h1 {
  font-size: 1.7rem;
  font-weight: 630;
}

.about-alias {
  color: var(--accent);
  font-size: 0.95rem;
  margin-top: 2px;
  letter-spacing: 1px;
}

.about-desc {
  color: var(--text-2);
  margin-top: 14px;
  line-height: 2;
}

.about-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

/* 社交圆角图标按钮 */
.about-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.soc-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: var(--glass-soft);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.soc-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 品牌图标（bilibili/github）为实心单色 */
.soc-btn svg[fill="currentColor"] {
  fill: currentColor;
  stroke: none;
}

.soc-btn:hover {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(114, 136, 253, 0.45);
}

.about-sign {
  margin-top: 26px;
  color: var(--text-3);
  font-size: 0.85rem;
  font-style: italic;
}

/* ---------- 迷你播放器（非首页时左下角，毛玻璃） ---------- */
.mini-player {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.28) 45%, rgba(255, 255, 255, 0.38));
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  max-width: 360px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

body.on-home .mini-player {
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
}

html[data-theme="dark"] .mini-player {
  background: linear-gradient(135deg, rgba(40, 50, 92, 0.58), rgba(22, 28, 54, 0.36) 45%, rgba(30, 38, 72, 0.5));
  box-shadow: var(--shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.mp-cover {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad);
  color: #fff;
}

.mp-cover svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mp-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mp-title {
  font-size: 0.86rem;
  font-weight: 630;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-artist {
  font-size: 0.72rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-progress {
  margin-top: 2px;
  height: 4px;
}

.mp-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mp-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: var(--glass-soft);
  border: 1px solid var(--border);
  transition: all 0.22s ease;
}

.mp-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: none;
}

.mp-btn:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.mp-play {
  width: 38px;
  height: 38px;
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

.mp-play .ic-pause {
  display: none;
}

.mp-play.playing .ic-play {
  display: none;
}

.mp-play.playing .ic-pause {
  display: block;
}

/* 迷你播放器模式三态图标（与主播放器一致：描边风格） */
#mpMode svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mp-btn .ic-single,
.mp-btn .ic-shuffle {
  display: none;
}
.mp-btn.mode-single .ic-repeat { display: none; }
.mp-btn.mode-single .ic-single { display: block; }
.mp-btn.mode-shuffle .ic-repeat { display: none; }
.mp-btn.mode-shuffle .ic-shuffle { display: block; }
.mp-btn.mode-single,
.mp-btn.mode-shuffle {
  color: var(--accent);
}

@media (max-width: 680px) {
  .mini-player {
    left: 12px;
    bottom: 12px;
    max-width: 100%;
    right: 12px;
  }
}

/* ---------- 页脚 ---------- */
.footer {
  width: 100%;
  max-width: 720px;
  margin: 20px auto 34px;
  padding: 18px 24px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-2);
  position: relative;
  z-index: 2;
}

/* 非首页：左下角有迷你播放器，页脚右移让位，避免遮挡 */
body:not(.on-home) .footer {
  margin-left: auto;
  margin-right: 24px;
}

.footer .heart {
  color: #f05c6c;
  display: inline-block;
  animation: beat 1.2s ease infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.25); }
  40% { transform: scale(1); }
}

/* ---------- 文章弹窗（半透明毛玻璃 + 关闭动效） ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open {
  display: flex;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 40, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: 84vh;
  border-radius: 20px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-hover);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 关闭动效 */
.modal.closing .modal-mask {
  animation: fadeOut 0.28s ease forwards;
}

.modal.closing .modal-panel {
  animation: modalOut 0.28s cubic-bezier(0.55, 0, 0.55, 0.2) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
}
@keyframes fadeOut {
  to { opacity: 0; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
}
@keyframes modalOut {
  to { opacity: 0; transform: translateY(26px) scale(0.96); }
}

.modal-bar {
  height: 3px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  flex-shrink: 0;
}

.modal-read {
  height: 100%;
  width: 0%;
  background: var(--grad);
  transition: width 0.15s linear;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--glass-soft);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 1rem;
  z-index: 2;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.modal-close:hover {
  color: var(--err);
  transform: rotate(90deg);
}

.modal-scroll {
  overflow-y: auto;
  padding: 30px 36px 44px;
}

.modal-scroll h1 {
  font-size: 1.7rem;
  font-weight: 630;
  line-height: 1.4;
  padding-right: 40px;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-3);
  font-size: 0.84rem;
  margin: 12px 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Markdown 正文 ---------- */
.modal-content p {
  margin-bottom: 1.1em;
  color: var(--text);
  line-height: 2;
  font-size: 0.99rem;
}

.modal-content h2,
.modal-content h3,
.modal-content h4 {
  margin: 1.5em 0 0.6em;
  line-height: 1.5;
}

.modal-content h2 {
  font-size: 1.3rem;
}

.modal-content h3 {
  font-size: 1.12rem;
}

.modal-content h4 {
  font-size: 1rem;
}

.modal-content ul,
.modal-content ol {
  margin: 0.9em 0 1.2em;
  padding-left: 1.5em;
}

.modal-content li {
  margin-bottom: 0.45em;
  line-height: 1.9;
}

.modal-content blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--glass-soft);
  border-radius: 0 12px 12px 0;
  color: var(--text-2);
}

.modal-content code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 6px;
}

.modal-content pre {
  margin: 1.2em 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(12, 16, 34, 0.82);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.modal-content pre code {
  background: none;
  color: #dce4ff;
  padding: 0;
  font-size: 0.86rem;
  line-height: 1.7;
}

.modal-content a {
  color: var(--accent);
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  transition: opacity 0.2s ease;
}

.modal-content a:hover {
  opacity: 0.75;
}

.modal-content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 1.6em 0;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  padding: 11px 22px;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  main {
    padding: 84px 16px 40px;
  }

  .topbar-inner {
    padding: 0 16px;
    grid-template-columns: auto 1fr auto;
  }

  .logo-sub {
    display: none;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .hero-card {
    padding: 38px 18px 30px;
  }

  .clock {
    padding: 12px 18px 8px;
    gap: 2px;
  }

  .player-main {
    flex-direction: column;
    text-align: center;
  }

  .player-info {
    width: 100%;
  }

  .controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .vol-wrap {
    margin-left: 0;
  }

  .game-opts {
    grid-template-columns: 1fr;
  }

  .list-card {
    flex-wrap: wrap;
    gap: 12px;
  }

  .list-side {
    width: 100%;
    padding-left: 70px;
    align-items: flex-start;
  }

  .footer {
    flex-direction: column;
    gap: 6px;
  }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
