* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
    color: #333;
    padding-bottom: 100px; /* 为底部播放栏留出空间 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* 标题栏 */
.header {
    text-align: center;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 24px;
    color: #667eea;
    font-weight: bold;
}

/* 歌词显示区域 */
.lyrics-section {
    margin-bottom: 15px;
}

.lyrics-container {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    min-height: 120px;
    max-height: 180px;
    overflow-y: auto;
    text-align: center;
}

.lyrics-text {
    font-size: 18px;
    line-height: 2;
    color: #666;
}

.lyrics-text .current-line {
    color: #667eea;
    font-size: 22px;
    font-weight: bold;
}

.lyrics-text .past-line {
    color: #999;
}

/* 播放进度区域 */
.progress-section {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.current-time {
    font-weight: bold;
    color: #667eea;
    font-size: 18px;
}

.time-separator {
    color: #999;
}

.total-time {
    color: #666;
}

.waveform-container {
    width: 100%;
    height: 80px;
    background: #e0e0e0;
    border-radius: 5px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* 播放列表区域 */
.playlist-section {
    margin-bottom: 15px;
}

.playlist-section h3 {
    font-size: 16px;
    color: #667eea;
    margin-bottom: 10px;
}

.playlist-container {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.playlist-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.playlist-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.playlist-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid transparent;
}

.playlist-item:hover {
    background: #e8e8ff;
    transform: translateX(5px);
}

.playlist-item.active {
    background: #667eea;
    color: white;
    border-color: #764ba2;
    font-weight: bold;
}

.playlist-item-name {
    flex: 1;
    font-size: 15px;
}

.playlist-item-status {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

.playlist-item.active .playlist-item-status {
    color: rgba(255, 255, 255, 0.8);
}

/* 文件选择区域 */
.file-section {
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.file-item label {
    width: 100px;
    font-weight: bold;
    color: #333;
}

.file-name {
    flex: 1;
    color: #666;
    margin: 0 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-select {
    padding: 8px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-select:hover {
    background: #5568d3;
}

/* 播放模式区域 */
.mode-section {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
}

.mode-section h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.mode-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.mode-btn.mode1 {
    background: #4CAF50;
}

.mode-btn.mode2 {
    background: #2196F3;
}

.mode-btn.mode3 {
    background: #FF9800;
}

.mode-btn.mode4 {
    background: #9C27B0;
}

.mode-btn.mode0 {
    background: #E91E63;
}

.mode-btn.active {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5);
}

.btn-stop {
    width: 100%;
    padding: 15px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-stop:hover {
    background: #d32f2f;
}

/* 设置区域 */
.settings-section {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
}

.settings-section h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.threshold-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.threshold-control label {
    font-weight: bold;
    color: #333;
}

.threshold-control input[type="range"] {
    flex: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
}

.threshold-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.threshold-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#thresholdValue {
    font-weight: bold;
    color: #667eea;
    min-width: 40px;
}

/* 播放控制栏 */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.play-pause-btn {
    font-size: 28px;
}

.player-center {
    flex: 1;
    margin: 0 30px;
}

.song-info {
    margin-bottom: 10px;
}

.song-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.song-artist {
    font-size: 14px;
    color: #aaa;
}

.progress-bar-container {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #555;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress-filled {
    height: 100%;
    background: #667eea;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: none;
}

.progress-bar:hover .progress-handle {
    display: block;
}

.player-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider-container {
    width: 100px;
}

.volume-slider {
    width: 100%;
    height: 4px;
    background: #555;
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 状态显示 */
.status-section {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.status-text {
    font-size: 13px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 5px;
        padding-bottom: 120px;
    }

    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 20px;
    }

    .lyrics-container {
        min-height: 100px;
        max-height: 150px;
        padding: 10px;
    }

    .lyrics-text {
        font-size: 14px;
    }

    .mode-buttons {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .mode-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .player-bar {
        flex-direction: column;
        padding: 8px;
    }

    .player-center {
        margin: 8px 0;
        width: 100%;
    }

    .file-item {
        flex-wrap: wrap;
        gap: 5px;
    }

    .file-item label {
        width: auto;
        min-width: 80px;
    }
}

