/* --- 全局与基础样式 --- */
:root {
    --primary-color: #8e44ad;
    --secondary-color: #3498db;
    --text-color: #ecf0f1;
    --bg-color: #121212;
    --blur-bg-color: rgba(44, 44, 44, 0.65);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: 'Noto Sans', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow-x: hidden;
}

/* --- 主屏与按钮 --- */
.hero-container { 
    text-align: center; 
    animation: fadeIn 1.5s ease-in-out;
    padding: 20px;
    width: 100%;
    max-width: 800px;
}

.main-title { 
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700; 
    margin-bottom: 0.5rem; 
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); 
    -webkit-background-clip: text; 
    background-clip: text; 
    color: transparent; 
}

.subtitle { 
    font-size: clamp(0.9rem, 3vw, 1.2rem); 
    font-weight: 300; 
    color: rgba(236, 240, 241, 0.8); 
    margin-bottom: 2.5rem; 
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.button-group { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    flex-wrap: wrap;
}

.btn { 
    padding: 12px 24px; 
    border: none; 
    border-radius: 50px; 
    font-size: 1rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    text-decoration: none;
    min-width: 160px;
}

.btn-primary { 
    background-color: var(--primary-color); 
    color: white; 
}

.btn-primary:hover { 
    background-color: #9b59b6; 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(142, 68, 173, 0.3); 
}

.btn-secondary { 
    background-color: transparent; 
    color: var(--text-color); 
    border: 2px solid var(--text-color); 
}

.btn-secondary:hover { 
    background-color: var(--text-color); 
    color: var(--bg-color); 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(236, 240, 241, 0.2); 
}

/* --- 语言选择器 --- */
.language-switcher { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    z-index: 1001; 
}

#language-selector { 
    background-color: rgba(255, 255, 255, 0.1); 
    color: var(--text-color); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 8px; 
    padding: 8px 12px; 
    font-size: 0.9rem; 
    cursor: pointer; 
    appearance: none; 
    -webkit-appearance: none; 
    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='%23ecf0f1' 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"); 
    background-repeat: no-repeat; 
    background-position: right 12px center; 
    background-size: 1em; 
    padding-right: 3em; 
}

#language-selector:focus { 
    outline: none; 
    border-color: var(--primary-color); 
}

#language-selector option { 
    background-color: #2c2c2c; 
    color: var(--text-color); 
}

/* --- 浮动音乐播放器样式 --- */
.music-player {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: 90%;
    max-width: 420px;
    padding: 15px;
    border-radius: 12px;
    background-color: var(--blur-bg-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1000;
}

.music-player.visible { 
    transform: translateX(-50%) translateY(0); 
}

.song-info { 
    text-align: center;
}

.song-title { 
    font-weight: 700; 
    font-size: 1.1rem; 
    margin-bottom: 2px;
}

.song-artist { 
    font-size: 0.8rem; 
    color: rgba(236, 240, 241, 0.7); 
}

/* 歌词容器 */
.lyrics-container {
    height: 24px;
    overflow: hidden;
    text-align: center;
    margin: 8px 0;
}

#lyrics-line {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#lyrics-line.active { 
    color: var(--primary-color); 
    font-weight: 600;
}

/* 播放器控制按钮 */
.controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin-top: 5px;
}

.control-btn { 
    background: none; 
    border: none; 
    color: var(--text-color); 
    cursor: pointer; 
    padding: 8px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    opacity: 0.8; 
    transition: opacity 0.2s; 
    width: 40px;
    height: 40px;
}

.control-btn:hover { 
    opacity: 1; 
}

.control-btn svg { 
    width: 24px; 
    height: 24px; 
}

#play-pause-control svg { 
    width: 32px; 
    height: 32px; 
}

/* --- 播放列表面板 --- */
.panel-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.5); 
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.3s, visibility 0.3s; 
    z-index: 1002; 
}

.panel-overlay.visible { 
    opacity: 1; 
    visibility: visible; 
}

.playlist-panel { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    max-height: 60vh; 
    background-color: #1e1e1e; 
    border-top-left-radius: 20px; 
    border-top-right-radius: 20px; 
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.4); 
    transform: translateY(100%); 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    z-index: 1003; 
    display: flex; 
    flex-direction: column; 
}

.playlist-panel.visible { 
    transform: translateY(0); 
}

.playlist-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 20px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
}

.playlist-header h3 { 
    margin: 0; 
    font-size: 1.2rem; 
}

#close-playlist-btn { 
    background: none; 
    border: none; 
    color: #fff; 
    font-size: 1.8rem; 
    line-height: 1; 
    cursor: pointer; 
    opacity: 0.7; 
    padding: 5px;
}

#playlist-list { 
    list-style: none; 
    margin: 0; 
    padding: 10px 0; 
    overflow-y: auto; 
    max-height: calc(60vh - 60px);
}

#playlist-list li { 
    padding: 12px 20px; 
    display: flex; 
    flex-direction: column; 
    cursor: pointer; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
}

#playlist-list li:hover { 
    background-color: rgba(255, 255, 255, 0.05); 
}

#playlist-list li.playing { 
    color: var(--primary-color); 
}

#playlist-list .pli-title { 
    font-weight: 600; 
}

#playlist-list .pli-artist { 
    font-size: 0.8rem; 
    opacity: 0.7; 
}

/* --- 动画 --- */
@keyframes fadeIn { 
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

/* 移动端适配 */
@media (max-width: 600px) { 
    .button-group { 
        flex-direction: column; 
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 240px;
    }
    
    .music-player {
        width: 95%;
    }
}