:root{
  --bg1:#eef1ff;
  --bg2:#e6edf7;

  --on-bg: rgba(17,24,39,.96);
  --on-bg-muted: rgba(17,24,39,.72);

  --card: rgba(255,255,255,.86);
  --card2: rgba(255,255,255,.76);

  --text:#0b1220;
  --muted: rgba(11,18,32,.68);

  --brand1:#4f46e5;
  --brand2:#06b6d4;

  --shadow1: 0 18px 46px rgba(17,24,39,.14);
  --shadow2: 0 10px 30px rgba(17,24,39,.12);

  --radius:18px;
}

*{ box-sizing:border-box; }



/* ===== 顶部玻璃条 ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;

  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 12px;
  flex-wrap:wrap;

  padding: 14px;
  margin-bottom: 12px;

  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.58));
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--shadow1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow:hidden;
}
.topbar::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: 22px;
  background: radial-gradient(700px 220px at 12% 0%, rgba(79,70,229,.12), transparent 60%);
  pointer-events:none;
}

.title-wrap,.actions{ position:relative; z-index:1; }

.title{
  margin:0;
  font-size: 26px;
  font-weight: 1000;
  color: var(--on-bg);
  display:flex;
  align-items:center;
  gap:10px;
}
.subtitle{
  margin:0;
  font-size: 13px;
  font-weight: 800;
  color: var(--on-bg-muted);
}

/* ===== 按钮 ===== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 1000;
  cursor:pointer;
  text-decoration:none;
  border:none;
  transition:.18s ease;
}

.btn.ghost{
  color: rgba(17,24,39,.92);
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(0,0,0,.10);
}
.btn.ghost:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.86);
}

.btn.primary{
  color:#fff;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 16px 34px rgba(79,70,229,.18);
}

/* ===== 工具栏 ===== */
.toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;

  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(14px);
  margin-bottom: 14px;
}

.search-wrap{ flex:1; position:relative; min-width:240px; }
.search-wrap::before{
  content:"🔎";
  position:absolute;
  left:14px;
  top:11px;
  opacity:.6;
}

.search{
  width:100%;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.14);
  padding: 11px 12px 11px 42px;
  background: rgba(255,255,255,.96);
  color:#0b1220;
  outline:none;
}

.pill{
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(17,24,39,.04);
  font-size: 13px;
  font-weight: 900;
}

/* ===== 歌单卡片 ===== */
.pl-grid{
  display:grid;
  gap:14px;
}
@media(min-width:780px){
  .pl-grid{ grid-template-columns:1fr 1fr; }
}

.pl-card{
  display:flex;
  gap:12px;
  align-items:center;

  padding:12px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--shadow2);
  position:relative;
  overflow:hidden;
  transition:.18s ease;
}
.pl-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(600px 220px at 10% 0%, rgba(79,70,229,.10), transparent 60%);
  opacity:.35;
}
.pl-card>*{ position:relative; z-index:1; }

.pl-card:hover{
  transform: translateY(-2px);
  border-color: rgba(79,70,229,.22);
  box-shadow:
    0 20px 46px rgba(17,24,39,.16),
    0 10px 18px rgba(17,24,39,.10);
}

.pl-cover{
  width:78px;
  height:78px;
  border-radius:16px;
  object-fit:cover;
  border:1px solid rgba(0,0,0,.08);
}

.pl-name{
  margin:0;
  font-size:15px;
  font-weight:1000;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pl-desc{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}

.chip{
  padding:6px 10px;
  border-radius:999px;
  background: rgba(17,24,39,.04);
  border:1px solid rgba(0,0,0,.10);
  font-size:12px;
  font-weight:900;
}

.pl-go{
  padding:10px 12px;
  border-radius:14px;
  background: rgba(255,255,255,.74);
  border:1px solid rgba(0,0,0,.10);
  font-weight:1000;
  text-decoration:none;
  color: rgba(17,24,39,.92);
}
.pl-card:hover .pl-go{
  background: rgba(79,70,229,.10);
  border-color: rgba(79,70,229,.22);
}

/* ===== 空状态 ===== */
.empty{
  padding:18px 12px;
  border-radius:16px;
  border:1px dashed rgba(0,0,0,.12);
  background: rgba(255,255,255,.62);
  text-align:center;
}
/* ===== 左侧信息区：防止被按钮挤出奇怪空白 ===== */
.pl-meta{
  flex: 1;
  min-width: 0;
  padding-right: 6px;   /* 给内容一点呼吸，不贴按钮 */
}

/* ===== 简介：和下方信息拉开距离 ===== */
.pl-desc{
  margin-top: 6px;
  margin-bottom: 8px;  /* 关键：不再和歌曲数/时间挤在一起 */
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== 歌曲数 / 创建时间 行 ===== */
.pl-sub{
  display: flex;
  align-items: center;
  gap: 10px;            /* chip 之间更自然 */
  flex-wrap: wrap;
}

/* ===== 卡片整体略微收紧（更高级） ===== */
.pl-card{
  gap: 10px;            /* 原来偏大，稍微收紧 */
}

/* ===== 进入按钮：贴右，不留多余空白 ===== */
.pl-go{
  margin-left: auto;    /* 关键：把按钮推到最右侧 */
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
}


 :root{
    /* ✅ 介于“太黑”和“太白”之间：柔和浅灰紫 */
    --bg1:#eef1ff;
    --bg2:#e6edf7;

    /* 顶部玻璃条文字：深色 */
    --on-bg: rgba(17,24,39,.96);
    --on-bg-muted: rgba(17,24,39,.72);

    /* 卡片：不那么白，稍微灰一点 */
    --card: rgba(255,255,255,.86);
    --card2: rgba(255,255,255,.76);

    --text:#0b1220;
    --muted: rgba(11,18,32,.68);

    --brand1:#4f46e5;
    --brand2:#06b6d4;

    --shadow1: 0 18px 46px rgba(17,24,39,.14);
    --shadow2: 0 10px 30px rgba(17,24,39,.12);

    --radius:18px;

    /* 底部播放器：保留黑色 */
    --player-bg: rgba(10,14,25,.82);
    --player-border: rgba(255,255,255,.14);
    --player-text: rgba(255,255,255,.92);
    --player-muted: rgba(255,255,255,.70);
    --player-btn-bg: rgba(255,255,255,.10);
    --player-btn-bg-hover: rgba(255,255,255,.14);
    --player-btn-border: rgba(255,255,255,.14);
  }

  *{ box-sizing:border-box; }
  body{
    margin:0;
    font-family: ui-sans-serif, system-ui, -apple-system, "PingFang SC","Microsoft YaHei", Arial;
    color: var(--text);
    background:
      radial-gradient(1200px 700px at 15% 10%, rgba(79,70,229,.18), transparent 60%),
      radial-gradient(900px 600px at 85% 20%, rgba(6,182,212,.16), transparent 60%),
      radial-gradient(1100px 800px at 50% 95%, rgba(16,185,129,.09), transparent 60%),
      linear-gradient(180deg, var(--bg1), var(--bg2));
    min-height:100vh;
  }

  /* 让底部播放器不遮挡内容（audioPlayer.js 会用 --player-h 动态占位） */
  .container{
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 12px calc(24px + var(--player-h, 0px) + env(safe-area-inset-bottom)) 12px;
  }

  /* ===== 顶部玻璃条（浅玻璃，不刺眼） ===== */
  .pl-head{
    position: sticky;
    top: 0;
    z-index: 50;

    display:flex;
    gap: 14px;
    align-items:center;
    flex-wrap:wrap;

    padding: 14px;
    border-radius: 20px;

    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.58));
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: var(--shadow1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    margin-bottom: 14px;
    overflow:hidden;
  }
  .pl-head::before{
    content:"";
    position:absolute;
    inset:-2px;
    border-radius: 22px;
    background: radial-gradient(700px 220px at 12% 0%, rgba(79,70,229,.12), transparent 60%);
    pointer-events:none;
  }
  .pl-head > *{ position:relative; z-index:1; }

  .pl-cover{
    width: 108px;
    height: 108px;
    border-radius: 18px;
    object-fit: cover;
    background: rgba(0,0,0,.03);
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 14px 30px rgba(17,24,39,.10);
    flex: 0 0 auto;
  }

  .pl-meta{ min-width: 0; flex: 1; }
  .pl-title{
    margin:0;
    font-size: 20px;
    font-weight: 1000;
    color: var(--on-bg);
    letter-spacing:.2px;
    text-shadow: 0 2px 10px rgba(0,0,0,.08);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .pl-desc{
    margin: 8px 0 0;
    color: var(--on-bg-muted);
    line-height: 1.5;
    font-size: 13px;
    text-shadow: 0 2px 10px rgba(0,0,0,.06);
  }

  /* 方案B：只保留创建时间 */
  .pl-time{ margin-top: 10px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
  .badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 1000;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(17,24,39,.04);
    color: rgba(17,24,39,.88);
    white-space:nowrap;
  }

  .pl-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
    margin-left:auto;
  }

  .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 11px 14px;
    border-radius: 14px;
    font-weight: 1000;
    cursor:pointer;
    text-decoration:none;
    transition: .18s ease;
    user-select:none;
    border:none;
    white-space:nowrap;
  }
  .btn:active{ transform: translateY(1px); }

  .btn.ghost{
    color: rgba(17,24,39,.92);
    background: rgba(255,255,255,.74);
    border: 1px solid rgba(0,0,0,.10);
  }
  .btn.ghost:hover{ transform: translateY(-1px); background: rgba(255,255,255,.86); }

  .btn.primary{
    color:#fff;
    background: linear-gradient(135deg, var(--brand1), var(--brand2));
    box-shadow: 0 16px 34px rgba(79,70,229,.18);
  }
  .btn.primary:hover{ transform: translateY(-1px); filter: brightness(1.02); }

  /* ===== 歌曲列表卡片化 ===== */
  #songsList{ display:flex; flex-direction:column; gap: 12px; }

  #songsList .song{
    display:flex;
    gap: 12px;
    align-items:center;
    padding: 12px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--card), var(--card2));
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: var(--shadow2);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    cursor:pointer;
    position:relative;
    overflow:hidden;
  }
  #songsList .song::before{
    content:"";
    position:absolute; inset:-2px;
    background: radial-gradient(600px 220px at 10% 0%, rgba(79,70,229,.10), transparent 60%);
    pointer-events:none;
    opacity:.35;
  }
  #songsList .song > *{ position:relative; z-index:1; }

  #songsList .song:hover{
    transform: translateY(-2px);
    border-color: rgba(79,70,229,.22);
    box-shadow:
      0 20px 46px rgba(17,24,39,.16),
      0 10px 18px rgba(17,24,39,.10);
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  }

  #songsList .song .cover-image{
    width: 78px;
    height: 78px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.03);
    box-shadow: 0 12px 26px rgba(17,24,39,.08);
    flex: 0 0 auto;
  }

  #songsList .song .song-info{ min-width:0; flex:1; }
  #songsList .song .song-info h2{
    margin:0;
    font-size: 15px;
    font-weight: 1000;
    color: var(--text);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  #songsList .song .song-info p{
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .empty-card{
    padding: 18px 12px;
    border-radius: 16px;
    border: 1px dashed rgba(0,0,0,.12);
    background: rgba(255,255,255,.62);
    color: rgba(17,24,39,.86);
    text-align:center;
  }

  /* ===== 登录弹窗 ===== */
  #loginMask{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display:none;
    align-items:center;
    justify-content:center;
    z-index: 9999;
    padding: 18px;
  }
  #loginMask.show{ display:flex; }
  .login-card{
    width: min(420px, 100%);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 24px 60px rgba(17,24,39,.22);
    overflow:hidden;
  }
  .login-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding: 14px 14px;
    background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(6,182,212,.10));
    border-bottom: 1px solid rgba(0,0,0,.08);
  }
  .login-title{
    margin:0;
    font-weight: 1000;
    color:#0b1220;
  }
  .login-close{
    border:none;
    background: rgba(17,24,39,.06);
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 12px;
    padding: 8px 10px;
    cursor:pointer;
    font-weight: 900;
  }
  .login-body{ padding: 14px; }
  .login-field{ display:flex; flex-direction:column; gap:8px; margin-bottom: 12px; }
  .login-field input{
    border-radius: 12px;
    border:1px solid rgba(0,0,0,.14);
    padding:10px 12px;
    font-size:14px;
    outline:none;
    background: rgba(255,255,255,.98);
  }
  .login-actions{ display:flex; gap:10px; margin-top: 10px; }
  .login-actions button{
    flex:1;
    border:none;
    cursor:pointer;
    border-radius: 14px;
    padding: 11px 14px;
    font-weight: 1000;
  }
  #loginSubmit{
    color:#fff;
    background: linear-gradient(135deg, var(--brand1), var(--brand2));
    box-shadow: 0 16px 34px rgba(79,70,229,.18);
  }
  #loginCancel{
    background: rgba(17,24,39,.06);
    border: 1px solid rgba(0,0,0,.10);
  }
  #loginError{
    display:none;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 900;
    color: #7f1d1d;
    background: rgba(239,68,68,.12);
    border: 1px solid rgba(239,68,68,.20);
    padding: 10px 12px;
    border-radius: 14px;
  }
  #loginSuccess{
    display:none;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 900;
    color: #064e3b;
    background: rgba(16,185,129,.12);
    border: 1px solid rgba(16,185,129,.22);
    padding: 10px 12px;
    border-radius: 14px;
  }

  /* ===== 播放列表面板（保持浅色但不“白”） ===== */
  #playlistPanel{
    position: fixed;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: min(360px, calc(100vw - 24px));
    max-height: 60vh;
    display:none;
    flex-direction:column;
    z-index: 300;
    border-radius: 18px;

    background: rgba(255,255,255,.88);
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 24px 60px rgba(17,24,39,.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow:hidden;
  }
  #playlistPanel.show{ display:flex; }
  .plp-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding: 12px 12px;
    border-bottom: 1px solid rgba(0,0,0,.08);
    color: rgba(17,24,39,.92);
    font-weight: 1000;
  }
  .plp-close{
    border:none;
    cursor:pointer;
    border-radius: 12px;
    padding: 8px 10px;
    font-weight: 1000;
    background: rgba(17,24,39,.06);
    color: rgba(17,24,39,.92);
    border: 1px solid rgba(0,0,0,.10);
  }
  #playlistBody{
    padding: 10px;
    overflow:auto;
  }
  .playlist-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.78);
    color: rgba(17,24,39,.92);
    margin-bottom: 8px;
    cursor:pointer;
  }
  .playlist-item .playlist-name{ font-weight: 1000; font-size: 13px; }
  .playlist-item .playlist-artist{ font-size: 12px; opacity:.75; margin-top:4px; }
  .playlist-item.active{
    background: rgba(79,70,229,.10);
    border-color: rgba(79,70,229,.22);
  }
  .playlist-item.disabled{
    opacity: .55;
    cursor:not-allowed;
  }

  /* ===== ✅ 底部播放器：保留黑色（你要的） ===== */
  #now-playing{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;

    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--player-bg);
    border-top: 1px solid var(--player-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  #now-playing.hidden{ display:none; }
  #now-playing.show{ display:block; }

  #now-playing .top-info{
    display:flex;
    gap:10px;
    align-items:center;
    max-width: 1100px;
    margin: 0 auto;
  }

  #now-playing .cover-image{
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
  }

  #now-playing .song-info h2{
    margin:0;
    font-size: 14px;
    font-weight: 1000;
    color: var(--player-text);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width: 58vw;
  }
  #now-playing .song-info p{
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--player-muted);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width: 58vw;
  }

  #progressContainer{
    max-width: 1100px;
    margin: 10px auto 0;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    overflow:hidden;
    cursor:pointer;
  }
  #progress-bar{
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--brand1), var(--brand2));
    border-radius: 999px;
  }

  .player-controls.in-player{
    max-width: 1100px;
    margin: 10px auto 0;
    display:flex;
    justify-content:space-between;
    align-items:center;
  }
  .pc-btn{
    border:none;
    cursor:pointer;
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 1000;
    background: var(--player-btn-bg);
    color: var(--player-text);
    border: 1px solid var(--player-btn-border);
    transition:.18s ease;
  }
  .pc-btn:hover{ transform: translateY(-1px); background: var(--player-btn-bg-hover); }
  .pc-btn.primary{
    color:#fff;
    background: linear-gradient(135deg, var(--brand1), var(--brand2));
    border-color: rgba(255,255,255,.12);
  }
  .pc-btn.on{
    background: rgba(79,70,229,.20);
    border-color: rgba(79,70,229,.26);
  }

  /* ===== 手机端 ===== */
  @media (max-width: 520px){
    .container{
      padding: 12px 10px calc(24px + var(--player-h, 0px) + env(safe-area-inset-bottom)) 10px;
    }
    .pl-head{
      position: relative;
      top: auto;
      padding: 12px;
      border-radius: 18px;
    }
    .pl-cover{
      width: 78px;
      height: 78px;
      border-radius: 16px;
    }
    .pl-title{ font-size: 18px; }

    .pl-actions{
      width: 100%;
      gap: 8px;
      margin-left: 0;
    }
    .pl-actions .btn{
      flex: 1;
      padding: 11px 10px;
    }

    #songsList .song{
      padding: 12px;
      gap: 10px;
    }
    #songsList .song .cover-image{
      width: 68px;
      height: 68px;
      border-radius: 14px;
    }

    #now-playing .song-info h2,
    #now-playing .song-info p{
      max-width: 54vw;
    }

    #playlistPanel{
      right: 10px;
      bottom: calc(92px + env(safe-area-inset-bottom));
      width: calc(100vw - 20px);
    }
  }