:root {
  color-scheme: dark;
  --bg: #0F172A;
  --panel: #1E293B;
  --panel-soft: rgba(30, 41, 59, 0.82);
  --text: #F8FAFC;
  --muted: #94A3B8;
  --primary: #165DFF;
  --accent1: #A78BFA;
  --accent2: #F472B6;
  --ring: rgba(255,255,255,0.08);
  --shadow: 0 24px 80px rgba(0,0,0,0.35);
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 18% 10%, rgba(22,93,255,0.12), transparent 20%),
    radial-gradient(circle at 84% 22%, rgba(167,139,250,0.1), transparent 20%),
    radial-gradient(circle at 52% 88%, rgba(244,114,182,0.08), transparent 20%),
    linear-gradient(180deg, #07101f 0%, var(--bg) 24%, #0c1628 60%, #090f1c 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

.app-shell {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 14px 32px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  text-align: center;
}

.app-header h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: 0.04em;
  text-align: center;
}



.label {
  margin: 0;
  color: var(--accent2);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
}

/* 核心：工具栏统一垂直居中，所有子项高度一致 */
.toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.toolbar .control-btn,
.toolbar .scale-select {
  flex-shrink: 0;
  white-space: nowrap;
  /* 统一高度和对齐 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.record-bar {
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  color: var(--accent);
  font-size: 0.95rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* 统一按钮基础样式 */
.control-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 16px;
  padding: 0 18px;
  height: 48px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-align: center;
}

.control-btn:hover,
.control-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(118,208,255,0.55);
  background: rgba(118,208,255,0.14);
}

.drum-scene {
  display: grid;
  place-items: center;
  padding: 10px 0 18px;
}

.drum-shell {
  width: min(700px, 100%);
  max-width: 700px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.drum-face {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 50%;
  background-image:
    url('./drum-bg.jpg'),
    radial-gradient(circle at 25% 25%, rgba(146, 210, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 40%, rgba(204, 149, 255, 0.18), transparent 16%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.95), rgba(8, 12, 24, 0.92));
  background-size: 125% auto, cover, cover, cover;
  background-position: center center, center center, center center, center center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.45), var(--shadow);
  overflow: hidden;
}

.drum-face[data-theme="green"] {
  background-image:
    url('./drum-bg.jpg'),
    radial-gradient(circle at 28% 24%, rgba(149, 255, 193, 0.16), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(112, 220, 185, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(12, 38, 40, 0.92), rgba(5, 10, 18, 0.96));
  background-size: 125% auto, cover, cover, cover;
  background-position: center center, center center, center center, center center;
  background-repeat: no-repeat;
}

.drum-face[data-theme="green"] .tone {
  background: radial-gradient(circle at top left, rgba(255,255,255,0.24), rgba(255,255,255,0.06) 38%),
    linear-gradient(180deg, rgba(160, 240, 196, 0.34), rgba(54, 95, 90, 0.9));
}

.drum-face[data-theme="green"] .tone:active,
.drum-face[data-theme="green"] .tone.active {
  background: radial-gradient(circle at top left, rgba(255,255,255,0.82), rgba(197, 255, 205, 0.35) 42%),
  linear-gradient(180deg, rgba(211, 255, 205, 0.45), rgba(118, 208, 255, 0.18));
}

.drum-face::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 48%);
  pointer-events: none;
}

.tone {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(52px, 7vw, 72px);
  min-width: 52px;
  aspect-ratio: 1;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.32), rgba(255,255,255,0.08) 38%),
    linear-gradient(180deg, rgba(146, 210, 255, 0.32), rgba(54, 77, 122, 0.92));
  border-radius: 40% 50% 48% 52% / 50%;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fdfdfd;
  text-align: center;
  padding: 0.5rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 14px 40px rgba(0,0,0,0.2);
  transform: translate(-50%, -50%);
}

.tone:active,
.tone.active {
  transform: translate(-50%, -50%) translateY(3px) scale(0.98);
  background: radial-gradient(circle at top left, rgba(255,255,255,0.82), rgba(255,243,203,0.3) 42%),
    linear-gradient(180deg, rgba(255,215,130,0.45), rgba(118,208,255,0.18));
  box-shadow: 0 22px 40px rgba(255,215,130,0.22);
}

.tone span.keycap {
  margin-top: 0.35rem;
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.drum-face .tone-1 { top: 41.6%; left: 61.6%; }
.drum-face .tone-2 { top: 53.0%; left: 56.0%; }
.drum-face .tone-3 { top: 68.0%; left: 53.1%; }
.drum-face .tone-4 { top: 84.4%; left: 55.4%; }
.drum-face .tone-5 { top: 98.7%; left: 60.3%; }
.drum-face .tone-6 { top: 47.3%; left: 70.3%; }
.drum-face .tone-7 { top: 94.4%; left: 70.3%; }
.drum-face .tone-8 { top: 41.6%; left: 80.3%; }
.drum-face .tone-9 { top: 98.7%; left: 81.0%; }
.drum-face .tone-10 { top: 53.0%; left: 86.0%; }
.drum-face .tone-11 { top: 68.7%; left: 88.1%; }
.drum-face .tone-12 { top: 85.9%; left: 86.7%; }

.hint-panel {
  margin-top: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 0.98rem;
  line-height: 1.7;
  text-align: center;
}

.app-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 840px) {
  .tone { width: min(86px, 15.5vw); }
  .drum-face .tone-center { inset: 37% 18% auto 37%; }
}

@media (max-width: 640px) {
  .app-shell { padding: 18px 14px 28px; }
  .app-header { justify-content: center; text-align: center; }
  .toolbar { justify-content: center; }
  .drum-shell { width: min(100%, 520px); }
  .tone { width: min(80px, 17vw); }
  .drum-face .tone-center { inset: 38% 22% auto 38%; }
}

/* ========== 修复：下拉菜单与按钮高度完全统一 ========== */
.toolbar .scale-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  padding: 0 40px 0 18px;
  font-size: 0.95rem;
  color: var(--text);
  height: 48px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  border-radius: 16px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  text-align: center;
  text-align-last: center;

  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

.toolbar .scale-select:hover,
.toolbar .scale-select:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(118,208,255,0.55);
  background: rgba(118,208,255,0.14);
}

.toolbar .scale-select option {
  background: #131c30;
  color: var(--text);
  padding: 8px;
  border: none;
  text-align: left;
}

/* ============================================== */
/* 各音阶独立背景图 */
/* ============================================== */
.drum-face.scale-8 {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg8.jpg'),
    radial-gradient(circle at 25% 25%, rgba(146, 210, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 40%, rgba(204, 149, 255, 0.16), transparent 16%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.95), rgba(8, 12, 24, 0.92));
  background-size: 110%, cover, cover, cover;
  background-position: 50% 64%;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-8 {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg8.jpg'),
    radial-gradient(circle at 28% 24%, rgba(149, 255, 193, 0.16), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(112, 220, 185, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(12, 38, 40, 0.92), rgba(5, 10, 18, 0.96));
  background-size: 110%, cover, cover, cover;
  background-position: 50% 64%;
  background-repeat: no-repeat;
}

.drum-face.scale-8c {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg8.jpg'),
    radial-gradient(circle at 25% 25%, rgba(146, 210, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 40%, rgba(204, 149, 255, 0.16), transparent 16%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.95), rgba(8, 12, 24, 0.92));
  background-size: 110%, cover, cover, cover;
  background-position: 50% 64%;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-8c {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg8.jpg'),
    radial-gradient(circle at 28% 24%, rgba(149, 255, 193, 0.16), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(112, 220, 185, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(12, 38, 40, 0.92), rgba(5, 10, 18, 0.96));
  background-size: 110%, cover, cover, cover;
  background-position: 50% 64%;
  background-repeat: no-repeat;
}
.drum-face.scale-8c,
.drum-face.scale-8c .note {
  font-size: inherit !important;
}

.drum-face.scale-11 {
  background-image: url('https://drum.hluru.net/skin/default/images/bg11.jpg');
  background-size: 155%;
  background-position: center 47%;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-11 {
  background-image: url('https://drum.hluru.net/skin/default/images/bg11.jpg');
  background-size: 155%;
  background-position: center 47%;
  background-repeat: no-repeat;
}

.drum-face.scale-11c {
  background-image: url('https://drum.hluru.net/skin/default/images/bg11.jpg');
  background-size: 155%;
  background-position: center 47%;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-11c {
  background-image: url('https://drum.hluru.net/skin/default/images/bg11.jpg');
  background-size: 155%;
  background-position: center 47%;
  background-repeat: no-repeat;
}
.drum-face.scale-11c,
.drum-face.scale-11c .note {
  font-size: inherit !important;
}

.drum-face.scale-13 {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg13.jpg'),
    radial-gradient(circle at 25% 25%, rgba(146, 210, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 40%, rgba(204, 149, 255, 0.18), transparent 16%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.95), rgba(8, 12, 24, 0.92));
  background-size: 200% ;
  background-position: 49% center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-13 {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg13.jpg'),
    radial-gradient(circle at 28% 24%, rgba(149, 255, 193, 0.16), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(112, 220, 185, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(12, 38, 40, 0.92), rgba(5, 10, 18, 0.96));
  background-size: 200% ;
  background-position: 49% center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat;
}

.drum-face.scale-13c {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg13.jpg'),
    radial-gradient(circle at 25% 25%, rgba(146, 210, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 40%, rgba(204, 149, 255, 0.18), transparent 16%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.95), rgba(8, 12, 24, 0.92));
  background-size: 200% ;
  background-position: 49% center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-13c {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg13.jpg'),
    radial-gradient(circle at 28% 24%, rgba(149, 255, 193, 0.16), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(112, 220, 185, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(12, 38, 40, 0.92), rgba(5, 10, 18, 0.96));
  background-size: 200% ;
  background-position: 49% center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat;
}
.drum-face.scale-13c,
.drum-face.scale-13c .note {
  font-size: inherit !important;
}

.drum-face.scale-15 {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg15.jpg'),
    radial-gradient(circle at 25% 25%, rgba(146, 210, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 40%, rgba(204, 149, 255, 0.18), transparent 16%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.95), rgba(8, 12, 24, 0.92));
  background-size: 118% ;
  background-position: 56% center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-15 {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg15.jpg'),
    radial-gradient(circle at 28% 24%, rgba(149, 255, 193, 0.16), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(112, 220, 185, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(12, 38, 40, 0.92), rgba(5, 10, 18, 0.96));
  background-size: 118% ;
  background-position: 56% center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat;
}

.drum-face.scale-15c {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg15.jpg'),
    radial-gradient(circle at 25% 25%, rgba(146, 210, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 40%, rgba(204, 149, 255, 0.18), transparent 16%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.95), rgba(8, 12, 24, 0.92));
  background-size: 118% ;
  background-position: 56% center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-15c {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg15.jpg'),
    radial-gradient(circle at 28% 24%, rgba(149, 255, 193, 0.16), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(112, 220, 185, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(12, 38, 40, 0.92), rgba(5, 10, 18, 0.96));
  background-size: 118% ;
  background-position: 56% center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat;
}
.drum-face.scale-15c,
.drum-face.scale-15c .note {
  font-size: inherit !important;
}

.drum-face.scale-12 {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg12.jpg'),
    radial-gradient(circle at 25% 25%, rgba(146, 210, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 40%, rgba(204, 149, 255, 0.18), transparent 16%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.95), rgba(8, 12, 24, 0.92));
  background-size: 130%, cover, cover, cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-12 {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg12.jpg'),
    radial-gradient(circle at 28% 24%, rgba(149, 255, 193, 0.16), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(112, 220, 185, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(12, 38, 40, 0.92), rgba(5, 10, 18, 0.96));
  background-size: 130%, cover, cover, cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.drum-face.scale-12c {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg12.jpg'),
    radial-gradient(circle at 25% 25%, rgba(146, 210, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 40%, rgba(204, 149, 255, 0.18), transparent 16%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.95), rgba(8, 12, 24, 0.92));
  background-size: 130%, cover, cover, cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.drum-face[data-theme="green"].scale-12c {
  background-image:
    url('https://drum.hluru.net/skin/default/images/bg12.jpg'),
    radial-gradient(circle at 28% 24%, rgba(149, 255, 193, 0.16), transparent 24%),
    radial-gradient(circle at 62% 42%, rgba(112, 220, 185, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(12, 38, 40, 0.92), rgba(5, 10, 18, 0.96));
  background-size: 130%, cover, cover, cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.drum-face.scale-12c,
.drum-face.scale-12c .note {
  font-size: inherit !important;
}

/* 曲谱搜索栏 */
.sheet-search-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  width: 100%;
}

.sheet-search-input {
  flex: 1;
  max-width: 500px;
  min-width: 200px;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #3498db;
  border-radius: 8px;
  outline: none;
  background: #222;
  color: #fff;
}

.sheet-search-input:focus {
  border-color: #2980b9;
}

.sheet-search-btn {
  flex-shrink: 0; 
  padding: 12px 20px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
  white-space: nowrap;
}

.sheet-search-btn:hover {
  background: #2980b9;
}

/* 曲谱列表 */
.sheet-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.no-results {
  text-align: center;
  color: #94a3b8;
  padding: 40px;
  font-size: 16px;
}

/* 帮助教程 */
.help-list {
  margin-top: 24px;
  padding-left: 30px;
  list-style-position: outside;
}

.help-list.ordered {
  list-style-type: decimal;
}

.help-list:not(.ordered) {
  list-style-type: disc;
}

.help-list li {
  color: #e2e8f0;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.dynamic-tutorials {
  margin-top: 32px;
  padding: 22px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
}

.dynamic-tutorials-header h3 {
  margin: 0 0 18px;
  font-size: 1.25rem;
  color: #f8fafc;
}

.dynamic-tutorial-group {
  margin-bottom: 18px;
}

.dynamic-tutorial-group h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #a5b4fc;
}

.dynamic-tutorial-group p {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.8;
  white-space: pre-wrap;
}

.help-loading,
.help-empty,
.help-error {
  margin: 0;
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.7;
}

/* 文件学习页面 */
.file-study-wrapper {
  padding: 32px 24px 32px;
  max-width: 1180px;
  margin: 30px auto;
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  backdrop-filter: blur(16px);
}
.file-container {
  display: grid;
  gap: 30px;
}
.file-title {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  color: var(--text);
  margin: 0;
}
.file-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 760px;
  margin: 8px 0 0;
  line-height: 1.8;
}
.file-group {
  display: grid;
  gap: 18px;
}
.file-group-title {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.file-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 18px 32px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.file-card:hover {
  transform: translateY(-2px);
  border-color: rgba(22,93,255,0.35);
  box-shadow: 0 24px 40px rgba(22,93,255,0.12);
}
.file-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.file-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(22,93,255,0.16);
  color: var(--primary);
  font-size: 1.2rem;
}
.file-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.file-card-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}
.file-card-actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}
.file-action-button {
  display: inline-flex;
  align-items:center;
  justify-content:center;
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(22,93,255,0.18);
  color: var(--primary);
  border: 1px solid rgba(22,93,255,0.32);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}
.file-action-button:hover {
  background: rgba(22,93,255,0.28);
  transform: translateY(-1px);
}
.audio-player {
  display: grid;
  gap: 12px;
}
.audio-player audio {
  width: 100%;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.audio-wave {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
  height: 32px;
}
.audio-wave span {
  display: block;
  width: 100%;
  height: calc(6px + var(--wave-volume, 1) * 8px);
  border-radius: 999px;
  background: rgba(22,93,255,0.18);
  opacity: 0.45;
}
.audio-wave span:nth-child(1) { animation-delay: 0s; }
.audio-wave span:nth-child(2) { animation-delay: 0.12s; }
.audio-wave span:nth-child(3) { animation-delay: 0.24s; }
.audio-wave span:nth-child(4) { animation-delay: 0.36s; }
.audio-wave span:nth-child(5) { animation-delay: 0.48s; }
.audio-card.playing .audio-wave span {
  background: linear-gradient(180deg, rgba(22,93,255,0.95), rgba(167,139,250,0.65));
  opacity: 1;
  animation: wave 1.3s infinite ease-in-out;
}
.audio-card.playing .audio-wave span:nth-child(odd) { animation-duration: 1.1s; }
.audio-card.playing .audio-wave span:nth-child(even) { animation-duration: 1.4s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.6); }
  50% { transform: scaleY(1.4); }
}

.empty-file-tip {
  text-align: center;
  color: var(--muted);
  padding: 30px;
  font-size: 16px;
}

/* 全屏加载遮罩（语言切换时显示） */
.loading-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  color: #F8FAFC;
  font-size: 18px;
}
/* 成功提示弹窗 */
.toast {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: #165DFF;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 999999;
  display: none;
  box-shadow: 0 0 20px rgba(22,93,255,0.3);
}

/* 帮助教程页面整体美化 */
#dynamicHelpTutorials {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  display: grid;
  gap: 20px;
}

/* 教程头部标题 */
.dynamic-tutorials-header h3 {
  font-size: 22px;
  color: #e2e8f0;
  margin: 0 0 10px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* 单个教程卡片 */
.dynamic-tutorial-group {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}
.dynamic-tutorial-group:hover {
  border-color: rgba(22,93,255,0.25);
  transform: translateY(-2px);
}

/* 教程分组小标题 */
.dynamic-tutorial-group h4 {
  font-size: 17px;
  color: #38bdf8;
  margin: 0 0 12px 0;
  font-weight: 500;
}

/* 教程正文 */
.dynamic-tutorial-group p {
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 15px;
  margin: 0;
}

/* 加载中 / 空状态 / 错误样式美化 */
.help-loading,
.help-empty,
.help-error {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 15px;
}
.help-error {
  color: #f87171;
}

/* 帮助教程页面美化 */
#dynamicHelpTutorials {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  display: grid;
  gap: 20px;
}

/* 教程头部标题 */
.dynamic-tutorials-header h3 {
  font-size: 22px;
  color: #e2e8f0;
  margin: 0 0 10px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* 单个教程卡片 */
.dynamic-tutorial-group {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}
.dynamic-tutorial-group:hover {
  border-color: rgba(22,93,255,0.25);
  transform: translateY(-2px);
}

/* 教程分组小标题 */
.dynamic-tutorial-group h4 {
  font-size: 17px;
  color: #38bdf8;
  margin: 0 0 12px 0;
  font-weight: 500;
}

/* 教程正文 */
.dynamic-tutorial-group p {
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 15px;
  margin: 0;
}

/* 加载中 / 空状态 / 错误样式美化 */
.help-loading,
.help-empty,
.help-error {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 15px;
}
.help-error {
  color: #f87171;
}