/* music-page.css — 网易云音乐个人页样式 */

.music-app {
  display: flex;
  flex-direction: column;
  background: #f0f0f4;
  overflow: hidden;
}

.music-app.music-has-page-bg {
  background-image: var(--music-page-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.music-app.music-has-page-bg .music-app-bg {
  display: none;
}

.music-app-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.music-app-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(180, 200, 220, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 60%, rgba(190, 200, 215, 0.2) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 90%, rgba(200, 210, 225, 0.15) 0%, transparent 40%);
}

.music-app-deco {
  position: absolute;
  opacity: 0.08;
  font-size: 28px;
  color: #6a7a9a;
  pointer-events: none;
}
.music-app-deco.deco-1 { top: 8%; left: 6%; transform: rotate(-12deg); font-size: 32px; }
.music-app-deco.deco-2 { top: 12%; right: 8%; transform: rotate(8deg); font-size: 22px; }
.music-app-deco.deco-3 { top: 38%; left: 10%; transform: rotate(-20deg); font-size: 20px; }
.music-app-deco.deco-4 { top: 35%; right: 5%; transform: rotate(15deg); font-size: 26px; }
.music-app-deco.deco-5 { bottom: 30%; left: 4%; transform: rotate(5deg); }
.music-app-deco.deco-6 { bottom: 25%; right: 10%; transform: rotate(-8deg); font-size: 18px; }
.music-app-deco.deco-star { font-size: 14px; opacity: 0.12; color: #8aa0c0; }
.music-app-deco.deco-star.s1 { top: 15%; left: 25%; }
.music-app-deco.deco-star.s2 { top: 28%; right: 18%; }
.music-app-deco.deco-star.s3 { top: 50%; left: 15%; }
.music-app-deco.deco-star.s4 { bottom: 40%; right: 25%; }

/* ===== 顶部导航栏 ===== */
.music-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  padding-top: calc(10px + env(safe-area-inset-top));
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.music-topbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.music-topbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3a3a;
  font-size: 20px;
  border-radius: 50%;
  position: relative;
}

.music-topbar-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ec4141;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.music-topbar-center {
  position: absolute;
  left: 50%;
  top: calc(10px + env(safe-area-inset-top));
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.music-topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #888;
  font-size: 13px;
}

.music-topbar-status i {
  font-size: 12px;
}

.music-topbar-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ===== 可滚动内容区 ===== */
.music-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  position: relative;
  z-index: 1;
  padding-bottom: 60px;
}

/* ===== 个人资料区 ===== */
.music-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 12px;
}

.music-avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 12px;
}

.music-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-username-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.music-username {
  font-size: 20px;
  font-weight: 580;
  color: #2a2a2a;
}

.music-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 15px;
  padding: 0 6px;
  background: linear-gradient(135deg, #3a3a3a 0%, #555 100%);
  color: #d4a574;
  font-size: 8px;
  font-weight: 550;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.music-vip-badge .vip-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8c496, #d4a574);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #3a3a3a;
  font-weight: 800;
}

.music-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #999;
  font-size: 12px;
  margin-bottom: 12px;
}

.music-badges-row i {
  font-size: 11px;
}

/* ===== 统计行 ===== */
.music-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 4px 0 16px;
}

.music-stat-item {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 13px;
  color: #555;
}

.music-stat-num {
  font-weight: 550;
  font-size: 15px;
  color: #2a2a2a;
}

.music-stat-label {
  color: #888;
  font-size: 12px;
}

.music-weekly-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  background: #ec4141;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  margin-left: 4px;
}

/* ===== 快捷入口行 ===== */
.music-quick-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px 16px;
  overflow: visible;
}

.music-quick-tabs::-webkit-scrollbar {
  display: none;
}

.music-quick-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 0;
  border-radius: 4px;
  color: #3a3a3a;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.music-quick-tab i {
  font-size: 14px;
  color: #666;
}

.music-quick-tab-grid {
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  border: 0;
  border-radius: 17px;
  flex-shrink: 0;
}

.music-quick-tab-grid i {
  font-size: 16px;
  color: #666;
}

/* ===== 照片卡片行 ===== */
.music-photo-cards {
  display: flex;
  gap: 10px;
  padding: 0 20px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.music-photo-cards::-webkit-scrollbar {
  display: none;
}

.music-photo-card {
  flex: 0 0 calc(25% - 8px);
  min-width: 78px;
  border-radius: 12px;
  overflow: hidden;
  background: #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.music-photo-card-img {
  flex: 3;
  overflow: hidden;
  min-height: 0;
}

.music-photo-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.music-photo-card-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 2px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #555, #333);
}

/* ===== SVIP横幅 ===== */
.music-svip-banner {
  margin: 0 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.music-svip-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.music-svip-text {
  flex: 1;
  font-size: 13px;
  color: #3a3a3a;
}

.music-svip-arrow {
  color: #ccc;
  font-size: 14px;
}

/* ===== 内容标签页 ===== */
.music-content-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 14px 20px 0;
  position: relative;
}

.music-content-tab {
  font-size: 16px;
  color: #888;
  padding-bottom: 10px;
  position: relative;
  font-weight: 500;
}

.music-content-tab.active {
  color: #2a2a2a;
  font-weight: 700;
}

.music-content-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2.5px;
  background: #2a2a2a;
  border-radius: 2px;
}

.music-content-divider {
  height: 0.5px;
  background: rgba(0, 0, 0, 0.06);
  margin: 0 16px;
}

/* ===== 音乐子标签 ===== */
.music-sub-tabs {
  display: flex;
  align-items: center;
  padding: 12px 20px 8px;
  gap: 18px;
}

.music-sub-tab {
  font-size: 14px;
  color: #888;
  position: relative;
}

.music-sub-tab.active {
  color: #2a2a2a;
  font-weight: 600;
}

.music-sub-tab-sup {
  font-size: 10px;
  color: #aaa;
  vertical-align: super;
  margin-left: 1px;
}

.music-sub-tab-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.music-sub-tab-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 16px;
}

.music-sub-lock {
  margin-right: 2px;
  font-size: 11px;
  color: #bbb;
}

/* ===== 歌单列表 ===== */
.music-playlist-list {
  padding: 0 16px;
}

.music-playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.music-playlist-cover {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e8e8e8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

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

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

.music-playlist-title {
  font-size: 15px;
  color: #2a2a2a;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-playlist-sub {
  font-size: 12px;
  color: #aaa;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-playlist-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
  color: #555;
  font-size: 11px;
}

.music-playlist-action i {
  font-size: 12px;
}

.music-playlist-more {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 14px;
}

/* ===== 底部播放条 ===== */
.music-player-bar {
  position: absolute;
  bottom: 52px;
  left: 8px;
  right: 8px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 6px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 26px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 5;
  padding-bottom: 0;
}

.music-player-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #e0e0e0;
}

.music-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-player-info {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #3a3a3a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player-info .song-artist {
  color: #aaa;
}

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

.music-player-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #3a3a3a;
}

.music-player-btn.play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 14px;
}

/* ===== 底部导航栏 ===== */
.music-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 52px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(248, 248, 250, 0.92);
  border-top: 0.5px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  position: relative;
  z-index: 6;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.music-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: #999;
  position: relative;
}

.music-nav-item.active {
  color: #2a2a2a;
  font-weight: 600;
}

.music-nav-item i,
.music-nav-item svg {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.music-nav-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 6px;
  height: 6px;
  background: #ec4141;
  border-radius: 50%;
}

/* ===== 搜索覆盖层 ===== */
.music-search-overlay {
  position: absolute;
  inset: 0;
  background: #f5f5f7;
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-search-overlay.show {
  transform: translateX(0);
}

.music-search-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 10px 10px 8px;
  padding-top: calc(10px + env(safe-area-inset-top));
  flex-shrink: 0;
}

.music-search-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #3a3a3a;
  flex-shrink: 0;
}

.music-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  height: 36px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 0 10px;
  gap: 5px;
}

.music-search-icon {
  font-size: 13px;
  color: #aaa;
  flex-shrink: 0;
}

.music-search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: #2a2a2a;
  height: 100%;
}

.music-search-input::placeholder {
  color: #bbb;
}

.music-search-submit {
  flex-shrink: 0;
  font-size: 14px;
  color: #ec4141;
  font-weight: 500;
  padding: 0 4px;
}

/* ===== 搜索结果 ===== */
.music-search-results {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 20px;
}

.music-search-empty,
.music-search-loading {
  text-align: center;
  color: #aaa;
  font-size: 14px;
  padding: 60px 20px;
}

.music-search-loading i {
  margin-right: 6px;
}

.music-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  transition: background 0.15s;
}

.music-search-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.music-search-item-index {
  width: 28px;
  text-align: center;
  font-size: 14px;
  color: #bbb;
  flex-shrink: 0;
}

.music-search-item-info {
  flex: 1;
  min-width: 0;
}

.music-search-item-name {
  font-size: 15px;
  color: #2a2a2a;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-search-item-artist {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-search-item-play {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #999;
  flex-shrink: 0;
}

.music-search-item-more {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #999;
  flex-shrink: 0;
  border: none;
  background: none;
}

.music-search-item-artist {
  display: flex;
  align-items: center;
  gap: 4px;
}

.music-search-item-artist .pd-badge {
  flex-shrink: 0;
}

/* ===== 搜索结果右键菜单 ===== */
.music-search-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s;
}

.music-search-menu-overlay.show {
  background: rgba(0, 0, 0, 0.25);
}

.music-search-menu-popup {
  position: fixed;
  z-index: 9999;
  min-width: 160px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  padding: 6px 0;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.18s, transform 0.18s;
}

.music-search-menu-popup.show {
  opacity: 1;
  transform: scale(1);
}

.music-search-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 14px;
  color: #333;
  text-align: left;
  transition: background 0.12s;
}

.music-search-menu-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.music-search-menu-item i {
  font-size: 16px;
  color: #ec4141;
  width: 20px;
  text-align: center;
}

/* ===== 装扮编辑页 ===== */
.music-dressup-page {
  z-index: 70;
}

.music-dress-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px 1fr 56px;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
  padding-top: calc(10px + env(safe-area-inset-top));
  flex-shrink: 0;
}

.music-dress-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #333;
  font-size: 17px;
}

.music-dress-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #222;
}

.music-dress-save {
  justify-self: end;
  color: #ec4141;
  font-size: 14px;
  font-weight: 650;
}

.music-dress-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 32px;
}

.music-dress-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.music-dress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.music-dress-avatar {
  position: relative;
  align-self: center;
  width: 86px;
  height: 86px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e5e5e8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  line-height: 0;
  appearance: none;
  -webkit-appearance: none;
}

.music-dress-avatar img,
.music-dress-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}

.music-dress-avatar span,
.music-dress-card-image span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
}

.music-dress-avatar img {
  border-radius: 50%;
}

.music-dress-avatar span {
  right: -5px;
  bottom: -3px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.music-dress-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.music-dress-field > span,
.music-dress-section-title {
  font-size: 12px;
  color: #777;
  font-weight: 600;
}

.music-dress-field .input-field {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background: rgba(245, 245, 247, 0.9);
  padding: 0 12px;
  color: #222;
  font-size: 15px;
}

.music-bg-editor {
  margin-top: 2px;
}

.music-bg-picker {
  width: 100%;
  height: 46px;
  display: grid;
  grid-template-columns: 54px 1fr 18px;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: #2a2a2a;
}

.music-bg-preview {
  width: 54px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.music-bg-picker > span:nth-child(2) {
  min-width: 0;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.music-bg-picker i {
  color: #aaa;
  font-size: 12px;
}

.music-dress-card-editor {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.music-dress-card-image {
  position: relative;
  width: 78px;
  aspect-ratio: 1 / 1.28;
  overflow: hidden;
  border-radius: 8px;
  background: #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0;
  border: 0;
  line-height: 0;
}

.music-dress-card-image span {
  right: 5px;
  bottom: 5px;
  width: 22px;
  height: 22px;
  font-size: 10px;
}

/* ===== 播放栏可点击 ===== */
.music-player-bar {
  cursor: pointer;
}

/* ===== 全屏播放页 ===== */
.now-playing-page {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #1a0808;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.now-playing-page.show {
  transform: translateY(0);
}

.now-playing-page.is-closing {
  transform: translateY(100%);
  pointer-events: none;
}

.now-playing-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.5) saturate(1.6);
  z-index: 0;
}

.now-playing-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(30, 30, 40, 0.55) 0%,
    rgba(20, 20, 30, 0.7) 50%,
    rgba(10, 10, 15, 0.85) 100%);
  z-index: 1;
  transition: background 0.6s ease;
}

.now-playing-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 顶部栏 */
.np-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
  padding-top: calc(10px + env(safe-area-inset-top));
  flex-shrink: 0;
}

.np-topbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  border: none;
  background: none;
}

.np-topbar-center {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.np-topbar-title {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 唱片区域 */
.np-vinyl-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  padding: 10px 0;
}

.np-vinyl-disc {
  position: relative;
  width: min(72vw, 320px);
  height: min(72vw, 320px);
  animation: vinyl-spin 20s linear infinite;
  animation-play-state: paused;
}

.np-vinyl-disc.spinning {
  animation-play-state: running;
}

.np-vinyl-outer {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    transparent 28%,
    #1a1a1a 28.5%,
    #222 30%,
    #1a1a1a 32%,
    #222 34%,
    #1a1a1a 36%,
    #222 38%,
    #1a1a1a 40%,
    #2a2a2a 42%,
    #1e1e1e 60%,
    #2a2a2a 62%,
    #1e1e1e 64%,
    #2a2a2a 66%,
    #1e1e1e 68%,
    #252525 90%,
    #333 92%,
    #222 94%,
    #1a1a1a 96%,
    #333 98%,
    #222 100%);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.04),
    0 8px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.np-vinyl-cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52%;
  height: 52%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

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

/* 唱针 SVG */
.np-needle-svg {
  position: absolute;
  top: -12px;
  left: 50%;
  margin-left: -12px;
  width: 80px;
  height: 214px;
  z-index: 2;
  transform-origin: 40px 13px;
  transform: rotate(-30deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

.np-needle-svg.np-needle-on {
  transform: rotate(0deg);
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 歌曲信息 */
.np-song-info {
  flex-shrink: 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.np-song-text {
  flex: 1;
  min-width: 0;
}

.np-song-name {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-song-artist {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-song-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.np-song-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  border: none;
  background: none;
}

.np-song-action-btn svg {
  width: 22px;
  height: 22px;
}

.np-song-action-btn span {
  font-size: 11px;
}

/* 进度条 */
.np-progress-area {
  flex-shrink: 0;
  padding: 20px 24px 6px;
}

.np-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.np-progress-filled {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 2px;
  transition: width 0.3s linear;
}

.np-progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.np-progress-times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

/* 主控制区 */
.np-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px 30px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.np-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  border: none;
  background: none;
}

.np-ctrl-btn.np-small {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.np-ctrl-btn.np-medium {
  width: 44px;
  height: 44px;
  font-size: 26px;
}

.np-ctrl-btn.np-play {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 26px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.np-ctrl-btn.np-active {
  color: #fff;
}

/* ===== 歌单详情页 ===== */
.pd-page {
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pd-header {
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  padding-bottom: 40px;
}

.pd-header-bg {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.7) saturate(1.3);
  z-index: 0;
}

.pd-header-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  z-index: 1;
}

.pd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  padding-top: calc(10px + env(safe-area-inset-top));
  position: relative;
  z-index: 2;
}

.pd-topbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  border: none;
  background: none;
}

.pd-info {
  display: flex;
  gap: 16px;
  padding: 4px 20px 0;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.pd-cover {
  width: 130px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.pd-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 4px;
  min-height: 130px;
}

.pd-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pd-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pd-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.pd-username {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-sep {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.pd-plays {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== 歌单详情 - 歌曲列表区域 ===== */
.pd-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #fff;
  border-radius: 20px 20px 0 0;
  margin-top: -20px;
  position: relative;
  z-index: 1;
  padding-bottom: 70px;
}

.pd-play-all {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 10px;
}

.pd-play-all-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ec4141;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(236, 65, 65, 0.3);
}

.pd-play-all-btn i {
  color: #fff;
  font-size: 14px;
  margin-left: 2px;
}

.pd-play-all-info {
  flex: 1;
  min-width: 0;
}

.pd-play-all-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
}

.pd-play-all-count {
  font-size: 12px;
  color: #999;
  margin-top: 1px;
}

.pd-play-all-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pd-icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 16px;
  border: none;
  background: none;
}

/* ===== 歌曲列表 ===== */
.pd-song-list {
  padding: 0;
}

.pd-song-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  transition: background 0.15s;
}

.pd-song-item:active {
  background: rgba(0, 0, 0, 0.03);
}

.pd-song-cover {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
}

.pd-song-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.pd-song-title {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.pd-song-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  overflow: hidden;
}

.pd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  padding: 1px 4px 0;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 550;
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.pd-badge-sq {
  background: rgba(190, 155, 115, 0.15);
  color: #b8893a;
  border: 1px solid rgba(190, 155, 115, 0.3);
}

.pd-badge-vip {
  background: rgba(236, 65, 65, 0.1);
  color: #ec4141;
  border: 1px solid rgba(236, 65, 65, 0.25);
}

.pd-song-artist {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-song-more {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 14px;
  flex-shrink: 0;
  border: none;
  background: none;
}

/* ===== 歌单详情页 - 播放条定位 ===== */
.pd-page .music-player-bar {
  bottom: calc(8px + env(safe-area-inset-bottom));
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.pd-topbar-right-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ===== 编辑歌单页 ===== */
.edit-playlist-page {
  display: flex;
  flex-direction: column;
  background: #f5f5f7;
  overflow: hidden;
  z-index: 80;
}

.ep-header {
  display: grid;
  grid-template-columns: 44px 1fr 56px;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
  padding-top: calc(10px + env(safe-area-inset-top));
  flex-shrink: 0;
  background: #fff;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.ep-header-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #333;
  font-size: 17px;
  border: none;
  background: none;
}

.ep-header-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #222;
}

.ep-header-btn.ep-save {
  justify-self: end;
  width: auto;
  color: #ec4141;
  font-size: 14px;
  font-weight: 650;
}

.ep-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 32px;
}

.ep-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ep-cover-wrap {
  display: flex;
  justify-content: center;
}

.ep-cover-btn {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  border: none;
  padding: 0;
  background: #e8e8e8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ep-cover-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 12px;
  opacity: 1;
  transition: opacity 0.2s;
}

.ep-cover-overlay i {
  font-size: 20px;
}

.ep-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
}

.ep-field + .ep-field {
  border-top: 0.5px solid rgba(0, 0, 0, 0.06);
}

.ep-field-label {
  font-size: 13px;
  color: #777;
  font-weight: 600;
}

.ep-field-input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(245, 245, 247, 0.9);
  padding: 0 12px;
  color: #222;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}

.ep-field-input:focus {
  border-color: rgba(236, 65, 65, 0.4);
}

.ep-field-input.ep-field-disabled {
  color: #999;
  background: rgba(240, 240, 242, 0.7);
}

/* ===== 歌单操作菜单 ===== */
.music-playlist-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s;
}

.music-playlist-menu-overlay.show {
  background: rgba(0, 0, 0, 0.25);
}

.music-playlist-menu-popup {
  position: fixed;
  z-index: 9999;
  min-width: 170px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  padding: 6px 0;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.18s, transform 0.18s;
}

.music-playlist-menu-popup.show {
  opacity: 1;
  transform: scale(1);
}

.music-playlist-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 14px;
  color: #333;
  text-align: left;
  transition: background 0.12s;
}

.music-playlist-menu-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.music-playlist-menu-item i {
  font-size: 16px;
  color: #666;
  width: 20px;
  text-align: center;
}

.music-playlist-menu-item.pm-disabled {
  color: #bbb;
}

.music-playlist-menu-item.pm-disabled i {
  color: #ccc;
}

/* ===== 新建歌单弹窗 ===== */
.cp-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.cp-dialog-overlay.show {
  background: rgba(0, 0, 0, 0.4);
}

.cp-dialog {
  position: fixed;
  z-index: 10001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: calc(100% - 64px);
  max-width: 320px;
  background: #fff;
  border-radius: 14px;
  padding: 24px 20px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.cp-dialog.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cp-dialog-title {
  font-size: 17px;
  font-weight: 700;
  color: #222;
  text-align: center;
  margin-bottom: 16px;
}

.cp-dialog-input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #f5f5f7;
  padding: 0 12px;
  font-size: 15px;
  color: #222;
  outline: none;
  box-sizing: border-box;
}

.cp-dialog-input:focus {
  border-color: rgba(236, 65, 65, 0.4);
}

.cp-dialog-btns {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.cp-dialog-btn {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
}

.cp-dialog-btn.cp-cancel {
  background: #f0f0f2;
  color: #666;
}

.cp-dialog-btn.cp-confirm {
  background: #ec4141;
  color: #fff;
}

/* ===== 导入歌单选择弹窗 ===== */
.import-playlist-select-dialog {
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.ip-song-count {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 10px;
}

.ip-select-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 4px 8px;
}

.ip-select-toggle {
  font-size: 12px;
  color: #ec4141;
  border: none;
  background: none;
  font-weight: 600;
}

.ip-song-list {
  flex: 1;
  min-height: 0;
  max-height: 40vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 0.5px solid rgba(0, 0, 0, 0.06);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 12px;
}

.ip-song-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
}

.ip-song-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #ec4141;
}

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

.ip-song-name {
  font-size: 14px;
  color: #222;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ip-song-artist {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 删除歌单按钮 ===== */
.ep-delete-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 22px;
  background: none;
  color: #ff4444;
  font-size: 15px;
  font-weight: 600;
}

/* ===== 歌单选择器弹窗 ===== */
.playlist-picker-dialog {
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.playlist-picker-list {
  flex: 1;
  min-height: 0;
  max-height: 50vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
}

.playlist-picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 4px;
  border: none;
  background: none;
  text-align: left;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
  transition: background 0.12s;
}

.playlist-picker-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.playlist-picker-cover {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
}

.playlist-picker-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.playlist-picker-name {
  font-size: 14px;
  color: #222;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-picker-count {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

/* ===== 播放栏上下首按钮 ===== */
.music-player-btn.prev-btn,
.music-player-btn.next-btn {
  width: 32px;
  height: 32px;
  font-size: 16px;
  color: #3a3a3a;
}
