/* ============================================================
   yiting 模板样式（忆听音乐 App 复刻）
   主绿 #6EC98A / 头部渐变 / 迷你播放条 / 深色播放页
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root { --g1: #7ED9A2; --g2: #57BD7E; --mini: #E1F3E8; }
html, body { background: #fff; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; color: #333; }
img { border: 0; }
a { -webkit-user-select: none; user-select: none; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
@media (min-width: 500px) { .app { box-shadow: 0 0 24px rgba(0,0,0,.1); } }

/* ============ 列表页绿色渐变头 ============ */
.yt-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(180deg, var(--g1), var(--g2)); position: sticky; top: 0; z-index: 10; }
.yt-back { flex: none; display: flex; align-items: center; cursor: pointer; }
.yt-title { flex: 1; text-align: center; color: #fff; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-head-sp { flex: none; width: 24px; }
.yt-head-btn { flex: none; background: none; border: none; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; padding: 4px 2px; }
.yt-pill { flex: 1; background: #fff; border-radius: 20px; height: 40px; display: flex; align-items: center; padding: 0 6px 0 16px; }
.yt-pill input { flex: 1; border: none; outline: none; background: transparent; font-size: 15px; color: #222; min-width: 0; }
.yt-pill input::placeholder { color: #bbb; }

/* ============ 首页 ============ */
.yt-home { flex: 1; padding: 0 22px 90px; }
.yt-logo-row { margin-top: 130px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.yt-logo { width: 64px; height: 64px; object-fit: contain; }
.yt-logo-text { font-size: 44px; font-weight: 700; color: var(--g2); letter-spacing: 8px; }
.yt-search-big { margin-top: 46px; border: 1px solid #D9D9D9; border-radius: 10px; height: 54px; display: flex; align-items: center; padding: 0 8px 0 18px; background: #fff; }
.yt-search-big input { flex: 1; border: none; outline: none; background: transparent; font-size: 15px; color: #333; min-width: 0; }
.yt-search-big input::placeholder { color: #aaa; }
.yt-search-go { background: none; border: none; cursor: pointer; display: flex; align-items: center; padding: 6px; }
.yt-entries { margin-top: 30px; display: flex; gap: 30px; }
.yt-entry { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.ye-ico { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ye-dl { background: var(--g2); }
.ye-fav { background: #F87B7B; }
.ye-req { background: #A9B8AE; }
.ye-label { font-size: 13px; color: #555; }
.yt-hot { margin-top: 56px; }
.yt-hot-t { font-size: 14px; color: #888; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font-size: 13px; color: #777; background: #F2F5F3; padding: 8px 16px; border-radius: 18px; text-decoration: none; }
.chip:active { background: #E3EEE8; }

/* ============ 列表 ============ */
.page-body { flex: 1; padding-bottom: 86px; background: #fff; }
.song-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; cursor: pointer; border-bottom: 1px solid #F5F6F6; }
.cover { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: #EFEFEF; flex: none; display: block; }
.yt-ph { display: flex; align-items: center; justify-content: center; background: #E8E8E8; }
.sg-info { flex: 1; min-width: 0; }
.sg-name { font-size: 15px; color: #222; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-artist { font-size: 12px; color: #999; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-dl { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.sg-dl:active { opacity: .6; }
.empty-tip { text-align: center; color: #999; font-size: 14px; padding: 44px 20px; }
.yt-empty { text-align: center; padding: 70px 20px 40px; }
.yt-empty-t { font-size: 15px; color: #666; }
.yt-empty-req { display: inline-block; margin-top: 18px; color: #fff; background: var(--g2); font-size: 14px; padding: 9px 22px; border-radius: 20px; text-decoration: none; }

/* 歌手行 */
.artist-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; border-bottom: 1px solid #F5F6F6; }
.ar-face { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--g2); color: #fff; font-size: 20px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ar-go { flex: none; display: flex; align-items: center; }

/* ============ 播放页（与 appui 一致） ============ */
body[data-page="player"] { background: var(--skin, #6d5138); }
body[data-page="player"] .app { background: var(--skin, #6d5138); transition: background .6s; }
.app-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; position: sticky; top: 0; z-index: 10; }
body[data-page="player"] .app-head { background: transparent; }
.ah-back { width: 26px; height: 26px; flex: none; cursor: pointer; }
.ah-back svg { display: block; }
.ah-title { flex: 1; text-align: center; min-width: 0; }
.ah-name { font-size: 16px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-artist { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-right { width: 26px; flex: none; }
body[data-page="player"] .page-body { padding-bottom: 12px; }
.disc-zone { display: flex; justify-content: center; padding: 44px 0 30px; }
.disc { width: 236px; height: 236px; border-radius: 50%; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; }
.disc-inner { width: 196px; height: 196px; border-radius: 50%; background: #262626; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 30px rgba(0,0,0,.35); }
.disc-cover { width: 148px; height: 148px; border-radius: 50%; object-fit: cover; background: #333; animation: sgspin 22s linear infinite; animation-play-state: paused; }
body.playing .disc-cover { animation-play-state: running; }
@keyframes sgspin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.lyric-zone { flex: 1; padding: 10px 28px; overflow: hidden; position: relative; min-height: 140px; max-height: 230px; }
.l-line { text-align: center; font-size: 15px; line-height: 2.1; color: rgba(255,255,255,.45); transition: color .3s; }
.l-line.active { color: #fff; font-size: 17px; font-weight: 600; }
.l-line.side { opacity: .55; }
.act-zone { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 0 44px 12px; }
.disc-letter { display: none; width: 148px; height: 148px; border-radius: 50%; align-items: center; justify-content: center; color: #fff; font-size: 54px; font-weight: 600; }
.av-0 { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.av-1 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.av-2 { background: linear-gradient(135deg, #fbc2eb, #a6c1ee); }
.av-3 { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
.av-4 { background: linear-gradient(135deg, #f6d365, #fda085); }
.av-5 { background: linear-gradient(135deg, #5ee7df, #b490ca); }
.av-6 { background: linear-gradient(135deg, #c79081, #dfa579); }
.av-7 { background: linear-gradient(135deg, #96fbc4, #f9f586); }
.act-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.act-btn svg { width: 24px; height: 24px; color: rgba(255,255,255,.85); }
.act-btn.liked svg { color: #ff6b81; fill: #ff6b81; }
.prog-zone { padding: 0 20px; display: flex; align-items: center; gap: 10px; color: #fff; font-size: 12px; }
.prog-bar { flex: 1; height: 3px; background: rgba(255,255,255,.3); border-radius: 2px; position: relative; cursor: pointer; }
.prog-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #fff; border-radius: 2px; }
.prog-dot { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 10px; height: 10px; border-radius: 50%; background: #fff; left: 0; }
.ctrl-zone { display: flex; justify-content: center; align-items: center; gap: 50px; padding: 20px 0 16px; }
.c-btn { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.c-btn svg { width: 30px; height: 30px; color: #fff; }
.c-play { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; }
.c-play svg { width: 30px; height: 30px; color: #444; }
@media (max-width: 380px) {
    .disc, .disc-inner { width: 200px; height: 200px; }
    .disc-cover { width: 126px; height: 126px; }
    .ctrl-zone { gap: 36px; }
}

/* ============ 底部迷你播放条 ============ */
.mini-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--mini); display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); z-index: 30; box-shadow: 0 -2px 10px rgba(60,120,90,.08); }
.mb-cover { flex: none; width: 48px; height: 48px; border-radius: 10px; background: #D3EBDD; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-info { flex: 1; min-width: 0; }
.mb-name { font-size: 14px; color: #333; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-artist { font-size: 12px; color: #8FA89B; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-btns { flex: none; display: flex; align-items: center; gap: 18px; }
.mb-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mb-btn:active { opacity: .7; }
body[data-page="player"] .mini-bar { display: none; }

/* ============ 音质弹窗 / Toast ============ */
.sg-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 90; }
.sg-mask.show { opacity: 1; visibility: visible; }
.sg-modal { position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 110%); width: 100%; max-width: 480px; background: #fff; border-radius: 18px 18px 0 0; padding: 20px 0 calc(14px + env(safe-area-inset-bottom)); transition: transform .3s; z-index: 91; }
.sg-modal.show { transform: translate(-50%, 0); }
.qm-title { text-align: center; font-size: 14px; color: #999; padding: 0 20px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-option { display: flex; justify-content: space-between; align-items: center; padding: 15px 26px; font-size: 15px; color: #333; cursor: pointer; }
.q-option:active { background: #F6F6F6; }
.q-option span:last-child { color: #aaa; font-size: 13px; }
.q-cancel { margin: 10px 20px 0; border-top: 1px solid #F0F0F0; text-align: center; padding: 14px 0 2px; font-size: 15px; color: #888; cursor: pointer; }
.sg-toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(20,20,20,.82); color: #fff; font-size: 14px; padding: 9px 20px; border-radius: 20px; opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 99; max-width: 78%; text-align: center; }
.sg-toast.show { opacity: 1; visibility: visible; }
.hot-chips { padding: 14px 16px; }
