/* ========== CSS Variables & Reset ========== */
:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --accent: #FF6B6B;
  --accent2: #FFD93D;
  --accent3: #6BCB77;
  --accent4: #4D96FF;
  --bg: #F8F9FE;
  --bg-card: #FFFFFF;
  --bg-dark: #1A1A2E;
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-light: #B2BEC3;
  --border: #E8ECF1;
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-height: 64px;
  --header-height: 50px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  height: 100vh;
}

#app {
  max-width: 430px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

#page-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 10px);
  -webkit-overflow-scrolling: touch;
}

/* ========== Tab Bar ========== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  height: 100%;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.tab-item.active { color: var(--primary); }

.tab-item .tab-icon {
  width: 24px;
  height: 24px;
}

.tab-item .tab-icon svg {
  width: 100%;
  height: 100%;
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
}

.tab-center {
  position: relative;
  top: -16px;
}

.tab-icon-center {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), #8B5CF6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(108,92,231,0.4);
}

.tab-icon-center svg {
  width: 26px;
  height: 26px;
}

/* ========== Page Common ========== */
.page {
  display: none;
  animation: fadeInUp 0.3s ease;
}

.page.active { display: block; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  padding: 16px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 2px;
}

.page-title-emoji {
  -webkit-text-fill-color: initial;
  color: initial;
}

/* 音乐创作 - 梦幻紫金 */
.page-title-create {
  background: linear-gradient(135deg, #A29BFE 0%, #6C5CE7 50%, #FDCB6E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 8px rgba(162,155,254,0.25), 0 2px 4px rgba(108,92,231,0.15);
}

/* 作品广场 - 活力橙红 */
.page-title-community {
  background: linear-gradient(135deg, #FF6B6B 0%, #FD79A8 40%, #FDCB6E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 8px rgba(255,107,107,0.25), 0 2px 4px rgba(253,121,168,0.15);
}

/* 音频工具箱 - 科技青蓝 */
.page-title-tools {
  background: linear-gradient(135deg, #00CEC9 0%, #0984E3 50%, #74B9FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 8px rgba(0,206,201,0.25), 0 2px 4px rgba(9,132,227,0.15);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.section {
  padding: 0 16px 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title .more {
  font-size: 13px;
  color: var(--primary);
  font-weight: 400;
  cursor: pointer;
}

/* ========== Cards ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.card:active { transform: scale(0.98); }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 24px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.95); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8B5CF6);
  color: #fff;
  box-shadow: 0 4px 12px rgba(108,92,231,0.3);
}

.btn-secondary {
  background: var(--bg);
  color: var(--primary);
  border: 1.5px solid var(--primary-light);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: none;
}

.btn-accent {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,107,107,0.3);
}

.btn-sm {
  padding: 2px 10px;
  font-size: 11px;
  line-height: 1.3;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s ease;
}

.btn-icon svg { width: 20px; height: 20px; }
.btn-icon:active { background: var(--border); }

/* ========== Inputs ========== */
.input-group {
  margin-bottom: 16px;
}

.input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s ease;
}

.input:focus {
  border-color: var(--primary);
  background: #fff;
}

.profile-edit-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.profile-edit-name {
  flex: 1;
  min-width: 0;
}

.profile-edit-sex {
  flex: 0 0 118px;
  width: 118px;
}

.profile-edit-modal .input {
  box-sizing: border-box;
  height: 50px;
  min-height: 50px;
}

.profile-edit-select,
.profile-birthday-select {
  height: 50px;
  min-height: 50px;
  line-height: 1.2;
  padding-top: 0;
  padding-bottom: 0;
}

.profile-edit-select,
.profile-birthday-select {
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  appearance: none;
  -webkit-appearance: none;
}

.profile-birthday-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-birthday-select {
  color: var(--text);
  background-color: var(--bg);
}

.textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  resize: vertical;
  min-height: 200px;
  font-family: inherit;
}

.textarea:focus {
  border-color: var(--primary);
  background: #fff;
}

.textarea-wrapper {
  position: relative;
  padding-bottom: 40px;
}

.textarea-actions {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.sel-btn {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  background: transparent;
  color: var(--text-secondary);
}
.sel-btn svg {
  width: 14px;
  height: 14px;
}
.sel-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(108, 92, 231, 0.08);
}
.sel-btn.active {
  background: rgba(108, 92, 231, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.15);
}
.sel-btn.active:hover {
  background: rgba(108, 92, 231, 0.2);
}

.paste-btn {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
}

.paste-btn:hover {
  background: rgba(108, 92, 231, 0.2);
}

.paste-btn svg,
.ai-gen-lyric-btn svg,
.refresh-lyric-btn svg {
  width: 14px;
  height: 14px;
}

.ai-gen-lyric-btn {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  background: rgba(0, 206, 201, 0.1);
  color: #00CEC9;
}

.ai-gen-lyric-btn:hover {
  background: rgba(0, 206, 201, 0.2);
}

.refresh-lyric-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  height: 28px;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  background: rgba(255,255,255,0.85);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.refresh-lyric-btn:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.paste-btn:hover {
  background: rgba(108, 92, 231, 0.2);
}

/* ========== Tags / Chips ========== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg);
  color: var(--text-secondary);
}

.tag-primary,
.tag-accent,
.tag-bpm,
.tag-success,
.tag-outline {
  /* 颜色由内联 style 决定，此处不做颜色预设 */
}

.tag-outline {
  padding: 3px 10px;
}

@keyframes hotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,87,34,0.4); transform: scale(1); }
  50% { box-shadow: 0 0 12px 4px rgba(255,87,34,0.25); transform: scale(1.06); }
}
@keyframes hotShimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}
@keyframes recommendPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,83,80,0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 14px 2px rgba(239,83,80,0.35); }
}
.recommend-badge {
  animation: recommendPulse 1.5s ease-in-out infinite !important;
}
.tag-hot {
  position: relative;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff5722, #ff9800);
  animation: hotPulse 1.2s ease-in-out infinite;
  overflow: hidden;
}
.tag-hot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: hotShimmer 2s linear infinite;
  border-radius: 20px;
  pointer-events: none;
}

.tag-outline {
  padding: 3px 10px;
}

/* ========== Grid ========== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ========== Avatars ========== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}

.app-boot-fallback {
  display: flex;
  min-height: calc(100vh - 72px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px;
  color: var(--text-primary);
  text-align: center;
}

.app-boot-fallback[hidden] {
  display: none;
}

.app-boot-fallback-title {
  font-size: 16px;
  font-weight: 700;
}

.avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }

/* ========== Badge ========== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.agreement-modal-overlay {
  z-index: 320;
}

.modal-content {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  max-height: 80vh;
  overflow-y: auto;
  padding: 10px 20px 20px;
  animation: slideUp 0.3s ease;
}

.modal-content.agreement-modal-content {
  max-height: 82vh;
}

.agreement-modal-body {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.agreement-modal-body p {
  margin: 0 0 10px;
}

.agreement-modal-body img {
  max-width: 100%;
  height: auto;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 300;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ========== Mini Player ========== */
.mini-player {
  position: absolute;
  bottom: calc(var(--tab-height) + var(--safe-bottom));
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  z-index: 201;
  border-top: 1px solid var(--border);
}

.mini-player-progress {
  height: 2px;
  background: var(--border);
  position: relative;
}

.mini-player-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s linear;
}

.mini-player-info {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
}

.mini-player-cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-light), var(--accent2));
}

.mini-player-meta {
  flex: 1;
  min-width: 0;
}

.mini-player-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-title span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.mini-player-title-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
}

.mini-player-title-copy {
  display: none;
}

.mini-player-status {
  display: none;
  align-items: center;
  gap: 4px;
  height: 12px;
  font-size: 9px;
  line-height: 12px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.mini-player-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.mini-player[data-play-status="playing"] .mini-player-status {
  color: #16a34a;
}

.mini-player[data-play-status="paused"] .mini-player-status {
  color: #f59e0b;
}

.mini-player[data-play-status="ended"] .mini-player-status {
  color: var(--text-light);
}

.mini-player-artist {
  font-size: 11px;
  color: var(--text-secondary);
}

.mini-player-lyrics {
  display: none;
  font-size: 12px;
  color: var(--primary);
  line-height: 1.6;
  max-height: 36px;
  overflow: hidden;
  margin-top: 4px;
}

/* 悬浮窗形态 - 收起（可拖动气泡） */
.mini-player.floating {
  position: absolute;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 20px);
  right: 16px;
  left: auto;
  width: auto;
  max-width: calc(100% - 32px);
  border-radius: 24px;
  border-top: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-radius 0.3s ease, width 0.3s ease, transform 0.25s ease, opacity 0.25s ease;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.mini-player.floating:active {
  cursor: grabbing;
}

.mini-player.floating.dragging {
  transition: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  cursor: grabbing;
}

.mini-player.floating .mini-player-progress {
  display: none;
}

.mini-player.floating .mini-player-info {
  padding: 6px 12px 6px 8px;
  gap: 8px;
}

.mini-player.floating .mini-player-cover {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.mini-player.floating .mini-player-title {
  font-size: 12px;
  width: 98px;
  max-width: 98px;
  line-height: 16px;
  text-overflow: clip;
}

.mini-player.floating .mini-player-title-track {
  max-width: none;
  min-width: 100%;
  padding-left: 0;
  overflow: visible;
  text-overflow: clip;
  animation: none;
}

.mini-player.floating .mini-player-title-track.is-marquee {
  animation: mini-title-marquee 7.5s linear infinite;
}

.mini-player.floating .mini-player-title-track.is-marquee .mini-player-title-copy {
  display: inline-block;
}

.mini-player.floating .mini-player-title-track:not(.is-marquee) .mini-player-title-copy {
  display: none;
}

.mini-player.floating .mini-player-title-track > span {
  flex: 0 0 auto;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.mini-player.floating .mini-player-status {
  display: flex;
}

.mini-player.floating .mini-player-artist {
  display: none;
}

.mini-player.floating .mini-player-lyrics {
  display: none;
}

.mini-player.floating .mini-player-close {
  display: flex;
  width: 24px;
  height: 24px;
  opacity: 1;
}

/* 拖动时取消过渡以获得跟手体验 */
.mini-player.floating.dragging {
  transition: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  cursor: grabbing;
}

/* 悬浮窗展开态 */
.mini-player.floating.expanded {
  width: calc(100% - 32px);
  left: 16px;
  right: auto;
  border-radius: var(--radius);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  cursor: default;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 8px);
}

.mini-player.floating.expanded .mini-player-progress {
  display: block;
}

.mini-player.floating.expanded .mini-player-info {
  padding: 10px 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.mini-player.floating.expanded .mini-player-cover {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.mini-player.floating.expanded .mini-player-title {
  font-size: 14px;
  max-width: none;
  text-overflow: ellipsis;
}

.mini-player.floating.expanded .mini-player-title-track {
  display: block;
  max-width: 100%;
  min-width: 0;
  padding-left: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: none;
}

.mini-player.floating.expanded .mini-player-title-copy {
  display: none;
}

.mini-player.floating.expanded .mini-player-status {
  display: none;
}

.mini-player.floating.expanded .mini-player-artist {
  display: block;
  font-size: 12px;
}

.mini-player.floating.expanded .mini-player-lyrics {
  display: block;
  width: 100%;
  padding-left: 56px;
  padding-right: 8px;
  padding-bottom: 10px;
}

.mini-player.floating.expanded .mini-player-close {
  display: flex;
}

/* ========== Floating Music Task ========== */
.music-task-float {
  position: absolute;
  right: 16px;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 20px);
  width: 184px;
  min-height: 44px;
  z-index: 202;
  border: none;
  border-radius: 24px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  padding: 6px 12px 6px 8px;
  display: none;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mini-player.floating.expanded + .music-task-float {
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 116px);
}

.music-task-float.has-mini-player {
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 76px);
}

.music-task-float.has-expanded-mini-player {
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 126px);
}

.music-task-float.is-visible {
  display: inline-flex;
  animation: musicTaskFloatIn .22s ease both;
}

.music-task-float.is-completing {
  border-color: rgba(34, 197, 94, 0.38);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.18);
}

.music-task-float__visual {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 8px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--accent2));
}

.music-task-float__visual i {
  width: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: .78;
  animation: musicTaskFloatBars 1.1s ease-in-out infinite;
}

.music-task-float__visual i:nth-child(1) { height: 10px; animation-delay: 0s; }
.music-task-float__visual i:nth-child(2) { height: 18px; animation-delay: .12s; }
.music-task-float__visual i:nth-child(3) { height: 13px; animation-delay: .24s; }

.music-task-float__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.music-task-float__title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-task-float__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1;
}

.music-task-float__status {
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-task-float__percent {
  color: #6C5CE7;
  font-size: 10px;
  font-weight: 900;
}

.music-task-float__track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(108, 92, 231, 0.1);
  overflow: hidden;
}

.music-task-float__fill {
  display: block;
  width: var(--task-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6C5CE7, #00CEC9);
  transition: width .8s ease;
}

@keyframes musicTaskFloatIn {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes musicTaskFloatBars {
  0%, 100% { transform: scaleY(.58); opacity: .58; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes mini-title-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 14px)); }
}

/* ========== Skeleton Loading ========== */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #F0F0F5 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== Scrollbar ========== */
/* Firefox */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Webkit 全局滚动条美化 */
::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

::-webkit-scrollbar-track {
  background: transparent;
  display: none;
}

::-webkit-scrollbar-thumb {
  background: transparent;
  display: none;
}

::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

::-webkit-scrollbar-thumb:active {
  background: transparent;
}

/* 水平滚动容器仍隐藏滚动条 */
.daily-scroll::-webkit-scrollbar,
.create-tabs::-webkit-scrollbar,
.device-scroll::-webkit-scrollbar,
.topic-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
