/* 合唱练习系统 - 样式表 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 曲目选择界面 */
.song-selector {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.song-selector h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.song-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.song-card.selected {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
}

.song-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.song-title {
    flex: 1;
}

.song-card h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.song-card .subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.difficulty-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.difficulty-badge.beginner {
    background: #4CAF50;
    color: white;
}

.difficulty-badge.intermediate {
    background: #FF9800;
    color: white;
}

.difficulty-badge.advanced {
    background: #F44336;
    color: white;
}

.song-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.song-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

.song-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
}

/* 练习界面 */
.practice-interface {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.song-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.song-title h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.song-title p {
    color: #666;
    font-size: 1rem;
}

.song-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.song-meta span {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.song-meta .difficulty {
    background: #e3f2fd;
    color: #1976d2;
}

.song-meta .composer {
    background: #f3e5f5;
    color: #7b1fa2;
}

.song-meta .duration {
    background: #e8f5e8;
    color: #388e3c;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* 乐谱容器 */
.score-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.staff {
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 10px;
    background: #fafafa;
    padding: 20px;
}

#staffCanvas {
    display: block;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 4px;
}

/* 节拍器面板 */
.metronome-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
}

.metronome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.metronome-header:hover {
    background-color: #f8f9fa;
}

.metronome-header h3 {
    color: #333;
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metronome-toggle {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.metronome-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.metronome-toggle.running {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

.metronome-toggle.running:hover {
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.toggle-icon {
    font-size: 1rem;
}

.toggle-text {
    font-weight: 500;
}

.metronome-controls {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.bpm-control, .volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bpm-slider, .volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.bpm-slider::-webkit-slider-thumb, .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.bpm-slider::-webkit-slider-thumb:hover, .volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.4);
}

.bpm-slider::-moz-range-thumb, .volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.bpm-value, .volume-value {
    background: #f8f9fa;
    color: #333;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.accent-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accent-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.metronome-display {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.beat-indicator {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.beat-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.beat-dot.active {
    background: #667eea;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
}

.beat-dot.accent {
    background: #FF6B6B;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

.current-beat {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* 控制按钮 */
.controls {
    text-align: center;
    margin-bottom: 30px;
}

.play-btn {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.play-btn:active {
    transform: translateY(-1px);
}

.play-icon {
    font-size: 1.5rem;
}

/* 倒计时 */
.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 4rem;
    font-weight: bold;
    color: #FF6B6B;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 录音状态 */
.recording-status {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #FF6B6B;
    font-weight: bold;
}

.pulse {
    width: 12px;
    height: 12px;
    background: #FF6B6B;
    border-radius: 50%;
    animation: pulse-dot 1s infinite;
}

@keyframes pulse-dot {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* 音高可视化样式 */
.pitch-visualization {
    margin-top: 20px;
}

.pitch-display {
    display: flex;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.pitch-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.pitch-info .label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.pitch-value, .accuracy-value {
    font-size: 1.2rem;
    font-weight: bold;
}

#currentPitch {
    color: #FF6B6B;
}

#targetPitch {
    color: #4CAF50;
}

#accuracy {
    color: #2196F3;
}

/* 音高指示器 */
.pitch-indicator-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pitch-scale {
    position: relative;
    height: 200px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.pitch-lines {
    position: relative;
    height: 100%;
}

.pitch-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #6c757d;
    opacity: 0.3;
}

.pitch-line[data-note="C6"] { top: 5%; }
.pitch-line[data-note="B5"] { top: 15%; }
.pitch-line[data-note="A5"] { top: 25%; }
.pitch-line[data-note="G5"] { top: 35%; }
.pitch-line[data-note="F5"] { top: 45%; }
.pitch-line[data-note="E5"] { top: 55%; }
.pitch-line[data-note="D5"] { top: 65%; }
.pitch-line[data-note="C5"] { top: 75%; }
.pitch-line[data-note="B4"] { top: 85%; }
.pitch-line[data-note="A4"] { top: 95%; }

.pitch-line::after {
    content: attr(data-note);
    position: absolute;
    right: 10px;
    top: -10px;
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: bold;
}

/* 音高指示器 */
.current-pitch-indicator, .target-pitch-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 2px;
    transition: top 0.1s ease;
}

.current-pitch-indicator {
    background: #FF6B6B;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    z-index: 2;
}

.target-pitch-indicator {
    background: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    z-index: 1;
    opacity: 0.7;
}

/* 波形显示 */
.waveform-container {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#waveformCanvas {
    width: 100%;
    height: 100px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: #f8f9fa;
}

/* 结果页面 */
.results {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.results h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 2rem;
}

.score-display {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.score-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.score-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.score-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

.chart-container {
    margin: 30px 0;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    height: 400px;
    position: relative;
}

#comparisonChart {
    width: 100% !important;
    height: 100% !important;
}

.retry-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

/* 录音控制样式 */
.recording-controls {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.recording-controls h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3rem;
}

.audio-player {
    margin-bottom: 15px;
}

.recording-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn, .play-recording-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover, .play-recording-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.play-recording-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.play-recording-btn:hover {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* 录音播放器 */
.recording-player {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.recording-player h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3rem;
}

.recording-player audio {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 结果页面按钮组 */
.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.play-result-btn, .download-result-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-result-btn:hover, .download-result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.4);
}

.play-result-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.play-result-btn:hover {
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}
/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .score-container {
        padding: 20px;
    }
    
    #staffCanvas {
        width: 100%;
        height: auto;
    }
    
    .score-display {
        flex-direction: column;
        align-items: center;
    }
    
    .score-item {
        width: 100%;
        max-width: 200px;
    }
    
    .play-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .countdown {
        font-size: 3rem;
        height: 150px;
    }
    
    .metronome-panel {
        padding: 15px;
    }
    
    .metronome-header h3 {
        font-size: 1.1rem;
    }
    
    .metronome-toggle {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .beat-indicator {
        gap: 10px;
    }
    
    .beat-dot {
        width: 16px;
        height: 16px;
    }
    
    .current-beat {
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .score-container {
        padding: 15px;
    }
    
    .staff {
        padding: 15px;
    }
    
    .countdown {
        font-size: 2.5rem;
        height: 120px;
    }
    
    .pitch-display {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .pitch-info {
        min-width: 100px;
    }
    
    .pitch-indicator-container {
        padding: 15px;
    }
    
    .pitch-scale {
        height: 150px;
    }
    
    .waveform-container {
        padding: 10px;
    }
    
    #waveformCanvas {
        height: 80px;
    }
    
    .recording-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn, .play-recording-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .play-result-btn, .download-result-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .recording-player {
        padding: 15px;
    }
    
    .recording-player h3 {
        font-size: 1.1rem;
    }
    
    .metronome-panel {
        padding: 12px;
    }
    
    .metronome-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .metronome-header h3 {
        font-size: 1rem;
    }
    
    .metronome-toggle {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .control-group {
        margin-bottom: 15px;
    }
    
    .bpm-control, .volume-control {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .bpm-value, .volume-value {
        text-align: center;
        min-width: auto;
    }
    
    .beat-indicator {
        gap: 8px;
    }
    
    .beat-dot {
        width: 14px;
        height: 14px;
    }
    
    .current-beat {
        font-size: 1.3rem;
        width: 45px;
        height: 45px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ===========================
   🎵 节拍器布局修正版
   =========================== */

/* 外层容器 */
.metronome-panel {
    background: linear-gradient(135deg, #6a5acd, #836fff);
    border-radius: 20px;
    color: #fff;
    padding: 20px;
    margin: 30px auto;
    max-width: 420px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 顶部标题 + 开关按钮水平排列 */
.metronome-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 节拍器标题 */
.metronome-header h3 {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    gap: 6px;
    margin: 0;
}

/* 开关按钮 */
.metronome-toggle {
    background-color: #fff;
    color: #4a4a4a;
    border: none;
    border-radius: 10px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease-in-out;
}
.metronome-toggle:hover {
    background-color: #f1f1f1;
    transform: scale(1.05);
}

/* 控制区背景 */
.metronome-controls {
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 12px 16px;
}

/* 子控制项间距 */
.metronome-controls .control-group {
    margin-bottom: 10px;
}

/* 标签 */
.metronome-controls label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* 滑条样式 */
.bpm-slider,
.volume-slider {
    width: 100%;
    cursor: pointer;
}

/* 重音选择框 */
.accent-select {
    width: 100%;
    border-radius: 6px;
    padding: 4px 6px;
    border: none;
}

/* 节拍指示灯 */
.beat-indicator {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.beat-dot {
    width: 14px;
    height: 14px;
    background-color: #ccc;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.beat-dot.active {
    background-color: #ffeb3b;
}

/* 当前节拍数字 */
.current-beat {
    text-align: center;
    margin-top: 6px;
    font-size: 1.1rem;
    font-weight: 500;
}
