/* ==========================================================================
   Lunaria · 全局样式
   设计基调：简约、克制、沉浸。深色玻璃材质 + 大量留白 + 柔和光影。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计 token
   -------------------------------------------------------------------------- */
:root {
  /* 背景与面板 */
  --bg: #08090d;
  --surface: rgba(18, 20, 28, 0.55);
  --surface-strong: rgba(14, 15, 23, 0.86);
  --surface-hover: rgba(255, 255, 255, 0.075);
  --surface-soft: rgba(255, 255, 255, 0.045);

  /* 文字层级 */
  --text-1: rgba(255, 255, 255, 0.95);
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.42);

  /* 线条 */
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);

  /* 氛围色（仅作小面积点缀） */
  --accent: #8c9eff;
  --accent-music: #8c9eff;
  --accent-gallery: #f1d9a8;
  --accent-video: #e2836b;
  --accent-games: #8fe3d0;

  /* 圆角层级 */
  --r-lg: 32px;
  --r-md: 22px;
  --r-sm: 14px;
  --r-pill: 9999px;

  /* 阴影：柔和、扩散、低透明度 */
  --shadow-soft: 0 24px 70px -24px rgba(0, 0, 0, 0.65);
  --shadow-lift: 0 30px 80px -28px rgba(0, 0, 0, 0.75);
  --hairline: inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* 动效曲线与时长 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-mid: 320ms;
  --t-slow: 480ms;

  /* 布局 */
  --nav-h: 64px;
  --player-h: 84px;
}

/* --------------------------------------------------------------------------
   2. 基础重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-1);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: #fff;
  color: #111;
  font-size: 13px;
  text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus {
  top: 16px;
}

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

/* --------------------------------------------------------------------------
   3. 背景层
   -------------------------------------------------------------------------- */
.bg-image {
  position: fixed;
  inset: -2%;
  z-index: -2;
  background-color: #14161f;
  background-image: var(--bg-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  animation: breathe 34s ease-in-out infinite;
}

.bg-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(8, 9, 13, 0.2) 0%, rgba(8, 9, 13, 0.62) 100%),
    linear-gradient(180deg, rgba(8, 9, 13, 0.62) 0%, rgba(8, 9, 13, 0.34) 42%, rgba(8, 9, 13, 0.78) 100%);
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1.02);
  }
  50% {
    transform: scale(1.075);
  }
}

/* --------------------------------------------------------------------------
   4. 通用玻璃材质
   -------------------------------------------------------------------------- */
.glass {
  /* 不支持 backdrop-filter 时的降级底色（更实一些，保证可读性） */
  background: rgba(14, 15, 23, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft), var(--hairline);
}

@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .glass {
    background: var(--surface);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
  }
}

/* 通用图标按钮 */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text-1);
}
.icon-btn:active {
  transform: scale(0.94);
}
.icon-btn[aria-pressed="true"],
.icon-btn.is-active {
  color: var(--accent);
  background: rgba(140, 158, 255, 0.16);
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}
.icon-btn.sm {
  width: 28px;
  height: 28px;
}
.icon-btn.sm svg {
  width: 14px;
  height: 14px;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-size: 12.5px;
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-1);
}
.ghost-btn:active {
  transform: scale(0.97);
}

.solid-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  color: #12141c;
  font-size: 12.5px;
  font-weight: 600;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.solid-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}
.solid-btn:active {
  transform: scale(0.97);
}

/* 细腻的滚动条 */
.scroll-area {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.scroll-area::-webkit-scrollbar {
  width: 6px;
}
.scroll-area::-webkit-scrollbar-track {
  background: transparent;
}
.scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--r-pill);
}
.scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   5. 顶部导航栏
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 40;
  width: min(90%, 1180px);
  transform: translate(-50%, 0);
  transition:
    transform var(--t-mid) var(--ease),
    opacity var(--t-mid) var(--ease);
}
.nav.is-hidden {
  transform: translate(-50%, -140%);
  opacity: 0;
  pointer-events: none;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
  padding: 0 10px 0 18px;
  border-radius: var(--r-pill);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.nav-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 10px rgba(140, 158, 255, 0.55);
  flex: none;
}
.nav-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.nav-sub {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  padding-left: 10px;
  border-left: 1px solid var(--line-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--text-3);
  font-size: 13px;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.nav-link:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.06);
}
.nav-link.is-active {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.1);
}
/* 选中状态不只依赖颜色，另有一个指示点 */
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(140deg, rgba(140, 158, 255, 0.7), rgba(143, 227, 208, 0.55));
  color: #10121a;
  font-size: 12px;
  font-weight: 700;
  transition: transform var(--t-fast) var(--ease);
}
.nav-avatar:active {
  transform: scale(0.94);
}
.nav-menu {
  display: none;
}

.nav-sheet {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding: 8px;
  border-radius: var(--r-md);
  transform-origin: top center;
  animation: sheet-in var(--t-mid) var(--ease);
}
.nav-sheet-link {
  padding: 11px 12px;
  border-radius: var(--r-sm);
  text-align: left;
  font-size: 14px;
  color: var(--text-2);
}
.nav-sheet-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-1);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.nav-reveal {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 39;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(14, 15, 23, 0.7);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: var(--text-3);
  opacity: 0;
  transform: translate(-50%, -20px);
  pointer-events: none;
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.nav-reveal.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.nav-reveal:hover {
  color: var(--text-1);
}
.nav-reveal svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   6. 中央核心区域
   -------------------------------------------------------------------------- */
.stage {
  display: grid;
  grid-template-columns: 55fr 45fr;
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 40px) clamp(20px, 5vw, 68px) calc(var(--player-h) + 48px);
}

.tv-column,
.panel-column {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   7. 电视机
   -------------------------------------------------------------------------- */
.tv {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  user-select: none;
}

.tv-body {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #262835 0%, #191b24 48%, #12131a 100%);
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}
/* 机身顶部细腻高光 */
.tv-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

.tv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 10px;
}
.tv-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tv-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b7086;
  box-shadow: 0 0 8px currentColor;
  transition: background-color var(--t-slow) var(--ease);
}
.tv-led.is-live {
  animation: led-blink 2.6s ease-in-out infinite;
}
@keyframes led-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.tv-model {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.24);
}

.tv-knobs {
  display: flex;
  align-items: center;
  gap: 7px;
}
.knob {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}
.knob-wide {
  width: 18px;
  border-radius: var(--r-pill);
}

.tv-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--r-md);
  background: #07080c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
/* 老浏览器无 aspect-ratio 时的降级 */
@supports not (aspect-ratio: 16 / 10) {
  .tv-screen {
    height: 0;
    padding-bottom: 62.5%;
  }
  .tv-content {
    position: absolute;
    inset: 0;
  }
}

.tv-content {
  position: absolute;
  inset: 0;
}

.tv-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, transparent 42%);
  pointer-events: none;
}
.tv-glare {
  position: absolute;
  top: -60px;
  left: -40px;
  width: 62%;
  height: 130px;
  transform: rotate(-10deg);
  background: rgba(255, 255, 255, 0.06);
  filter: blur(28px);
  pointer-events: none;
}
.tv-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 52px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.tv-grille {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding-top: 12px;
}
.tv-grille span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.tv-neck {
  width: 74px;
  height: 14px;
  margin: -1px auto 0;
  background: linear-gradient(180deg, #12131a, #0d0e14);
}
.tv-base {
  width: 148px;
  height: 8px;
  margin: 0 auto;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #1a1c25, #0e0f16);
}
.tv-feet {
  display: flex;
  justify-content: center;
  gap: 96px;
  margin-top: -2px;
}
.tv-feet span {
  width: 22px;
  height: 5px;
  border-radius: 0 0 6px 6px;
  background: #0d0e14;
}
.tv-reflection {
  width: 62%;
  height: 22px;
  margin: 12px auto 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  filter: blur(16px);
}

/* --------------------------------------------------------------------------
   8. 电视屏幕内容
   -------------------------------------------------------------------------- */
.screen-view {
  position: absolute;
  inset: 0;
  animation: screen-in var(--t-mid) var(--ease);
}
.screen-view.is-leaving {
  animation: screen-out 220ms var(--ease) forwards;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes screen-out {
  to {
    opacity: 0;
    transform: scale(0.985);
  }
}

.screen-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
}

/* 欢迎屏 */
.welcome {
  position: relative;
  overflow: hidden;
}
.welcome-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.55;
}
.orb-1 {
  width: 240px;
  height: 240px;
  top: 12%;
  left: -14%;
  background: var(--accent-music);
  animation: drift-1 30s ease-in-out infinite;
}
.orb-2 {
  width: 210px;
  height: 210px;
  top: 30%;
  right: -12%;
  background: var(--accent-video);
  opacity: 0.4;
  animation: drift-2 38s ease-in-out infinite;
}
.orb-3 {
  width: 190px;
  height: 190px;
  bottom: -14%;
  left: 34%;
  background: var(--accent-games);
  opacity: 0.35;
  animation: drift-3 34s ease-in-out infinite;
}
@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(36px, -22px); }
}
@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 20px); }
}
@keyframes drift-3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(24px, -18px); }
}

.welcome-clock {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.welcome-title {
  margin-top: 8px;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 300;
  letter-spacing: 0.08em;
}
.welcome-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.welcome-hint {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-3);
}

/* 歌词屏 */
.lyrics {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  padding: 16px;
}
.lyrics-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  animation: soft-rise var(--t-slow) var(--ease);
}
@keyframes soft-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.lyrics-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}
.lyrics-title {
  font-size: 15px;
  font-weight: 500;
}
.lyrics-artist {
  font-size: 11.5px;
  color: var(--text-3);
}
.lyrics-paused {
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 10.5px;
  color: var(--text-3);
}
.lyrics-viewport {
  position: relative;
  width: min(340px, 90%);
  height: 40%;
  min-height: 108px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.lyrics-track {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transition: transform 550ms var(--ease);
}
.lyric-line {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--text-2);
  opacity: 0.18;
  transition: opacity var(--t-mid) var(--ease), color var(--t-mid) var(--ease),
    font-size var(--t-mid) var(--ease);
  text-align: center;
}
.lyric-line.is-near {
  opacity: 0.42;
}
.lyric-line.is-active {
  opacity: 1;
  color: #fff;
  font-size: 15.5px;
  font-weight: 500;
}

/* 图片屏 */
.img-screen {
  position: relative;
  height: 100%;
  background: #000;
}
.img-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: img-in var(--t-slow) var(--ease);
}
@keyframes img-in {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.img-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 18px 12px;
  text-align: left;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  pointer-events: none;
}
.img-caption strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.img-caption span {
  font-size: 11px;
  color: var(--text-2);
}
.img-nav {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}
.img-nav .icon-btn {
  pointer-events: auto;
  background: rgba(8, 9, 13, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* 视频屏 */
.video-screen {
  position: relative;
  height: 100%;
  background: #000;
}
.video-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.video-poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  transition: opacity var(--t-mid) var(--ease);
}
.video-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}
.video-poster[hidden] {
  display: none;
}
.video-play {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #12141c;
  box-shadow: var(--shadow-soft);
  transition: transform var(--t-fast) var(--ease);
}
.video-play:hover {
  transform: scale(1.06);
}
.video-play svg {
  width: 24px;
  height: 24px;
  margin-left: 3px;
}
.video-poster-title {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.video-controls {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 30px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.video-screen:hover .video-controls,
.video-screen:focus-within .video-controls,
.video-controls.is-shown {
  opacity: 1;
  transform: none;
}
.video-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.video-controls-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.video-time {
  font-size: 10.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* 游戏屏 */
.game-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 10px 12px;
}
.game-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  max-width: 100%;
}
.game-stats {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  font-size: 11px;
  color: var(--text-3);
}
.game-stats b {
  color: var(--text-1);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.game-board {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.game-board canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(8, 9, 13, 0.76);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-align: center;
  animation: screen-in var(--t-mid) var(--ease);
}
.game-overlay[hidden] {
  display: none;
}
.game-overlay p {
  font-size: 13px;
}
.game-overlay small {
  font-size: 11px;
  color: var(--text-3);
}
/* 方向键只在触控设备出现，桌面端把空间留给棋盘 */
.game-dpad {
  display: none;
  grid-template-columns: repeat(3, auto);
  gap: 5px;
  justify-items: center;
}
@media (hover: none) {
  .game-dpad {
    display: grid;
  }
}
.game-hint {
  font-size: 10.5px;
  color: var(--text-3);
  text-align: center;
}

/* 记忆翻牌 */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
  height: 100%;
  padding: 6px;
}
.memory-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: transparent;
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.memory-card:hover:not(.is-open):not(.is-matched) {
  background: rgba(255, 255, 255, 0.09);
}
.memory-card:active {
  transform: scale(0.95);
}
.memory-card.is-open {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.memory-card.is-matched {
  background: rgba(143, 227, 208, 0.12);
  border-color: rgba(143, 227, 208, 0.42);
  color: var(--accent-games);
}
.memory-card svg {
  width: 46%;
  height: 46%;
  max-width: 22px;
  max-height: 22px;
}

/* --------------------------------------------------------------------------
   9. 右侧面板
   -------------------------------------------------------------------------- */
.panel {
  display: flex;
  flex-direction: column;
  height: min(560px, 66vh);
}

.panel-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  animation: panel-in var(--t-mid) var(--ease);
}
.panel-view.is-leaving {
  animation: panel-out 200ms var(--ease) forwards;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes panel-out {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 2px;
}
.panel-head h1 {
  font-size: 17px;
  font-weight: 500;
}
.panel-head p {
  font-size: 12.5px;
  color: var(--text-3);
}
.panel-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
}

/* 田字格 */
.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-soft);
  text-align: left;
  box-shadow: var(--shadow-soft), var(--hairline);
  opacity: 0;
  transform: translateY(12px);
  animation: card-in 420ms var(--ease) forwards;
  transition:
    transform var(--t-fast) var(--ease),
    background-color var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease);
}
@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .cat-card {
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
}
@keyframes card-in {
  to {
    opacity: 1;
    transform: none;
  }
}
.cat-card:nth-child(1) { animation-delay: 40ms; }
.cat-card:nth-child(2) { animation-delay: 100ms; }
.cat-card:nth-child(3) { animation-delay: 160ms; }
.cat-card:nth-child(4) { animation-delay: 220ms; }

.cat-card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.18);
}
.cat-card:active {
  transform: translateY(-1px) scale(0.985);
}
.cat-card::before {
  content: "";
  position: absolute;
  top: -34px;
  right: -34px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--card-accent);
  opacity: 0.14;
  filter: blur(30px);
  transition: opacity var(--t-mid) var(--ease);
}
.cat-card:hover::before {
  opacity: 0.28;
}
.cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--card-accent);
  transition: transform var(--t-mid) var(--ease);
}
.cat-card:hover .cat-icon {
  transform: translate(2px, -2px);
}
.cat-icon svg {
  width: 18px;
  height: 18px;
}
.cat-body {
  position: relative;
  margin-top: 14px;
}
.cat-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.cat-title {
  font-size: 15px;
  font-weight: 500;
}
.cat-count {
  font-size: 11px;
  color: var(--text-3);
}
.cat-desc {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* 搜索框 */
.search-field {
  position: relative;
  margin-bottom: 10px;
}
.search-field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  padding: 9px 14px 9px 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.search-field input::placeholder {
  color: var(--text-3);
}
.search-field input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.075);
}

.panel-list {
  flex: 1;
  min-height: 0;
  padding-right: 6px;
}
.panel-foot {
  padding-top: 10px;
  font-size: 11px;
  color: var(--text-3);
  border-top: 1px solid var(--line-soft);
  margin-top: 10px;
}

/* 音乐列表 */
.song-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  text-align: left;
  transition: background-color var(--t-fast) var(--ease);
}
.song-row:hover {
  background: rgba(255, 255, 255, 0.05);
}
.song-row.is-current {
  background: rgba(255, 255, 255, 0.08);
}
.song-cover {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.song-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.song-cover-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.song-cover-state svg {
  width: 14px;
  height: 14px;
}
.song-row:hover .song-cover-state,
.song-row.is-current .song-cover-state {
  opacity: 1;
}
.song-main {
  min-width: 0;
  flex: 1;
}
.song-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-row.is-current .song-title {
  color: var(--accent-music);
}
/* 播放状态不只用颜色表示，另有文字标记 */
.song-flag {
  flex: none;
  padding: 1px 6px;
  border: 1px solid rgba(140, 158, 255, 0.4);
  border-radius: var(--r-pill);
  font-size: 9.5px;
  font-weight: 400;
  color: var(--accent-music);
}
.song-meta {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-time {
  flex: none;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.song-actions {
  flex: none;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.song-item:hover .song-actions,
.song-item:focus-within .song-actions {
  opacity: 1;
}
.song-item {
  position: relative;
}
.is-fav {
  color: var(--accent-video) !important;
}

/* 图片网格 */
.img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.img-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-mid) var(--ease);
}
.img-card:hover {
  transform: translateY(-3px);
}
.img-card.is-current {
  border-color: rgba(241, 217, 168, 0.6);
}
.img-card.is-current::after {
  content: "查看中";
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: rgba(8, 9, 13, 0.75);
  font-size: 9.5px;
  color: var(--accent-gallery);
}
.img-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}
.img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.img-card:hover .img-thumb img {
  transform: scale(1.045);
}
.img-info {
  padding: 8px 10px 10px;
}
.img-info strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
}
.img-info span {
  font-size: 11px;
  color: var(--text-3);
}
.img-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(8, 9, 13, 0.6);
}
/* 图片加载失败时的优雅占位 */
.img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-3);
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 8px,
    rgba(255, 255, 255, 0.055) 8px,
    rgba(255, 255, 255, 0.055) 16px
  );
  font-size: 11px;
  gap: 6px;
}
.img-fallback svg {
  width: 15px;
  height: 15px;
}

/* 视频列表 */
.video-card {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border-radius: var(--r-sm);
  text-align: left;
  transition: background-color var(--t-fast) var(--ease);
}
.video-card:hover {
  background: rgba(255, 255, 255, 0.05);
}
.video-card.is-current {
  background: rgba(226, 131, 107, 0.1);
}
.video-thumb {
  position: relative;
  flex: none;
  width: 108px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-thumb .play-dot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.video-card:hover .play-dot,
.video-card.is-current .play-dot {
  opacity: 1;
}
.video-thumb .play-dot svg {
  width: 18px;
  height: 18px;
}
.video-dur {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(8, 9, 13, 0.8);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}
.video-body {
  min-width: 0;
  flex: 1;
}
.video-title {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-desc {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 10px;
  color: var(--text-2);
}

/* 游戏列表 */
.game-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.game-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.07);
}
.game-card.is-current {
  border-color: rgba(143, 227, 208, 0.45);
}
.game-cover {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(143, 227, 208, 0.1);
  color: var(--accent-games);
}
.game-cover svg {
  width: 20px;
  height: 20px;
}
.game-body {
  flex: 1;
  min-width: 0;
}
.game-name {
  font-size: 14px;
  font-weight: 500;
}
.game-desc {
  font-size: 11.5px;
  color: var(--text-3);
}
.game-tags {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

/* 空状态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 44px 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  text-align: center;
}
.empty svg {
  width: 26px;
  height: 26px;
  color: var(--text-3);
}
.empty p {
  font-size: 14px;
  color: var(--text-2);
}
.empty small {
  font-size: 12px;
  color: var(--text-3);
  max-width: 240px;
}

/* --------------------------------------------------------------------------
   10. 底部播放器
   -------------------------------------------------------------------------- */
.player {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 35;
  width: min(92%, 1180px);
  transform: translateX(-50%);
  border-radius: var(--r-pill);
  padding: 0 8px 0 8px;
  height: var(--player-h);
  display: flex;
  align-items: center;
}
.player-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 0 8px;
}

.player-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  padding: 4px;
  border-radius: var(--r-sm);
  text-align: left;
  transition: background-color var(--t-fast) var(--ease);
}
.now-playing:hover {
  background: rgba(255, 255, 255, 0.05);
}
.np-text {
  display: block;
  min-width: 0;
}
.np-cover {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
}
.np-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.np-text {
  min-width: 0;
}
.np-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-artist {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.player-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.play-main {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #12141c;
}
.play-main:hover {
  background: #fff;
  transform: scale(1.05);
}
.play-main svg {
  width: 17px;
  height: 17px;
}
.progress-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
}
.time-label {
  flex: none;
  width: 34px;
  font-size: 10.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 96px;
}

/* 自定义滑块 */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.85) var(--fill, 0%),
    rgba(255, 255, 255, 0.16) var(--fill, 0%)
  );
}
.range::-moz-range-track {
  height: 3px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.16);
}
.range::-moz-range-progress {
  height: 3px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.85);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.range:hover::-webkit-slider-thumb,
.range:focus-visible::-webkit-slider-thumb,
.range:active::-webkit-slider-thumb {
  opacity: 1;
}
.range:hover::-moz-range-thumb,
.range:focus-visible::-moz-range-thumb,
.range:active::-moz-range-thumb {
  opacity: 1;
}
.range:focus-visible {
  outline-offset: 4px;
}
.range.small {
  height: 14px;
}

/* 迷你播放器（移动端） */
.player.is-mini .player-inner {
  grid-template-columns: 1fr;
  gap: 10px;
}
.player.is-mini .player-center,
.player.is-mini .player-right {
  display: none;
}
.mini-controls {
  display: none;
  align-items: center;
  gap: 4px;
}
.player.is-mini .mini-controls {
  display: flex;
}
.player.is-mini .play-main {
  width: 34px;
  height: 34px;
}

/* 迷你播放器展开后的完整控制面板 */
.player.is-mini.is-open {
  height: auto;
  padding: 12px 10px 14px;
  border-radius: 24px;
}
.player.is-mini.is-open .player-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.player.is-mini.is-open .player-center,
.player.is-mini.is-open .player-right {
  display: flex;
}
.player.is-mini.is-open .player-right {
  justify-content: space-between;
}
.player.is-mini.is-open .volume-wrap {
  width: 140px;
}
.player.is-mini.is-open .mini-progress {
  display: none;
}
.mini-progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 9px;
  height: 2px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.mini-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: rgba(255, 255, 255, 0.8);
  transition: width 220ms linear;
}
.player:not(.is-mini) .mini-progress {
  display: none;
}

/* 播放列表浮层 */
.queue {
  position: fixed;
  right: max(4vw, 20px);
  bottom: calc(var(--player-h) + 26px);
  z-index: 36;
  width: min(320px, 88vw);
  max-height: 46vh;
  padding: 12px;
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  transform-origin: bottom right;
  animation: queue-in var(--t-mid) var(--ease);
}
.queue[hidden] {
  display: none;
}
.queue.is-leaving {
  animation: queue-out 180ms var(--ease) forwards;
}
@keyframes queue-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes queue-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}
.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 8px;
  font-size: 12.5px;
  color: var(--text-2);
}
.queue-list {
  min-height: 0;
  flex: 1;
  padding-right: 4px;
}
.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 10px;
  text-align: left;
  transition: background-color var(--t-fast) var(--ease);
}
.queue-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.queue-item.is-current {
  background: rgba(140, 158, 255, 0.14);
}
.queue-item.is-current .queue-name {
  color: var(--accent-music);
}
.queue-index {
  width: 16px;
  font-size: 10.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.queue-name {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-artist {
  font-size: 10.5px;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   11. 模态窗口
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 5, 8, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fade-in var(--t-mid) var(--ease);
}
.modal-backdrop[hidden] {
  display: none;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal {
  width: min(460px, 100%);
  max-height: 76vh;
  padding: 22px;
  border-radius: var(--r-md);
  overflow-y: auto;
  animation: modal-in var(--t-mid) var(--ease);
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.modal-head h2 {
  font-size: 16px;
  font-weight: 500;
}
.modal p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.modal .kbd-list {
  margin-top: 14px;
  display: grid;
  gap: 7px;
}
.kbd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-2);
}
kbd {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-family: inherit;
  font-size: 11px;
  color: var(--text-1);
}

/* --------------------------------------------------------------------------
   12. 响应式
   -------------------------------------------------------------------------- */

/* 平板：保持双栏，收紧间距 */
@media (max-width: 1080px) {
  .nav-sub {
    display: none;
  }
  .stage {
    gap: 26px;
    padding-left: 24px;
    padding-right: 24px;
  }
  .tv {
    max-width: 460px;
  }
  .panel {
    height: min(520px, 64vh);
  }
  .volume-wrap {
    width: 68px;
  }
  #queueBtn {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .nav-menu {
    display: inline-flex;
  }
  #navSearch,
  #navSettings,
  .nav-hide {
    display: none;
  }
  .stage {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
    padding: calc(var(--nav-h) + 28px) 20px calc(var(--player-h) + 40px);
  }
  .tv-column {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
  }
  .tv {
    max-width: 520px;
  }
  .panel {
    height: auto;
    min-height: 42vh;
  }
  .grid-2x2 {
    grid-auto-rows: minmax(128px, auto);
  }
  .panel-list {
    max-height: none;
    overflow: visible;
  }
}

/* 手机：垂直布局 + 迷你播放器 */
@media (max-width: 640px) {
  :root {
    --player-h: 66px;
  }
  .nav {
    width: 94%;
    top: 10px;
  }
  .nav-inner {
    height: 54px;
    padding: 0 8px 0 14px;
  }
  .stage {
    padding: 78px 16px calc(var(--player-h) + 30px);
    gap: 18px;
  }
  .tv-column {
    position: static;
  }
  .tv-body {
    padding: 10px;
    border-radius: 26px;
  }
  .tv-screen {
    border-radius: 18px;
  }
  .tv-feet {
    gap: 70px;
  }
  .panel {
    height: auto;
  }
  .cat-card {
    padding: 14px;
    border-radius: 18px;
  }
  .cat-icon {
    width: 32px;
    height: 32px;
  }
  .cat-body {
    margin-top: 10px;
  }
  .player {
    width: calc(100% - 20px);
    bottom: 10px;
    height: var(--player-h);
    border-radius: 20px;
  }
  .img-grid {
    gap: 8px;
  }
  .video-thumb {
    width: 92px;
  }
  .memory-card {
    width: 46px;
    height: 46px;
  }
  .queue {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: calc(var(--player-h) + 18px);
  }
  .lyrics-viewport {
    height: 44%;
  }
}

/* 触摸设备：始终显示列表项操作按钮与视频控件 */
@media (hover: none) {
  .song-actions,
  .song-cover-state,
  .video-controls,
  .play-dot {
    opacity: 1;
    transform: none;
  }
  .range::-webkit-slider-thumb {
    opacity: 1;
  }
  .range::-moz-range-thumb {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   13. 减少动态效果
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .bg-image {
    animation: none;
    transform: none;
  }
  .orb {
    animation: none;
  }
  .lyrics-track {
    transition: none;
  }
}
