/* ============================================================
   仿网易云音乐播放器 - 样式表
   支持PC端和移动端自适应布局
   ============================================================ */

/* ========== CSS变量 & 基础重置 ========== */
:root {
    --primary-color: #ec4141;
    --primary-hover: #d63434;
    --bg-dark: #1a1a2e;
    --bg-darker: #16162a;
    --bg-sidebar: #1e1e36;
    --bg-card: #252541;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a82;
    --border-color: #2a2a4a;
    --progress-bg: #3a3a5a;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
    --sidebar-width: 320px;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
    background: none;
    color: inherit;
    font-family: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
   播放器主体布局
   ============================================================ */
.player-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
}

/* ============================================================
   左侧：歌单侧边栏
   ============================================================ */

/* 歌单分类 Tab */
.playlist-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px 0;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
}

.playlist-tab {
    flex: 1;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    border: none;
    background: none;
    position: relative;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.playlist-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
    transition: width var(--transition-normal);
}

.playlist-tab:hover {
    color: var(--text-primary);
}

.playlist-tab.active {
    color: var(--primary-color);
}

.playlist-tab.active::after {
    width: 24px;
}

/* 搜索区域 */
.search-section {
    padding: 10px 16px;
    flex-shrink: 0;
    position: relative;
}

.search-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding-left: 4px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border-radius: 20px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--primary-color);
}

.search-input {
    flex: 1;
    height: 34px;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.search-btn:hover {
    color: var(--primary-color);
}

/* 搜索结果 */
.search-results {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-sidebar);
    z-index: 1;
}

.search-results-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    font-family: inherit;
}

.search-results-close:hover {
    color: var(--text-primary);
}

.search-result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
    user-select: none;
    -webkit-user-select: none;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.search-result-index {
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 20px;
    text-align: right;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.search-result-name {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-artist {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-loading,
.search-empty {
    padding: 20px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100%;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    z-index: 100;
    transition: transform var(--transition-normal);
}

/* 侧边栏头部 */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 10px;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary-color), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-close-btn {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.sidebar-close-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* 歌单信息 */
.playlist-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
}

.playlist-cover-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.playlist-cover-icon {
    position: absolute;
    left: 20px;
    top: 16px;
}

.playlist-cover {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-color), #c0392b);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.playlist-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.playlist-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 歌曲列表 */
.song-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    border-left: 3px solid transparent;
    user-select: none;
    -webkit-user-select: none;
}

.song-item:hover {
    background: var(--bg-card);
}

.song-item.active {
    background: rgba(236, 65, 65, 0.1);
    border-left-color: var(--primary-color);
}

.song-item.active .song-name {
    color: var(--primary-color);
}

.song-index {
    font-size: 12px;
    color: var(--text-muted);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.song-item.active .song-index {
    color: var(--primary-color);
}

/* 歌单歌曲封面缩略图 */
.song-cover {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
}

.song-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    flex: 1;
}

.song-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-fast);
}

.song-artist {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-playing-icon {
    display: none;
    color: var(--primary-color);
    flex-shrink: 0;
}

.song-item.active .song-playing-icon {
    display: flex;
}

/* ============================================================
   右侧：播放器主区域
   ============================================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 20px 20px 20px;
    gap: 12px;
    min-height: 0;
}

/* 首页链接 */
.home-link {
    position: absolute;
    top: 16px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--bg-card);
    transition: all var(--transition-fast);
    z-index: 10;
}

.home-link:hover {
    color: var(--text-primary);
    background: var(--bg-sidebar);
}

/* 移动端菜单按钮 */
.menu-toggle-btn {
    display: none;
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    z-index: 10;
}

.menu-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-sidebar);
}

/* ============================================================
   黑胶唱片封面区域
   ============================================================ */
.cover-section {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 5px;
}

.disc-container {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 唱片盘面 */
.disc-plate {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: discRotate 20s linear infinite;
    animation-play-state: paused;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.disc-plate.playing {
    animation-play-state: running;
}

/* 黑胶纹理 */
.disc-grooves {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        #1a1a1a 0px,
        #1a1a1a 2px,
        #222 2px,
        #222 3px,
        #1a1a1a 3px,
        #1a1a1a 5px,
        #242424 5px,
        #242424 6px,
        #1a1a1a 6px,
        #1a1a1a 8px,
        #2a2a2a 8px,
        #2a2a2a 9px,
        #1a1a1a 9px,
        #1a1a1a 12px,
        #282828 12px,
        #282828 13px
    );
    z-index: 1;
}

/* 封面图片 */
.disc-cover-wrapper {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 3;
    border: 4px solid #333;
    box-shadow: 0 0 0 8px rgba(0,0,0,0.3);
}

.disc-cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #434343, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* 中心小圆 */
.disc-plate::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 3px solid #333;
    z-index: 4;
}

/* 唱臂 */
.tonearm {
    position: absolute;
    right: -20px;
    top: 20px;
    width: 100px;
    height: 120px;
    z-index: 10;
    transform-origin: top right;
    transform: rotate(25deg);
    transition: transform var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.tonearm.playing {
    transform: rotate(5deg);
}

.tonearm-base {
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #555, #333);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.tonearm-arm {
    position: absolute;
    right: 10px;
    top: 12px;
    width: 3px;
    height: 80px;
    background: linear-gradient(180deg, #666, #444);
    transform: rotate(-35deg);
    transform-origin: top center;
    border-radius: 2px;
}

.tonearm-head {
    position: absolute;
    right: -2px;
    top: 78px;
    width: 12px;
    height: 16px;
    background: #555;
    border-radius: 3px 6px 6px 3px;
    transform: rotate(-35deg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 唱片旋转动画 */
@keyframes discRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================
   歌曲信息
   ============================================================ */
.song-detail {
    text-align: center;
    flex-shrink: 0;
    min-height: 0;
}

.current-song-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.current-song-artist {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================================
   歌词显示区域
   ============================================================ */
.lyrics-container {
    width: 100%;
    max-width: 500px;
    flex: 1 1 0%;
    min-height: 80px;
    overflow: hidden;
    position: relative;
}

.lyrics-container::before,
.lyrics-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    z-index: 2;
    pointer-events: none;
}

.lyrics-container::before {
    top: 0;
    background: linear-gradient(to bottom, var(--bg-dark), transparent);
}

.lyrics-container::after {
    bottom: 0;
    background: linear-gradient(to top, var(--bg-dark), transparent);
}

.lyrics-wrapper {
    height: 100%;
    overflow-y: auto;
    padding: 50px 20px;
    scroll-behavior: smooth;
}

.lyrics-wrapper::-webkit-scrollbar {
    display: none;
}

.lyrics-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding-top: 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lyrics-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lyric-line {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    transition: all var(--transition-normal);
    padding: 4px 0;
    cursor: default;
    line-height: 1.6;
}

.lyric-line.active {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 0 20px rgba(236, 65, 65, 0.3);
}

/* ============================================================
   频谱可视化
   ============================================================ */
.visualizer-container {
    width: 100%;
    max-width: 500px;
    flex: 0 1 120px;
    min-height: 50px;
}

.visualizer-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================================
   播放进度条
   ============================================================ */
.progress-section {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    flex-shrink: 0;
}

.time-current,
.time-total {
    font-size: 11px;
    color: var(--text-secondary);
    width: 40px;
    text-align: center;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    flex: 1;
    height: 4px;
    position: relative;
    cursor: pointer;
    padding: 6px 0;
    background-clip: content-box;
}

.progress-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    transform: translateY(-50%);
    background: var(--progress-bg);
    border-radius: 2px;
}

.progress-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    transform: translateY(-50%);
    background: var(--primary-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px rgba(236, 65, 65, 0.5);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.progress-bar:hover .progress-thumb,
.progress-bar.dragging .progress-thumb {
    opacity: 1;
}

.progress-bar:hover .progress-fill,
.progress-bar.dragging .progress-fill {
    background: var(--primary-hover);
}

/* ============================================================
   播放控制按钮
   ============================================================ */
.controls-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-shrink: 0;
    padding-bottom: 10px;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.control-btn:hover {
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

/* 播放/暂停按钮 */
.play-btn {
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    box-shadow: 0 4px 16px rgba(236, 65, 65, 0.4);
}

.play-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(236, 65, 65, 0.5);
}

/* 上一曲/下一曲 */
.prev-btn,
.next-btn {
    width: 44px;
    height: 44px;
    color: var(--text-primary);
}

.prev-btn:hover img,
.next-btn:hover img {
    filter: invert(34%) sepia(88%) saturate(2786%) hue-rotate(339deg) brightness(94%) contrast(94%);
}

/* 按钮内图标默认颜色 */
.control-btn img,
.sidebar-close-btn img,
.menu-toggle-btn img,
.home-link img {
    display: block;
}

/* 模式按钮 */
.mode-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.mode-btn img {
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.mode-btn:hover {
    background: rgba(255,255,255,0.05);
}

.mode-btn:hover img {
    opacity: 1;
}

.mode-btn.loop-one img,
.mode-btn.shuffle img {
    opacity: 1;
    filter: invert(34%) sepia(88%) saturate(2786%) hue-rotate(339deg) brightness(94%) contrast(94%);
}

/* 音量按钮 */
.volume-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.volume-btn img {
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.volume-btn:hover {
    background: rgba(255,255,255,0.05);
}

.volume-btn:hover img {
    opacity: 1;
}

.volume-btn.muted img {
    opacity: 1;
    filter: invert(34%) sepia(88%) saturate(2786%) hue-rotate(339deg) brightness(94%) contrast(94%);
}

/* ============================================================
   遮罩层（移动端）
   ============================================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================
   PC端响应式 (宽度 > 768px)
   ============================================================ */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0) !important;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
}

/* ============================================================
   移动端适配 (宽度 <= 768px)
   ============================================================ */
@media (max-width: 768px) {
    .player-container {
        flex-direction: column;
    }

    /* 侧边栏 - 移动端覆盖式弹窗 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 280px;
        min-width: 280px;
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
        border-right: 1px solid var(--border-color);
        z-index: 100;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close-btn {
        display: flex;
    }

    .sidebar-overlay {
        display: block;
    }

    .sidebar-overlay.visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* 主内容 */
    .main-content {
        padding: 16px;
        gap: 14px;
        justify-content: flex-start;
        padding-top: 50px;
    }

    .menu-toggle-btn {
        display: flex;
    }

    .home-link {
        top: 16px;
        right: 16px;
    }

    /* 唱片缩小 */
    .disc-container {
        width: 200px;
        height: 200px;
    }

    .disc-cover-wrapper {
        width: 90px;
        height: 90px;
        border-width: 3px;
        box-shadow: 0 0 0 6px rgba(0,0,0,0.3);
    }

    .tonearm {
        right: -15px;
        top: 15px;
        width: 80px;
        height: 95px;
    }

    .tonearm-arm {
        height: 62px;
        right: 8px;
        top: 10px;
    }

    .tonearm-head {
        top: 60px;
    }

    /* 歌曲标题 */
    .current-song-title {
        font-size: 17px;
    }

    /* 歌词区域 */
    .lyrics-container {
        flex: 1 1 0%;
        min-height: 80px;
    }

    .lyric-line {
        font-size: 13px;
    }

    .lyric-line.active {
        font-size: 15px;
    }

    /* 频谱 */
    .visualizer-container {
        flex: 0 1 80px;
        min-height: 36px;
    }

    /* 进度条 */
    .progress-section {
        max-width: 100%;
    }

    /* 控制按钮 */
    .controls-section {
        gap: 14px;
    }

    .play-btn {
        width: 48px;
        height: 48px;
    }

    .prev-btn,
    .next-btn {
        width: 38px;
        height: 38px;
    }
}

/* ============================================================
   超小屏幕适配 (宽度 <= 380px)
   ============================================================ */
@media (max-width: 380px) {
    .disc-container {
        width: 170px;
        height: 170px;
    }

    .disc-cover-wrapper {
        width: 78px;
        height: 78px;
    }

    .tonearm {
        right: -12px;
        top: 12px;
        width: 65px;
        height: 78px;
    }

    .tonearm-arm {
        height: 50px;
        right: 6px;
        top: 8px;
    }

    .tonearm-head {
        top: 48px;
        width: 10px;
        height: 13px;
    }

    .lyrics-container {
        flex: 1 1 0%;
        min-height: 60px;
    }

    .visualizer-container {
        flex: 0 1 50px;
        min-height: 28px;
    }

    .controls-section {
        gap: 10px;
    }

    .play-btn {
        width: 44px;
        height: 44px;
    }

    .play-btn img {
        width: 30px;
        height: 30px;
    }

    .prev-btn,
    .next-btn {
        width: 34px;
        height: 34px;
    }
}

/* ============================================================
   歌单加载错误提示
   ============================================================ */
.playlist-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
    flex: 1;
}

.playlist-error p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================================
   Toast 提示
   ============================================================ */
.mode-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.mode-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================================
   触屏设备横屏适配
   ============================================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .main-content {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        padding-top: 36px;
    }

    .cover-section {
        padding-top: 0;
        margin-top: 0;
        margin-bottom: 0;
    }

    .disc-container {
        width: 100px;
        height: 100px;
    }

    .disc-cover-wrapper {
        width: 52px;
        height: 52px;
        border-width: 2px;
        box-shadow: 0 0 0 4px rgba(0,0,0,0.3);
    }

    .disc-plate::after {
        width: 10px;
        height: 10px;
        border-width: 2px;
    }

    .tonearm {
        display: none;
    }

    .song-detail {
        margin: 0;
    }

    .current-song-title {
        font-size: 14px;
    }

    .current-song-artist {
        font-size: 11px;
    }

    .lyrics-container {
        flex: 1 1 0%;
        min-height: 36px;
        max-width: 100%;
    }

    .lyric-line {
        font-size: 11px;
    }

    .lyric-line.active {
        font-size: 12px;
    }

    .visualizer-container {
        flex: 0 1 36px;
        min-height: 20px;
        max-width: 100%;
    }

    .progress-section {
        max-width: 100%;
    }

    .controls-section {
        gap: 10px;
        padding-bottom: 4px;
    }

    .play-btn {
        width: 38px;
        height: 38px;
    }

    .play-btn img {
        width: 24px;
        height: 24px;
    }

    .prev-btn, .next-btn {
        width: 32px;
        height: 32px;
    }

    .mode-btn, .volume-btn {
        width: 32px;
        height: 32px;
    }

    .menu-toggle-btn {
        top: 4px;
        left: 8px;
        width: 30px;
        height: 30px;
    }

    .home-link {
        top: 4px;
        right: 8px;
        font-size: 11px;
        padding: 4px 10px;
    }
}
