/* Pronunciation Practice Styles */
.pronunciation-practice-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pronunciation-practice-container h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.practice-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.input-container {
    margin-bottom: 20px;
}

.input-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.input-container input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-container input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.recording-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.format-selector, .duration-control {
    display: flex;
    flex-direction: column;
}

.format-selector label, .duration-control label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.format-selector select, .duration-control select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.recording-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.record-btn, .stop-btn, .test-btn, .ping-btn, .test-audio-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    justify-content: center;
}

.ping-btn {
    background: #3498db;
    color: white;
}

.ping-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.test-btn {
    background: #9b59b6;
    color: white;
}

.test-btn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

.test-audio-btn {
    background: #f39c12;
    color: white;
}

.test-audio-btn:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.record-btn {
    background: #27ae60;
    color: white;
}

.record-btn:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.stop-btn {
    background: #e74c3c;
    color: white;
}

.stop-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

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

.recording-status {
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #e74c3c;
    min-height: 20px;
}

.recording-timer {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    min-height: 30px;
}

/* Audio Level Indicator */
.audio-level-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.audio-level-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: center;
}

.audio-level-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.audio-level-indicator {
    height: 100%;
    width: 0%;
    background: #27ae60;
    border-radius: 10px;
    transition: width 0.1s ease, background-color 0.1s ease;
    min-width: 2px;
}

.preview-section {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f0 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid #27ae60;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.1);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-section h3 {
    color: #27ae60;
    margin-bottom: 15px;
    text-align: center;
}

#audioPreview {
    width: 100%;
    margin-bottom: 20px;
}

.preview-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.process-btn, .rerecord-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.process-btn {
    background: #3498db;
    color: white;
}

.process-btn:hover {
    background: #2980b9;
}

.rerecord-btn {
    background: #95a5a6;
    color: white;
}

.rerecord-btn:hover {
    background: #7f8c8d;
}

.loading-indicator {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.results-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.transcript-display {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

/* Recording animation */
.recording .record-btn {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive design */
@media (max-width: 768px) {
    .pronunciation-practice-container {
        padding: 15px;
    }
    
    .recording-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .recording-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .record-btn, .stop-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .preview-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .process-btn, .rerecord-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Recording info */
.recording-info {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.recording-info p {
    margin: 5px 0;
    color: #2c3e50;
}

.recording-info strong {
    color: #27ae60;
}

/* Error states */
.error {
    color: #e74c3c;
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
}

.success {
    color: #27ae60;
    background: #f0f9f0;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
}

/* Intonation Plots Styling */
.intonation-plots-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.plot-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.plot-card {
    flex: 1;
    min-width: 400px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.plot-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2em;
    text-align: center;
}

.plot-container {
    width: 100%;
    height: 400px;
    margin: 10px 0;
}

/* Enhanced Results Styling */
.enhanced-results-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.performance-metrics {
    margin-bottom: 30px;
}

.metrics-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.metrics-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.3em;
}

.metric-item {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.metric-item:last-child {
    border-bottom: none;
}

.grade-a, .grade-a- {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2em;
}

.grade-b, .grade-b+ {
    color: #f39c12;
    font-weight: bold;
    font-size: 1.2em;
}

.grade-c, .grade-c+ {
    color: #e67e22;
    font-weight: bold;
    font-size: 1.2em;
}

.grade-d, .grade-f {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.2em;
}

.strength-item, .improvement-item {
    margin: 5px 0;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.strength-item {
    background: #d5f4e6;
    color: #27ae60;
}

.improvement-item {
    background: #fdf2e9;
    color: #e67e22;
}

.pronunciation-report {
    margin-bottom: 30px;
}

.report-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #9b59b6;
}

.report-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.3em;
}

.report-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-style: italic;
    color: #34495e;
}

.recommendations, .practice-suggestions {
    margin: 15px 0;
}

.recommendations h4, .practice-suggestions h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.recommendation-item, .suggestion-item {
    margin: 5px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.enhanced-figures-container {
    margin-top: 30px;
}

.enhanced-figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.figure-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.figure-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2em;
    text-align: center;
}

.dashboard-card {
    grid-column: 1 / -1;
    border-left: 4px solid #3498db;
}

.tone-graph-card {
    grid-column: 1 / -1;
    border-left: 4px solid #9b59b6;
}

.comparison-card {
    border-left: 4px solid #e74c3c;
}

.pitch-card {
    border-left: 4px solid #f39c12;
}

.plot-container {
    width: 100%;
    height: 400px;
    margin: 10px 0;
}

.tone-specific-container {
    margin-top: 30px;
}

.tone-specific-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.tone-specific-grid h3 {
    grid-column: 1 / -1;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
}

.tone-figure-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.tone-figure-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1em;
    text-align: center;
}

.tone-plot-container {
    width: 100%;
    height: 300px;
    margin: 5px 0;
}

/* Responsive design for enhanced results */
@media (max-width: 768px) {
    .enhanced-figures-grid {
        grid-template-columns: 1fr;
    }
    
    .tone-specific-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-card, .report-card, .figure-card {
        padding: 15px;
    }
} 