.speaking-layout {
    display: flex;
    height: calc(100vh - 73px);
    background: #f1f5f9;
    font-family: 'Inter', sans-serif;
}

.speaking-sidebar {
    width: 380px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.part-selector {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}

.part-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    font-family: 'Inter', sans-serif;
}

.part-btn:hover {
    color: #6366f1;
    background: rgba(99,102,241,0.04);
}

.part-btn.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
    background: rgba(99,102,241,0.06);
}

.prompts-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.prompt-card {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.prompt-card:hover {
    border-color: #a5b4fc;
    background: rgba(99,102,241,0.03);
}

.prompt-card.active {
    border-color: #6366f1;
    background: rgba(99,102,241,0.06);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}

.prompt-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #64748b;
    flex-shrink: 0;
}

.prompt-card.active .prompt-number {
    background: #6366f1;
    color: white;
}

.prompt-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #334155;
    font-weight: 500;
}

.speaking-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
}

.selected-prompt-area {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.selected-prompt-area h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.selected-prompt-area #selectedPrompt {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.6;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
}

.selected-prompt-area #prepInfo {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.controls-area {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.record-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    border: 2px solid #6366f1;
    background: white;
    color: #6366f1;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.record-btn:hover {
    background: rgba(99,102,241,0.06);
    transform: translateY(-1px);
}

.record-btn.recording {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    animation: pulse-record 1.5s infinite;
}

@keyframes pulse-record {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}

.recording-indicator {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #ef4444;
    font-size: 0.9rem;
}

.recording-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
    font-family: 'Inter', sans-serif;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.4);
}

.speech-status {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-left: auto;
}

.transcript-area {
    margin-bottom: 1.5rem;
}

.transcript-area label {
    font-weight: 700;
    font-size: 0.85rem;
    color: #475569;
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.transcript-area textarea {
    width: 100%;
    height: 180px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    background: white;
    color: #334155;
}

.transcript-area textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.result-panel {
    display: none;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

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

.band-gauge {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.band-inner {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.band-value {
    font-size: 2rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.band-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.criteria-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.criterion-card {
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.criterion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
}

.criterion-score {
    font-size: 1.25rem;
    font-weight: 900;
}

.criterion-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #475569;
}

.feedback-section {
    margin-bottom: 1.25rem;
}

.feedback-section h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.feedback-section p {
    color: #475569;
    line-height: 1.6;
    font-size: 0.95rem;
}

.feedback-list {
    list-style: none;
    padding: 0;
}

.feedback-list li {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
}

.feedback-list li::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.75rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.feedback-list.strengths li {
    background: rgba(16,185,129,0.06);
    color: #059669;
}

.feedback-list.strengths li::before {
    background: #10b981;
}

.feedback-list.improvements li {
    background: rgba(239,68,68,0.06);
    color: #dc2626;
}

.feedback-list.improvements li::before {
    background: #ef4444;
}

.play-feedback-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    background: white;
    font-weight: 700;
    font-size: 0.9rem;
    color: #6366f1;
    cursor: pointer;
    margin: 1rem auto 0;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.play-feedback-btn:hover {
    border-color: #6366f1;
    background: rgba(99,102,241,0.04);
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.modal-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.modal-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.modal-input:focus {
    outline: none;
    border-color: #6366f1;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
}

.modal-actions button {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
}

.modal-save {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.modal-close {
    background: #f1f5f9;
    color: #475569;
}

@media (max-width: 768px) {
    .speaking-layout {
        flex-direction: column;
        height: auto;
    }
    .speaking-sidebar {
        width: 100%;
        max-height: 300px;
    }
    .speaking-main {
        padding: 1.25rem;
    }
    .criteria-grid {
        grid-template-columns: 1fr;
    }
}
