/**
 * Shadowing Mode Styles
 */

.shadowing-page {
    min-height: calc(100vh - 80px);
    background: var(--color-background);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.shadowing-container {
    width: 100%;
    max-width: 800px;
}

/* Practice Card */
.shadow-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.shadow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.shadow-progress {
    font-weight: 700;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.shadow-score-badge {
    background: var(--color-primary);
    color: white;
    padding: 6px 14px;
    border-radius: 99px;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    white-space: nowrap;
}

/* Sentence Display */
.sentence-display {
    text-align: center;
    margin-bottom: 48px;
}

.shadow-word {
    font-size: 2.5rem;
    color: var(--color-primary);
    font-weight: 900;
    margin-bottom: 20px;
    display: block;
    letter-spacing: -0.02em;
    text-shadow: 0 10px 20px rgba(var(--color-primary-rgb), 0.1);
}

.sentence-english {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: 16px;
    font-family: var(--font-heading);
}

.sentence-chinese {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    font-weight: 500;
    opacity: 0.8;
}

/* Waveforms Container */
.waveforms-container {
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.waveform-box {
    background: var(--color-background);
    border-radius: 16px;
    padding: 24px 20px 20px 20px;
    height: 120px;
    position: relative;
    border: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.score-container {
    position: absolute;
    bottom: 12px;
    right: 15px;
    z-index: 20;
}

#waveform-standard,
#waveform-user {
    width: 100%;
}

.waveform-label {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-text-muted);
    z-index: 5;
}

/* Control Buttons */
.shadow-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.primary-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.shadow-btn {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.75rem;
    background: var(--color-surface);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border-light);
}

.shadow-btn.play {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: rgba(var(--color-primary-rgb), 0.2);
}

.shadow-btn.play:hover {
    background: var(--color-primary);
    color: white;
}

.shadow-btn.record {
    width: 88px;
    height: 88px;
    background: #fee2e2;
    color: #ef4444;
    font-size: 2.25rem;
    border-color: #fecaca;
    border-radius: 16px;
}

.shadow-btn.record:hover {
    background: #fecaca;
    transform: translateY(-4px) scale(1.05);
}

.shadow-btn.record.recording {
    background: #ef4444;
    color: white;
    border-color: #dc2626;
    animation: pulse-red 1.5s infinite ease-in-out;
}

.shadow-btn.replay-user {
    background: #f1f5f9;
    color: #475569;
}

.shadow-btn.replay-user:hover {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}

.shadow-btn.next {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.shadow-btn.next:hover {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

.shadow-btn:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-btn:active {
    transform: translateY(-2px);
}

.shadow-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Feedback Overlay */
.feedback-message {
    font-weight: 800;
    font-size: 1.25rem;
    text-align: center;
    height: 30px;
    opacity: 0;
    transition: opacity 0.3s;
}

.feedback-message.active {
    opacity: 1;
}

.feedback-message.perfect {
    color: #10b981;
}

.feedback-message.good {
    color: #f59e0b;
}

.feedback-message.poor {
    color: #ef4444;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .shadow-card {
        padding: 32px 24px;
        border-radius: 0;
        border: none;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .shadowing-page {
        padding: 0;
    }

    .sentence-english {
        font-size: 1.75rem;
    }
}