:root {
    --bg: #0F1115;
    --surface: #1A1D23;
    --surface2: #232730;
    --accent: #34D399;
    --text: #E7EAF0;
    --text-sub: #8A91A0;
    --divider: #262A33;
    --danger: #F87171;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    padding-bottom: 150px;
    -webkit-tap-highlight-color: transparent;
}

#app {
    max-width: 680px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
}

@media (min-width: 720px) {
    #app {
        border-left: 1px solid var(--divider);
        border-right: 1px solid var(--divider);
    }
}

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
}
.logo { font-size: 18px; font-weight: 700; color: var(--accent); }
.account-btn {
    background: var(--surface); color: var(--text-sub);
    border: none; border-radius: 16px; padding: 6px 14px; font-size: 13px;
}

.tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    background: var(--surface);
    border-top: 1px solid var(--divider);
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    z-index: 20;
}
.tab {
    flex: 1;
    padding: 8px 0;
    background: none;
    color: var(--text-sub);
    border: none;
    font-size: 14px;
    text-align: center;
}
.tab.active { color: var(--accent); font-weight: 700; }

.view { padding: 0 16px; }
.hidden { display: none !important; }

.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row input {
    flex: 1; background: var(--surface); border: 1px solid var(--divider);
    border-radius: 10px; padding: 10px 14px; color: var(--text); font-size: 15px; outline: none;
}
.search-row input:focus { border-color: var(--accent); }
.search-row button {
    background: var(--accent); color: #0F1115; border: none; border-radius: 10px;
    padding: 0 18px; font-size: 15px; font-weight: 600;
}

.tip { color: var(--text-sub); font-size: 13px; padding: 8px 2px; }

.song-list { list-style: none; }
.song-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 4px; border-bottom: 1px solid var(--divider);
    cursor: pointer;
}
.song-item.playing .s-title { color: var(--accent); }
.s-info { flex: 1; min-width: 0; }
.s-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-artist { font-size: 12px; color: var(--text-sub); margin-top: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-btn {
    background: none; border: none; font-size: 18px; color: var(--text-sub);
    padding: 6px 8px;
}
.fav-btn.on { color: var(--accent); }
.playing-mark { color: var(--accent); font-size: 12px; width: 24px; text-align: center; }

.mini-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 66px;
    width: calc(100% - 24px);
    max-width: 656px;
    display: flex; align-items: center; gap: 10px;
    background: var(--surface2); border-radius: 14px;
    padding: 10px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.mini-info { flex: 1; min-width: 0; }
.mini-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.icon-btn {
    background: var(--accent); color: #0F1115; border: none;
    width: 38px; height: 38px; border-radius: 50%;
    font-size: 14px; font-weight: 700;
}
#miniExpand { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }

.full-player {
    position: fixed; top: 0; bottom: 0; left: 0; right: 0;
    max-width: 680px; margin: 0 auto;
    z-index: 30;
    background: var(--bg); display: flex; flex-direction: column;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
}
.fp-close {
    align-self: flex-end; background: none; border: none;
    color: var(--text-sub); font-size: 16px; padding: 8px;
}
.fp-title { font-size: 20px; font-weight: 700; text-align: center; margin-top: 10px; }
.fp-artist { font-size: 13px; color: var(--text-sub); text-align: center; margin-top: 6px; }
.fp-progress {
    display: flex; align-items: center; gap: 10px; margin: 18px 0 6px;
    font-size: 11px; color: var(--text-sub);
}
.fp-progress input { flex: 1; accent-color: var(--accent); }
.fp-btns { display: flex; justify-content: center; gap: 26px; margin: 8px 0 12px; }
.fp-btns button {
    background: var(--surface); color: var(--text); border: none;
    width: 52px; height: 52px; border-radius: 50%; font-size: 18px;
}
.fp-btns #fpToggle { background: var(--accent); color: #0F1115; font-size: 20px; }
.fp-lyrics {
    flex: 1; overflow-y: auto; text-align: center; padding: 10px 0;
    -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.lrc-line { padding: 7px 0; color: var(--text-sub); font-size: 14px; transition: color .2s; }
.lrc-line.cur { color: var(--accent); font-size: 15px; font-weight: 600; }
.lrc-empty { color: var(--text-sub); font-size: 13px; padding-top: 30px; }

.modal {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.modal-card {
    width: 100%; max-width: 360px; background: var(--surface);
    border-radius: 16px; padding: 22px 20px;
    display: flex; flex-direction: column; gap: 12px;
}
.modal-title { font-size: 17px; font-weight: 700; text-align: center; }
.modal-card input {
    background: var(--bg); border: 1px solid var(--divider);
    border-radius: 10px; padding: 11px 14px; color: var(--text); font-size: 15px; outline: none;
}
.modal-card input:focus { border-color: var(--accent); }
.login-msg { font-size: 12px; color: var(--danger); min-height: 16px; text-align: center; }
.modal-btns { display: flex; flex-direction: column; gap: 8px; }
.modal-card button {
    border-radius: 10px; padding: 11px; font-size: 15px; border: none;
}
.modal-card .primary { background: var(--accent); color: #0F1115; font-weight: 700; }
.modal-card .ghost { background: none; color: var(--text-sub); border: 1px solid var(--divider); }
.modal-card .danger { color: var(--danger); border-color: var(--danger); }

.toast {
    position: fixed; left: 50%; bottom: 180px; transform: translateX(-50%);
    background: rgba(20,22,28,.95); color: var(--text);
    padding: 10px 18px; border-radius: 10px; font-size: 13px;
    z-index: 99; max-width: 80vw; text-align: center;
    border: 1px solid var(--divider);
}

@media (min-width: 720px) {
    .song-item:hover { background: var(--surface); }
    .search-row button:hover { opacity: .9; }
    .topbar { padding-top: 22px; }
    .view { padding-bottom: 12px; }
}

#suggest {
    background: var(--surface);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}
#suggest .sug-item {
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    border-bottom: 1px solid var(--divider);
}
#suggest .sug-item:last-child { border-bottom: none; }
#suggest .sug-item:active { background: var(--surface2); }
#suggest .sug-type {
    color: var(--accent);
    font-size: 12px;
    margin-right: 8px;
}
