* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root { --g1: #56e08a; --g2: #35cf6e; --acc: #2ec97a; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #e9e9e9; display: flex; justify-content: center; }
a { text-decoration: none; }
.app { width: 100%; max-width: 480px; min-height: 100vh; background: #fff; display: flex; flex-direction: column; position: relative; box-shadow: 0 0 24px rgba(0,0,0,.08); }

/* 头部 */
.app-head { background: linear-gradient(135deg, var(--g1), var(--g2)); padding: 12px 14px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10; }
.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; padding: 0 4px; }
.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; display: flex; justify-content: flex-end; }
.ah-search-go svg { display: block; }
.ah-brand-row { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 10px; }
.ah-brand { color: #fff; font-size: 19px; font-weight: 700; }
.ah-acts { display: flex; gap: 8px; }
.ah-dl { color: rgba(255,255,255,.92); font-size: 13px; padding: 4px 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 14px; }
.ah-search { flex: 1; display: flex; align-items: center; gap: 10px; }
.ah-search.flat { flex: 1; }
.ah-search input { flex: 1; height: 36px; border: none; outline: none; border-radius: 18px; background: #fff; padding: 0 16px; font-size: 14px; color: #333; min-width: 0; }
.ah-search button { border: none; background: transparent; color: #fff; font-size: 15px; font-weight: 600; flex: none; cursor: pointer; }

/* 歌曲列表 */
.page-body { flex: 1; padding-bottom: 90px; }
.sec-title { font-size: 14px; color: #999; padding: 14px 16px 4px; }
.song-item { display: flex; align-items: center; padding: 10px 14px; gap: 12px; cursor: pointer; border-bottom: 1px solid #f3f3f3; }
.song-item:active { background: #f6f7f6; }
.cover { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; background: #eee; flex: none; }
.cover-letter { width: 46px; height: 46px; border-radius: 6px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 600; }
.sg-info { flex: 1; min-width: 0; }
.sg-name { font-size: 15px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-artist { font-size: 12px; color: #999; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-play { width: 22px; height: 22px; color: #bcbcbc; flex: none; cursor: pointer; padding: 3px; }
.sg-play svg { display: block; }

/* 热搜词 / 歌手 */
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px 20px; }
.chip { background: #f1f5f2; color: #444; font-size: 14px; padding: 7px 14px; border-radius: 16px; }
.chip:active { background: #d9f4e3; }
.chip .cnt { color: #2ec97a; font-size: 12px; margin-left: 4px; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; padding: 16px 14px 24px; }
.sg-av { text-align: center; }
.sg-av-face { width: 58px; height: 58px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 600; }
.sg-av-name { font-size: 13px; color: #333; margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-av-cnt { font-size: 11px; color: #aaa; margin-top: 2px; }
.av-0 { background: linear-gradient(135deg,#63c9f7,#3d8ef0); } .av-1 { background: linear-gradient(135deg,#ffa66b,#f0703d); }
.av-2 { background: linear-gradient(135deg,#67dfa5,#2ec97a); } .av-3 { background: linear-gradient(135deg,#f97d9c,#e8446e); }
.av-4 { background: linear-gradient(135deg,#a58df0,#6f4de0); } .av-5 { background: linear-gradient(135deg,#63d2f7,#2bb3c9); }
.av-6 { background: linear-gradient(135deg,#f7d063,#e0a23d); } .av-7 { background: linear-gradient(135deg,#7db2f7,#3d67e0); }

/* 迷你播放条 */
.sg-mini { position: absolute; bottom: 0; left: 0; right: 0; background: #eafaf1; display: flex; align-items: center; padding: 8px 14px; gap: 12px; transform: translateY(100%); transition: transform .25s; z-index: 15; }
.sg-mini.show { transform: translateY(0); }
.sg-mini-cover { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: #d5ecdd; }
.sg-mini-info { flex: 1; min-width: 0; cursor: pointer; }
.sg-mini-name { font-size: 15px; color: #333; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-mini-artist { font-size: 12px; color: #999; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-ctrl { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sg-ctrl svg { width: 26px; height: 26px; color: var(--acc); }

/* 弹窗 / toast */
.sg-mask { position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 20; display: none; }
.sg-mask.show { display: block; }
.sg-modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 78%; max-width: 320px; background: #fff; border-radius: 14px; z-index: 21; padding: 22px 18px 18px; display: none; }
.sg-modal.show { display: block; }
.qm-title { text-align: center; color: var(--acc); font-size: 16px; font-weight: 600; margin-bottom: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-option { background: #d9f4e3; border-radius: 8px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; cursor: pointer; font-size: 15px; color: #333; }
.q-option:active { background: #bfead0; }
.q-cancel { background: #e8e8e8; border-radius: 18px; width: 120px; height: 36px; margin: 8px auto 0; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #666; cursor: pointer; }
.sg-toast { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); background: rgba(0,0,0,.75); color: #fff; font-size: 13px; padding: 8px 16px; border-radius: 18px; z-index: 30; opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; max-width: 86%; overflow: hidden; text-overflow: ellipsis; }
.sg-toast.show { opacity: 1; }
.sg-btn { display: block; width: 150px; margin: 0 auto; text-align: center; background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; font-size: 14px; padding: 9px 0; border-radius: 20px; cursor: pointer; border: none; }

/* 首页 App 版式 */
.sec-title-row { display: flex; align-items: center; justify-content: space-between; }
.app-head.home-head { display: block; position: static; padding: 20px 16px 66px; }
.hh-top { display: flex; align-items: center; justify-content: space-between; }
.hh-brand { color: #fff; font-size: 23px; font-weight: 800; letter-spacing: .5px; }
.hh-req { color: #fff; font-size: 13px; padding: 5px 14px; border: 1.5px solid rgba(255,255,255,.65); border-radius: 15px; }
.hh-search { margin-top: 16px; height: 38px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.24); border: 1px solid rgba(255,255,255,.4); border-radius: 19px; padding: 0 14px; color: rgba(255,255,255,.95); font-size: 14px; text-decoration: none; }
.hh-search svg { width: 17px; height: 17px; }
.home-body { position: relative; z-index: 11; background: #fff; border-radius: 18px 18px 0 0; margin: -52px 0 0; padding: 8px 0 26px; box-shadow: 0 -6px 22px rgba(0,0,0,.09); }
.home-body .sec-title-row { padding: 0 14px; }
.home-body .sec-title { font-size: 16px; font-weight: 700; color: #222; }
.sec-more { font-size: 12px; color: #999; padding: 16px 0 4px; }
.cat-row { display: flex; gap: 14px; overflow-x: auto; padding: 14px 14px 4px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-circle { flex: none; width: 58px; text-align: center; text-decoration: none; }
.cat-circle .cc { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.cc-a { background: linear-gradient(135deg, #ff9a5a, #ff5a76); }
.cc-b { background: linear-gradient(135deg, #4f9dff, #3b6fff); }
.cc-c { background: linear-gradient(135deg, #ffb35a, #ff8a3d); }
.cc-d { background: linear-gradient(135deg, #34d0a6, #0fb981); }
.cc-e { background: linear-gradient(135deg, #a86bff, #7d3bff); }
.cat-circle .cname { font-size: 12px; color: #333; margin-top: 6px; display: block; }
.hero { margin: 14px 14px 0; background: linear-gradient(120deg, #2ec97a, #17a35d); border-radius: 16px; padding: 16px; display: flex; align-items: center; justify-content: space-between; color: #fff; text-decoration: none; box-shadow: 0 6px 16px rgba(35,190,115,.35); }
.hero-t { font-size: 16px; font-weight: 700; }
.hero-s { font-size: 12px; opacity: .85; margin-top: 4px; }
.hero-btn { flex: none; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.5); border-radius: 16px; padding: 7px 13px; font-size: 13px; font-weight: 600; }
.row-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 14px 8px; scrollbar-width: none; }
.row-scroll::-webkit-scrollbar { display: none; }
.song-card { flex: none; width: 112px; cursor: pointer; }
.sc-cover { width: 112px; height: 112px; border-radius: 12px; object-fit: cover; display: block; background: #f2f2f2; }
.sc-letter { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 38px; font-weight: 600; }
.sc-name { margin-top: 6px; font-size: 13px; color: #333; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-artist { font-size: 11px; color: #999; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-body .song-item { margin: 0 14px; }
.home-body .chips { padding: 4px 14px 6px; }
.home-body .empty-tip { padding: 30px 14px; }

/* 底部 TabBar */
.tab-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; box-shadow: 0 -2px 14px rgba(0,0,0,.09); display: flex; padding: 7px 0 calc(7px + env(safe-area-inset-bottom)); z-index: 40; }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: #9a9a9a; text-decoration: none; cursor: pointer; }
.tab-item svg { width: 22px; height: 22px; display: block; }
.tab-item.on { color: var(--g2); font-weight: 700; }
body[data-page="player"] .tab-bar { display: none; }
body[data-page="player"] .page-body { padding-bottom: 12px; }

/* 播放页 */
body[data-page="player"] .app { background: var(--skin, #6d5138); transition: background .6s; }
body[data-page="player"] .app-head { background: transparent; }
.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; }
.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; }

/* 页脚 */
.app-foot { padding: 22px 16px 26px; text-align: center; }
.af-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.af-links a { color: #888; font-size: 13px; }
.af-copy { color: #bbb; font-size: 12px; margin-top: 10px; }

@media (max-width: 380px) {
    .avatar-grid { grid-template-columns: repeat(3, 1fr); }
    .disc, .disc-inner { width: 200px; height: 200px; }
    .disc-cover { width: 126px; height: 126px; }
    .ctrl-zone { gap: 36px; }
}

