/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 播放器容器 */
.music-player {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    backdrop-filter: blur(10px);
}

/* 路径输入容器 */
.path-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 0 10px;
}

.music-path-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.music-path-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.load-path-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.load-path-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.refresh-btn {
    padding: 12px 15px;
    background: #667eea;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

/* 播放器标题 */
.player-header {
    text-align: center;
    margin-bottom: 30px;
}

.player-header h1 {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 600;
}

/* 当前播放信息 */
.current-track {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
}

.track-info h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-info p {
    color: #666;
    font-size: 1rem;
}

/* 进度条 */
.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.progress-container span {
    font-size: 0.9rem;
    color: #666;
    min-width: 45px;
    text-align: center;
}

.sync-btn {
    padding: 4px 8px;
    background: #667eea;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.sync-btn:hover {
    background: #5a6fd8;
    transform: scale(1.1);
}

.sync-btn:active {
    transform: scale(0.95);
}

.progress-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #5a6fd8;
}

.progress-bar::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.progress-bar::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: #5a6fd8;
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.control-btn {
    background: #667eea;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: #5a6fd8;
    transform: scale(1.1);
}

.play-btn {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
    background: red;
}

.play-btn:hover {
    transform: scale(1.15);
    background: darkred;
}

/* 音量控制 */
.volume-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.volume-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.volume-btn:hover {
    color: #667eea;
}

.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #5a6fd8;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: #5a6fd8;
}

/* 歌词面板 */
.lyrics-panel-container {
    margin-top: 20px;
}

.lyrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.lyrics-header h3 {
    text-align: center;
    color: #333;
    font-size: 1.2rem;
    margin: 0;
}

.lyrics-controls {
    display: flex;
    gap: 8px;
}

.toggle-lyrics-btn {
    padding: 8px 12px;
    background: #667eea;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-lyrics-btn:hover {
    background: #5a6fd8;
    transform: scale(1.1);
}

.lyrics-container {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.lyrics-container.hidden {
    max-height: 0;
    padding: 0 15px;
    overflow: hidden;
}

/* 歌词全屏样式 */
.lyrics-container.maximize {
    max-height: none;
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 0;
    padding: 100px 20px 40px;
    z-index: 9999;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 歌词头部样式 */
.lyrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.lyrics-header h3 {
    text-align: center;
    color: #333;
    font-size: 1.2rem;
    margin: 0;
}

/* 全屏模式下的歌词面板容器 */
#lyrics-panel-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.95);
}

/* 全屏模式下的歌词头部 */
#lyrics-panel-container.fullscreen .lyrics-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 全屏模式下的控制按钮 */
#lyrics-panel-container.fullscreen .lyrics-controls {
    position: absolute;
    right: 20px;
}

/* 全屏模式下的标题 */
#lyrics-panel-container.fullscreen .lyrics-header h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

/* 全屏模式控制按钮 */
.fullscreen-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002;
}

.exit-fullscreen-btn {
    padding: 15px 20px;
    background: rgba(255, 107, 107, 0.95);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.7);
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.exit-fullscreen-btn:hover {
    background: rgba(255, 107, 107, 1);
    transform: scale(1.15);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.9);
}

/* 隐藏类 */
.hidden {
    display: none;
}

.lyrics-container.maximize::before {
    content: '';
    flex: 1;
    min-height: 100px;
}

.lyrics-container.maximize .lyrics-list {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 300px;
    padding: 20px 0;
}

.lyrics-container.maximize::after {
    content: '';
    flex: 1;
    min-height: 100px;
}

.lyrics-container.maximize .lyrics-list li {
    font-size: 1.5rem;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.6);
    margin: 8px 0;
    opacity: 0.7;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    line-height: 1.6;
}

.lyrics-container.maximize .lyrics-list li.current {
    font-size: 2.2rem;
    padding: 30px 40px;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.9);
    opacity: 1;
    transform: scale(1.1);
    font-weight: bold;
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    margin: 20px 0;
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0% { box-shadow: 0 12px 40px rgba(255, 107, 107, 0.9); }
    50% { box-shadow: 0 16px 50px rgba(255, 107, 107, 1); }
    100% { box-shadow: 0 12px 40px rgba(255, 107, 107, 0.9); }
}

.lyrics-list {
    list-style: none;
    text-align: center;
}

.lyrics-list li {
    padding: 8px 0;
    margin: 4px 0;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #555;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.lyrics-list li.current {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    font-weight: bold;
    padding: 10px 15px;
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.4);
}

.lyrics-list li.no-lyrics {
    color: #999;
    font-style: italic;
    cursor: default;
}

.lyrics-container::-webkit-scrollbar {
    width: 6px;
}

.lyrics-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.lyrics-container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.lyrics-container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* 播放列表 */
.playlist-container {
    margin-top: 20px;
}

.playlist-container h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
}

.playlist {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    padding: 10px;
}

.playlist li {
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist li:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #333;
}

.playlist li.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
}

.playlist li.loading {
    text-align: center;
    color: #999;
    cursor: default;
}

.playlist li.loading:hover {
    background: none;
    color: #999;
}

/* 滚动条样式 */
.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .music-player {
        padding: 20px;
        margin: 10px;
    }
    
    .path-input-container {
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }
    
    .music-path-input {
        width: 100%;
    }
    
    .load-path-btn {
        width: 100%;
    }
    
    .refresh-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        padding: 0;
    }

    .player-header h1 {
        font-size: 1.5rem;
    }

    .track-info h2 {
        font-size: 1.3rem;
    }

    .track-info p {
        font-size: 0.9rem;
    }

    .progress-container {
        gap: 10px;
    }

    .progress-container span {
        font-size: 0.8rem;
        min-width: 40px;
    }

    .controls {
        gap: 15px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .play-btn {
        width: 65px;
        height: 65px;
        font-size: 1.4rem;
    }

    .volume-container {
        padding: 0 10px;
    }

    .playlist {
        max-height: 150px;
    }
}

@media (max-width: 360px) {
    .music-player {
        padding: 15px;
    }

    .player-header h1 {
        font-size: 1.3rem;
    }

    .track-info h2 {
        font-size: 1.1rem;
    }

    .controls {
        gap: 10px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .play-btn {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }
}