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

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

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.language-selector {
    position: absolute;
    top: 0;
    right: 0;
}

#languageSelect {
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

#languageSelect option {
    background: #2a5298;
}

main {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.play-btn {
    background: #4CAF50;
}

.play-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.play-btn.playing {
    background: #45a049;
    animation: pulse 1s infinite;
}

.stop-btn {
    background: #f44336;
}

.stop-btn:hover {
    background: #da190b;
    transform: translateY(-2px);
}

.clear-btn {
    background: #ff9800;
}

.clear-btn:hover {
    background: #e68900;
    transform: translateY(-2px);
}

.tempo-control {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tempo-control label {
    font-weight: 500;
}

#tempoSlider {
    width: 200px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

#tempoSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
}

#tempoSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    border: none;
}

#tempoValue {
    font-weight: bold;
    color: #2196F3;
}

.tracks-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.track {
    background: #f5f5f5;
    border-radius: 15px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.track:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.track h3 {
    margin-bottom: 10px;
    color: #333;
}

.track-status {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    height: 20px;
}

.track-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.track-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #e0e0e0;
    color: #333;
}

.track-btn:hover {
    transform: translateY(-2px);
}

.record-btn.recording {
    background: #f44336;
    color: white;
    animation: blink 1s infinite;
}

.play-btn.playing {
    background: #4CAF50;
    color: white;
}

.track-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.volume-label {
    font-size: 14px;
    color: #666;
}

.volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    border: none;
}

.volume-value {
    font-size: 14px;
    color: #666;
    min-width: 40px;
}

.waveform {
    width: 100%;
    height: 60px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.waveform canvas {
    width: 100%;
    height: 100%;
}

.add-track-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    border: 2px dashed #ddd;
    background: transparent;
    border-radius: 15px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.add-track-btn:hover {
    border-color: #2196F3;
    color: #2196F3;
    background: rgba(33, 150, 243, 0.05);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 15px;
}

.volume-control label {
    font-weight: 500;
}

#masterVolume {
    width: 200px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

#masterVolume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
}

#masterVolume::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    border: none;
}

#volumeValue {
    font-weight: bold;
    color: #2196F3;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.8;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .controls {
        justify-content: center;
    }
    
    .tempo-control,
    .volume-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    #tempoSlider,
    #masterVolume {
        width: 100%;
    }
    
    .tracks-container {
        grid-template-columns: 1fr;
    }
}