/* =================================================================
   light-mode.css - 浅色模式 (Day Mode) 完整样式表
   版本: Fixed Playlist Controls
   作用: 覆盖默认深色样式，修复移动端歌单控件反色问题
   ================================================================= */

/* ========================================
   1. 全局背景与基础颜色
   ======================================== */
body.light-mode {
    background-image:
        radial-gradient(at 0% 0%, hsla(210, 100%, 94%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(180, 100%, 96%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(300, 100%, 95%, 1) 0, transparent 50%);
    background-color: #f7f9fc;
    color: #333;
}

body.light-mode #app {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(60px);
}

/* ========================================
   2. 侧边栏与用户区域
   ======================================== */
body.light-mode .sidebar {
    background: rgba(255, 255, 255, 0.6);
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}

body.light-mode .user-section {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.04) !important;
}

body.light-mode .icon-btn-sidebar {
    background: #ffffff !important;
    color: #555 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode .icon-btn-sidebar:hover {
    background: #f0fdf5 !important;
    color: #31c27c !important;
    border-color: #31c27c !important;
}

body.light-mode .theme-toggle-btn {
    background: #ffffff;
    color: #555;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

body.light-mode .theme-toggle-btn:hover {
    background: #f5f5f5;
    color: #000;
}

/* 图标切换 */
body.light-mode .icon-moon { display: none; }
body.light-mode .icon-sun { display: block; }

/* 链接文字颜色 */
body.light-mode .nav-title { color: #888; }
body.light-mode .nav-item { color: #555; }
body.light-mode .nav-item:hover { background: rgba(0, 0, 0, 0.03); color: #000; }
body.light-mode .username-text { color: #333 !important; }
body.light-mode .fa-user-circle { color: #888 !important; }
body.light-mode .sidebar-footer a { color: #888; }
body.light-mode .sidebar-footer a:hover { color: #333; }

/* ========================================
   3. 搜索栏与输入框 (完整修复版)
   ======================================== */
/* 通用重置 */
html body.light-mode select,
html body.light-mode input,
html body.light-mode textarea {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e0e0e0 !important;
}

/* 3.1 左侧音源下拉框 */
body.light-mode .source-select {
    background-color: #fff !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    /* 移除默认箭头 */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    /* 自定义黑色箭头 */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 14px !important;
    padding: 0 30px 0 15px !important;
    text-align: center !important;
    text-align-last: center !important;
}

body.light-mode .source-select:hover {
    background-color: #f9f9f9 !important;
    border-color: #bbb !important;
}

/* 下拉选项背景 */
body.light-mode option {
    background-color: #ffffff !important;
    color: #333333 !important;
}

/* 3.2 右侧搜索框容器 */
body.light-mode .search-input-group {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

body.light-mode .search-input-group:hover {
    border-color: #bbb !important;
}

body.light-mode .search-input-group:focus-within {
    border-color: #31c27c !important;
    box-shadow: 0 0 0 2px rgba(49, 194, 124, 0.2) !important;
}

/* 3.3 输入框文字 */
body.light-mode .search-input-group input,
body.light-mode .search-input {
    color: #333 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
body.light-mode .search-input::placeholder { color: #999 !important; }

/* 3.4 搜索按钮 */
body.light-mode .search-btn { color: #888 !important; }
body.light-mode .search-btn:hover { color: #31c27c !important; background-color: rgba(0,0,0,0.03); }


/* ========================================
   4. [新增修复] 移动端歌单控件 (我的歌单下拉条)
   解决黑色背景问题
   ======================================== */
body.light-mode #mobile-playlist-controls {
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* 歌单选择下拉框 */
body.light-mode #mobile-playlist-select {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #d9d9d9 !important;
}

/* 按钮组 */
body.light-mode .mobile-btn-group button {
    background-color: #ffffff !important;
    border: 1px solid #d9d9d9 !important;
    color: #666666 !important;
}

body.light-mode .mobile-btn-group button:hover {
    background-color: #f5f5f5 !important;
    color: #333333 !important;
}

/* 红色删除按钮特殊处理 */
body.light-mode .mobile-btn-group button.btn-delete {
    color: #ff4d4f !important;
    border-color: rgba(255, 77, 79, 0.3) !important;
}
body.light-mode .mobile-btn-group button.btn-delete:hover {
    background-color: #fff1f0 !important;
}


/* ========================================
   5. 榜单与分类按钮
   ======================================== */
body.light-mode #chart-tags-container .nav-item {
    background-color: #ffffff;
    color: #555;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

body.light-mode #chart-tags-container .nav-item:hover {
    background-color: #f9f9f9;
    color: #000 !important;
    border-color: #ccc;
}

body.light-mode #chart-tags-container .nav-item.active {
    background: linear-gradient(135deg, #31c27c, #25a062);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(49, 194, 124, 0.3);
}

body.light-mode .tab-item:hover { color: #31c27c !important; }


/* ========================================
   6. 歌曲列表 (Song List)
   ======================================== */
body.light-mode .song-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .song-item:hover {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-mode .col-name { color: #333; }
body.light-mode .col-artist,
body.light-mode .col-album,
body.light-mode .col-index { color: #777; }

body.light-mode .icon-btn {
    background-color: #ffffff !important;
    color: #555 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

body.light-mode .icon-btn:hover {
    background-color: #f9f9f9 !important;
    color: #333 !important;
}

/* PC端"我的歌单"侧边栏适配 */
body.light-mode #my-playlist-songs .song-name { color: #333 !important; }
body.light-mode #my-playlist-songs .song-artist { color: #666 !important; }
body.light-mode #my-playlist-songs .song-index { color: #555 !important; }
body.light-mode #my-playlist-songs .playlist-song-item:hover { background-color: rgba(0, 0, 0, 0.05) !important; }
body.light-mode #my-playlist-songs .playlist-song-item.playing {
    background-color: rgba(49, 194, 124, 0.15) !important;
    border: 1px solid rgba(49, 194, 124, 0.3) !important;
}
body.light-mode #my-playlist-songs .playlist-song-item.playing .song-name { color: #31c27c !important; }


/* ========================================
   7. 底部播放器控制条
   ======================================== */
body.light-mode .player-bar {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
}

body.light-mode .player-song-name { color: #333; }
body.light-mode .player-artist-name { color: #777; }
body.light-mode .time { color: #555; }

body.light-mode .control-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #555 !important;
}
body.light-mode .control-btn:hover {
    background: transparent !important;
    color: #31c27c !important;
}

body.light-mode .btn-play {
    background: #ffffff !important;
    color: #31c27c !important;
    border: 1px solid rgba(49, 194, 124, 0.2) !important;
    box-shadow: 0 5px 15px rgba(49, 194, 124, 0.25) !important;
}
body.light-mode .btn-play:hover { background: #f0fdf5 !important; }

body.light-mode .quality-select {
    background-color: #ffffff;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
body.light-mode .quality-select option { background-color: #ffffff; color: #333333; }
body.light-mode .progress-wrapper { background: rgba(0, 0, 0, 0.1) !important; }


/* ========================================
   8. 弹窗与通用样式
   ======================================== */
body.light-mode .modal-box {
    background: #ffffff;
    border: 1px solid #eee;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}
body.light-mode .modal-header {
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    color: #333;
}
body.light-mode .modal-header i { color: #888; }
body.light-mode .modal-header i:hover { color: #333; }

body.light-mode .form-input,
body.light-mode .form-textarea {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #333;
}

body.light-mode #msg-content,
body.light-mode #confirm-content,
body.light-mode label { color: #666 !important; }

body.light-mode .lyric-overlay { background: rgba(248, 250, 252, 0.96); }
body.light-mode .lyric-song-name { color: #333; text-shadow: none; }
body.light-mode .lyric-artist-name { color: #666; }
body.light-mode .lrc-line { color: #aaa; text-shadow: none; }
body.light-mode .lrc-line.active {
    color: #31c27c;
    text-shadow: 0 0 15px rgba(49, 194, 124, 0.4);
    font-weight: 800;
}
body.light-mode .lyric-close-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-mode img[src*="dummyimage"] {
    filter: invert(1) hue-rotate(180deg);
    border: 1px solid #ddd;
}


/* ========================================
   9. 移动端特定适配 (Mobile Overrides)
   ======================================== */
@media (max-width: 768px) {
    body.light-mode .sidebar {
        background: #fff;
        border-bottom: 1px solid #f0f0f0;
    }
    body.light-mode .user-section {
        background: transparent !important;
        border: none !important;
    }

    body.light-mode .player-right .control-btn[onclick="toggleLyricPage()"] {
        background: rgba(255, 255, 255, 0.98) !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        color: #333 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    }
    body.light-mode .player-right .btn-download {
        background: rgba(0, 0, 0, 0.03) !important;
        color: #555 !important;
    }
    
    /* 移动端下拉框箭头适配 */
    body.light-mode .source-select {
        /* 移动端音源选择去掉背景箭头，仅居中文字 */
        background-image: none !important; 
        padding: 0 !important;
    }
}
