/* ============================================
   Velo DJ Player - Mobile CSS
   Dark theme music player
   ============================================ */

:root {
    --bg: #0a0a1a;
    --bg2: #0f0f24;
    --bg3: #141028;
    --bg-card: #151528;
    --card: #151528;
    --primary: #7c3aed;
    --primary2: #c026d3;
    --primary-dim: #a78bfa;
    --accent: #f97316;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #eab308;
    --text: #e0e0e0;
    --text2: #999;
    --text3: #666;
    --border: #1e1e3a;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
}
body.play-page { overflow: hidden; height: 100vh; height: 100dvh; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { display: none; }
.container { padding: 0 16px; }

/* ===== 通用按钮 ===== */
.btn-v { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all .3s; }
.btn-v-primary { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; }
.btn-v-primary:active { transform: scale(.96); }
.btn-v-ghost { background: rgba(124,58,237,.12); color: var(--primary-dim); border: 1px solid rgba(124,58,237,.25); }
.btn-v-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }
.btn-v-lg { padding: 14px 32px; font-size: 15px; border-radius: 12px; }
.btn-v-round { width: 48px; height: 48px; border-radius: 50%; }

/* ===== 角标/Badge ===== */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge-vip { background: rgba(234,179,8,.15); color: var(--warning); }
.badge-free { background: rgba(34,197,94,.15); color: var(--success); }
.badge-hot { background: rgba(239,68,68,.15); color: var(--danger); }
.badge-new { background: rgba(124,58,237,.15); color: var(--primary-dim); }
.badge-sq { background: rgba(124,58,237,.15); color: var(--primary-dim); }

/* ===== 顶部栏 ===== */
.status-bar {
    height: 44px; background: var(--bg); display: flex; align-items: center;
    justify-content: space-between; padding: 0 20px; font-size: 12px; color: var(--text3);
    position: sticky; top: 0; z-index: 200;
}
.status-time { font-weight: 600; color: var(--text); }

/* m-header 兼容（SPA导航用） */
.m-header { position: sticky; top: 0; z-index: 100; background: linear-gradient(180deg, #12092e 0%, var(--bg) 100%); padding: 10px 16px 12px; border-bottom: 1px solid var(--border); }
.m-header-inner { display: flex; align-items: center; justify-content: space-between; }
.m-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: #fff; text-decoration: none; }
.m-logo i { color: var(--primary); font-size: 22px; }
.m-back-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--text); font-size: 18px; text-decoration: none; }
.m-header-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; color: var(--text); }
.m-header-actions { display: flex; gap: 8px; }
.m-icon-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 16px; text-decoration: none; }

.header { padding: 8px 16px 16px; background: var(--bg); position: sticky; top: 44px; z-index: 199; }
.header-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.header-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.search-box {
    flex: 1; height: 38px; background: var(--bg3); border-radius: 19px;
    display: flex; align-items: center; padding: 0 14px; gap: 8px;
}
.search-box .search-icon { color: var(--text3); font-size: 14px; }
.search-box input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 14px; }
.search-box input::placeholder { color: var(--text3); }
.header-ic {
    width: 36px; height: 36px; border-radius: 50%; background: var(--bg3);
    display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--text3); flex-shrink: 0;
}

/* 导航标签 */
.nav-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab {
    flex-shrink: 0; padding: 8px 18px; border-radius: 18px; font-size: 14px;
    color: var(--text3); background: var(--bg3); transition: all .3s; cursor: pointer;
}
.nav-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; font-weight: 600; }

/* ===== 内容区 ===== */
#app { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
.content { padding: 0 0 120px; min-height: 60vh; }
main.m-content { padding: 0; min-height: 60vh; overflow-y: auto; }
main.m-content .safe-bottom { height: calc(64px + env(safe-area-inset-bottom, 0px)); }

/* ===== 区块标题 ===== */
.section { padding: 16px 0; }
.m-section { padding: 16px; }
.m-section-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; margin-bottom: 14px; }
.section-title { font-size: 18px; font-weight: 700; }
.section-more { font-size: 13px; color: var(--text3); display: flex; align-items: center; gap: 2px; }

/* ===== 菜单列表 ===== */
.m-menu-list { background: var(--card); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.m-menu-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; text-decoration: none; color: var(--text);
    border-bottom: 1px solid var(--border); transition: background .15s;
}
.m-menu-item:last-child { border-bottom: none; }
.m-menu-item:active { background: rgba(255,255,255,.03); }
.m-menu-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.m-menu-text { flex: 1; min-width: 0; }
.m-menu-name { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.m-menu-desc { display: block; font-size: 12px; color: var(--text3); margin-top: 2px; }
.m-menu-arrow { font-size: 18px; color: var(--text3); flex-shrink: 0; }

/* ===== 每日推荐卡片 ===== */
.daily-card {
    margin: 16px; height: 180px; border-radius: 16px;
    background: linear-gradient(135deg, #1a103c, #2d1b69);
    position: relative; overflow: hidden; padding: 20px;
    display: flex; flex-direction: column; justify-content: space-between; cursor: pointer;
}
.daily-card::before {
    content: ""; position: absolute; top: -50%; right: -30%; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(124,58,237,.3), transparent 70%); border-radius: 50%;
}
.daily-label { position: relative; z-index: 1; font-size: 12px; color: var(--primary-dim); letter-spacing: 2px; }
.daily-date {
    position: relative; z-index: 1; font-size: 48px; font-weight: 800;
    background: linear-gradient(135deg, #fff, #c4b5fd);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1;
}
.daily-date span { font-size: 16px; font-weight: 400; -webkit-text-fill-color: var(--primary-dim); margin-left: 4px; }
.daily-desc { position: relative; z-index: 1; font-size: 13px; color: var(--text3); }
.daily-play {
    position: absolute; right: 20px; bottom: 20px; width: 48px; height: 48px;
    border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary2));
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    box-shadow: 0 4px 20px rgba(124,58,237,.4); z-index: 1;
}

/* ===== 快捷入口 9宫格 ===== */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 12px; padding: 16px 16px 8px; }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border-radius: 12px; transition: background .15s; }
.quick-item:active { background: rgba(255,255,255,.05); }
.quick-icon {
    width: 50px; height: 50px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
    position: relative; cursor: pointer;
}
.quick-icon.purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.quick-icon.orange { background: linear-gradient(135deg, #f97316, #fbbf24); }
.quick-icon.red { background: linear-gradient(135deg, #dc2626, #f87171); }
.quick-icon.green { background: linear-gradient(135deg, #059669, #34d399); }
.quick-icon.blue { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.quick-icon.pink { background: linear-gradient(135deg, #db2777, #f472b6); }
.quick-icon.cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.quick-icon.amber { background: linear-gradient(135deg, #d97706, #fbbf24); }
.quick-icon.indigo { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.quick-label { font-size: 11px; color: var(--text3); font-weight: 500; }

/* ===== 横向滚动卡片 ===== */
.h-scroll {
    display: flex; gap: 12px; overflow-x: auto;
    scrollbar-width: none; padding: 0 16px 8px;
}
.h-scroll::-webkit-scrollbar { display: none; }

.card { flex-shrink: 0; width: 140px; cursor: pointer; }
.card-cover {
    width: 140px; height: 140px; border-radius: 12px; overflow: hidden;
    position: relative; margin-bottom: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 40px;
    background: linear-gradient(135deg, #1e1e3a, #2d1b4e);
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover .play-count {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,.6); backdrop-filter: blur(8px);
    padding: 2px 8px; border-radius: 10px; font-size: 10px;
    display: flex; align-items: center; gap: 3px;
}
.card-cover .play-icon {
    position: absolute; bottom: 6px; left: 6px; width: 28px; height: 28px;
    border-radius: 50%; background: rgba(255,255,255,.9);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: var(--primary); opacity: 0; transition: opacity .3s;
}
.card:active .card-cover .play-icon { opacity: 1; }
.card-name {
    font-size: 13px; color: #e0e0e0; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== 大卡片(电台) ===== */
.big-card {
    flex-shrink: 0; width: 280px; height: 160px; border-radius: 16px;
    overflow: hidden; position: relative;
    display: flex; align-items: center; justify-content: center; font-size: 60px; cursor: pointer;
}
.big-card img { width: 100%; height: 100%; object-fit: cover; }
.big-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 60%);
    padding: 16px; display: flex; flex-direction: column; justify-content: flex-end;
}
.big-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.big-card-desc { font-size: 12px; color: #ccc; }

/* ===== 歌曲列表 ===== */
.song-list { padding: 0 16px; }
.song-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border); cursor: pointer;
}
.song-item:last-child { border-bottom: none; }
.song-rank { width: 28px; text-align: center; font-size: 15px; font-weight: 700; color: var(--text3); flex-shrink: 0; }
.song-rank.hot { color: var(--danger); }
.song-rank.top { color: var(--warning); }
.song-cover {
    width: 52px; height: 52px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, #1e1e3a, #2d1b4e);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.song-cover img { width: 100%; height: 100%; object-fit: cover; }
.song-info { flex: 1; min-width: 0; }
.song-name {
    font-size: 14px; color: #e0e0e0; margin-bottom: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.song-meta { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 6px; }
.song-action { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 18px; flex-shrink: 0; }

/* ===== 歌手网格 ===== */
.artist-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0 16px; }
.artist-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.artist-avatar {
    width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
    background: linear-gradient(135deg, #1e1e3a, #2d1b4e);
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.artist-avatar img { width: 100%; height: 100%; object-fit: cover; }
.artist-name { font-size: 12px; color: var(--text); }

/* ===== 标签云 ===== */
.radar-section { margin: 16px; padding: 20px; background: linear-gradient(135deg, #141028, #1a1a2e); border-radius: 16px; border: 1px solid var(--border); }
.radar-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.radar-desc { font-size: 12px; color: var(--text3); margin-bottom: 16px; }
.radar-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.radar-tag {
    padding: 6px 14px; border-radius: 16px; background: #0d0d1a;
    border: 1px solid var(--border); font-size: 12px; color: var(--text2);
    cursor: pointer; transition: all .3s;
}
.radar-tag:active { background: rgba(124,58,237,.15); border-color: rgba(124,58,237,.3); color: var(--primary-dim); }

/* ===== 底部Tab栏 ===== */
.tabbar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 64px; background: rgba(10,10,26,.95); backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 999;
}
.tab {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--text3); font-size: 10px; padding: 6px 12px;
    transition: color .3s; position: relative;
}
.tab i { font-size: 20px; }
.tab.active { color: var(--primary); }
.tab.active::after {
    content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 3px; background: var(--primary); border-radius: 2px;
}
.tab-center {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; margin-top: -16px;
    box-shadow: 0 4px 16px rgba(124,58,237,.4);
}

/* ===== 迷你播放器 ===== */
.mini-player {
    position: fixed; bottom: 64px; left: 12px; right: 12px; height: 52px;
    background: linear-gradient(90deg, #1a103c, #2d1b69);
    border-radius: 12px; display: none; align-items: center;
    padding: 0 12px; gap: 10px; z-index: 998;
    box-shadow: 0 -4px 20px rgba(0,0,0,.3);
}
.mini-player.show { display: flex; }
.mini-progress {
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: rgba(255,255,255,.1); border-radius: 2px 2px 0 0;
}
.mini-progress-fill {
    height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary2));
    border-radius: 2px; width: 0%; transition: width .3s;
}
.mini-cover {
    width: 36px; height: 36px; border-radius: 8px; overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-info { flex: 1; min-width: 0; }
.mini-title {
    font-size: 13px; font-weight: 600; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.mini-artist { font-size: 11px; color: var(--text3); }
.mini-btns { display: flex; gap: 6px; align-items: center; }
.mini-btn {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.1); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer;
}
.mini-btn.play { background: var(--primary); }

/* ===== 全屏播放器 ===== */
.play-fullscreen {
    position: fixed; inset: 0; z-index: 10000;
    background: var(--bg); display: flex; flex-direction: column;
}
.play-bg {
    position: absolute; inset: -40px; z-index: 0;
    background: linear-gradient(135deg, #1a0533, #0a0a1a, #2d1b69);
    filter: blur(60px); opacity: .7;
}
.play-overlay { position: absolute; inset: 0; background: rgba(10,10,26,.65); z-index: 1; }

/* 顶部栏 */
.play-top { position: relative; z-index: 100; height: 44px; display: flex; align-items: center; padding: 0 16px; }
.play-back { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; cursor: pointer; }
.play-title-bar { flex: 1; text-align: center; font-size: 15px; font-weight: 500; color: #ccc; }
.play-actions { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #ccc; cursor: pointer; }

/* 封面 */
.play-cover-section {
    position: relative; z-index: 50;
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 0 10px; flex: 1; justify-content: center;
}
.play-vinyl {
    width: 260px; height: 260px; border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e, #2a2a4a);
    box-shadow: 0 0 60px rgba(124,58,237,.35);
    display: flex; align-items: center; justify-content: center;
    animation: spin 8s linear infinite;
    border: 8px solid #1a1a2e;
}
.play-vinyl.paused { animation-play-state: paused; }
.play-vinyl-inner {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; box-shadow: inset 0 0 15px rgba(0,0,0,.5);
}
.play-vinyl img { position: absolute; width: 260px; height: 260px; border-radius: 50%; object-fit: cover; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* 歌曲信息 */
.play-info-section { position: relative; z-index: 50; text-align: center; padding: 16px 24px 8px; }
.play-song-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; color: #fff; }
.play-song-artist { font-size: 14px; color: var(--primary-dim); }

/* 歌词区 */
.lyrics-area {
    position: relative; z-index: 50; height: 60px; overflow: hidden;
    text-align: center; margin: 0 32px;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
}
.lyric-line { font-size: 14px; color: var(--text3); line-height: 30px; transition: color .3s; }
.lyric-line.active { color: #fff; font-weight: 500; }

/* 进度条 */
.play-progress { position: relative; z-index: 50; padding: 10px 24px; }
.play-progress-bar {
    width: 100%; height: 3px; background: #2a2a4a; border-radius: 2px;
    position: relative; cursor: pointer;
}
.play-progress-fill {
    height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary2));
    border-radius: 2px; width: 0%; transition: width .1s;
}
.play-progress-dot {
    position: absolute; top: 50%; right: 0; transform: translate(50%, -50%);
    width: 12px; height: 12px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 6px rgba(124,58,237,.6);
    display: none;
}
.play-progress-bar:hover .play-progress-dot { display: block; }
.play-times { display: flex; justify-content: space-between; font-size: 11px; color: var(--text3); margin-top: 4px; }

/* 控制按钮 */
.play-controls {
    position: relative; z-index: 50;
    display: flex; align-items: center; justify-content: center;
    gap: 28px; padding: 8px 24px 12px;
}
.play-ctrl { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 18px; cursor: pointer; }
.play-ctrl.active { color: var(--primary); }
.play-ctrl.play {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff;
    box-shadow: 0 4px 20px rgba(124,58,237,.5);
}

/* 底部操作 */
.play-bottom {
    position: relative; z-index: 50;
    display: flex; align-items: center; justify-content: space-around;
    padding: 6px 32px 20px;
}
.play-action { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--text2); font-size: 16px; cursor: pointer; }
.play-action.active { color: var(--primary); }

/* ===== Toast ===== */
.toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,0,0,.85); color: #fff; padding: 12px 24px;
    border-radius: 10px; font-size: 14px; font-weight: 500;
    z-index: 99999; display: none; pointer-events: none;
}

/* ===== 通用卡片 ===== */
.info-card {
    background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border);
    margin: 12px 16px; overflow: hidden;
}
.info-card-header { padding: 14px 16px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--border); }
.info-card-body { padding: 16px; }

/* ===== 加载 ===== */
.loading { text-align: center; padding: 40px; color: var(--text3); font-size: 14px; }
.empty { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty i { font-size: 48px; margin-bottom: 12px; display: block; }

/* ===== 安全区域 ===== */
.safe-bottom { height: calc(64px + env(safe-area-inset-bottom, 0px)); }

/* ===== 下拉刷新 ===== */
.pull-refresh { text-align: center; padding: 20px; color: var(--text3); font-size: 13px; }
