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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏样式 */
.nav-menu {
    background-color: #71BB39;
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(113, 187, 57, 0.2);
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 16px;
}

.nav-item:hover {
    background-color: #f0f9f0;
    color: #71BB39;
    transform: translateY(-2px);
}

.nav-item.active {
    background-color: #5a9c2a;
    color: white;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #71BB39 0%, #5a9c2a 100%);
    color: white;
    text-align: center;
    padding: 40px 30px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(113, 187, 57, 0.3);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 区块样式 */
.section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8f5e8;
}

.section h2 {
    color: #71BB39;
    font-size: 1.8em;
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h3 {
    color: #71BB39;
    font-size: 1.4em;
    margin-bottom: 20px;
    font-weight: 600;
}

/* 背景音乐控制区域 */
.music-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.music-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.music-selector label {
    font-weight: 600;
    color: #555;
    font-size: 16px;
}

.music-selector select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.music-selector select:focus {
    outline: none;
    border-color: #71BB39;
    box-shadow: 0 0 0 3px rgba(113, 187, 57, 0.1);
}

.music-player {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 控制按钮样式 */
.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #71BB39;
    color: white;
    box-shadow: 0 4px 15px rgba(113, 187, 57, 0.3);
}

.control-btn:hover:not(:disabled) {
    background: #5a9c2a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(113, 187, 57, 0.4);
}

.control-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.control-btn .btn-icon {
    font-size: 18px;
}

/* 进度条样式 */
.progress-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #71BB39, #5a9c2a);
    width: 0%;
    transition: width 0.1s ease;
}

/* 背景音乐进度条样式 */
.bg-music-progress {
    margin: 20px 0;
}

.bg-music-progress .progress-container {
    background: rgba(255, 255, 255, 0.3);
    height: 10px;
}

.bg-music-progress .progress-bar {
    background: linear-gradient(90deg, #ffffff, #f0f0f0);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 乐器演奏区域 */
.instruments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.instrument-item {
    display: flex;
    justify-content: center;
}

.instrument-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
    border: 3px solid #71BB39;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    font-weight: 600;
    color: #71BB39;
    min-width: 150px;
    min-height: 150px;
    justify-content: center;
}

.instrument-btn:hover {
    background: #f0f9f0;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(113, 187, 57, 0.3);
}

.instrument-btn:active {
    transform: translateY(-1px) scale(0.98);
    background: #71BB39;
    color: white;
}

.instrument-icon {
    font-size: 48px;
    line-height: 1;
}

.instrument-name {
    font-size: 18px;
    font-weight: 600;
}

/* 录音控制区域 */
.recording-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 录音控制样式 */
.recording-section {
    background: linear-gradient(135deg, #71BB39, #5a9c2a);
    color: white;
}

/* 音乐信息样式 */
.music-info {
    margin-bottom: 20px;
}

.music-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

/* 控制按钮区域 */
.control-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.recording-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6c757d;
    transition: all 0.3s ease;
}

.recording-indicator.recording {
    background: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-text {
    font-weight: 600;
    font-size: 16px;
    color: #495057;
}

.recording-time {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #71BB39;
    margin-left: auto;
}

.recording-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.record-btn {
    background: #dc3545;
}

.record-btn:hover:not(:disabled) {
    background: #c82333;
}

.delete-work-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.delete-work-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
}

/* 作品回放区域 */
.playback-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.work-info {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.work-title {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.work-time {
    font-size: 14px;
    color: #6c757d;
}

.playback-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.work-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 操作提示区域 */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    padding: 15px 20px;
    background: #f0f9f0;
    border-left: 4px solid #71BB39;
    border-radius: 8px;
    font-size: 16px;
    color: #495057;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .section {
        padding: 20px;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .music-controls {
        gap: 20px;
    }
    
    .player-controls {
        justify-content: center;
    }
    
    .instruments-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .instrument-btn {
        min-width: 120px;
        min-height: 120px;
        padding: 20px;
    }
    
    .instrument-icon {
        font-size: 36px;
    }
    
    .recording-buttons,
    .playback-buttons {
        justify-content: center;
    }
    
    .control-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .section h2 {
        font-size: 1.5em;
    }
    
    .instrument-btn {
        min-width: 100px;
        min-height: 100px;
        padding: 15px;
    }
    
    .instrument-icon {
        font-size: 32px;
    }
    
    .instrument-name {
        font-size: 16px;
    }
}