/* ========== CONTAINERS ========== */
.speech-test-container,
.speech-que-container,
.speech-crit-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ========== ERROR MESSAGES ========== */
.speech-error {
    color: #d63638;
    font-weight: bold;
    padding: 15px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    margin: 20px 0;
    border-radius: 4px;
}

/* ========== TABLES ========== */
.speech-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.speech-table th,
.speech-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.speech-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.speech-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.speech-table tr:hover {
    background-color: #f0f0f0;
}

/* ========== FORM ELEMENTS ========== */
.speech-form-group {
    margin-bottom: 20px;
}

.speech-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.speech-form-group input[type="text"],
.speech-form-group input[type="email"],
.speech-form-group input[type="number"],
.speech-form-group textarea {
    width: 100%;
    max-width: 600px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.speech-form-group textarea {
    max-width: 600px;
    min-height: 100px;
    resize: vertical;
}

.speech-form-group input[type="file"] {
    padding: 10px 0;
}

.speech-help {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.speech-required {
    color: #d63638;
}

/* ========== BUTTONS ========== */
.speech-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 5px 10px 5px 0;
}

.speech-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.speech-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.speech-btn-primary {
    background: #007cba;
    color: #fff;
}

.speech-btn-primary:hover {
    background: #005a87;
}

.speech-btn-record {
    background: #d63638;
    color: #fff;
}

.speech-btn-record:hover:not(:disabled) {
    background: #a82527;
}

.speech-btn-record:disabled {
    background: #e68a8b;
}

.speech-btn-stop {
    background: #f0ad4e;
    color: #fff;
}

.speech-btn-stop:hover:not(:disabled) {
    background: #d48d3a;
}

.speech-btn-stop:disabled {
    background: #f5d4a0;
}

.speech-btn-next {
    background: #46b450;
    color: #fff;
}

.speech-btn-next:hover:not(:disabled) {
    background: #338a3a;
}

.speech-btn-next:disabled {
    background: #a3d8a3;
}

.speech-form-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ========== TEST RECORDER ========== */
#speech-test-recorder {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.speech-question {
    font-size: 20px;
    font-weight: 600;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #007cba;
    min-height: 60px;
}

.speech-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
}

.speech-status {
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: 500;
}

.speech-status-recording {
    background: #d63638;
    color: #fff;
    animation: pulse 1.5s infinite;
}

.speech-status-stopped {
    background: #f0ad4e;
    color: #fff;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.speech-response {
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
}

.speech-transcription {
    margin-top: 10px;
    padding: 10px;
    background: #f0f7ff;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

.speech-score {
    font-size: 18px;
    font-weight: 600;
    color: #46b450;
    padding: 10px;
    margin: 10px 0;
    background: #eaf5ea;
    border-radius: 4px;
}

.speech-comment {
    font-size: 16px;
    padding: 10px;
    margin: 10px 0;
    background: #f5f5f5;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

/* ========== PROGRESS BAR ========== */
.speech-progress {
    width: 100%;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
    margin: 20px 0;
}

.speech-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #46b450);
    transition: width 0.5s ease;
    width: 0%;
}

#question-progress {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* ========== COMPLETE STATE ========== */
.speech-complete {
    text-align: center;
    padding: 40px 20px;
}

.speech-complete h3 {
    font-size: 28px;
    color: #46b450;
    margin-bottom: 15px;
}

.speech-complete p {
    font-size: 18px;
    color: #555;
    margin-bottom: 20px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .speech-test-container,
    .speech-que-container,
    .speech-crit-container {
        padding: 15px;
    }
    
    .speech-table {
        font-size: 12px;
    }
    
    .speech-table th,
    .speech-table td {
        padding: 8px;
    }
    
    .speech-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .speech-btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .speech-question {
        font-size: 18px;
        padding: 15px;
    }
    
    .speech-form-group input[type="text"],
    .speech-form-group input[type="email"],
    .speech-form-group input[type="number"],
    .speech-form-group textarea {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .speech-table {
        font-size: 11px;
    }
    
    .speech-table th,
    .speech-table td {
        padding: 5px;
    }
    
    .speech-question {
        font-size: 16px;
        padding: 12px;
    }
}

/* ========== TIMER ========== */
.speech-timer {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    padding: 10px;
    margin: 10px 0;
    background: #f5f5f5;
    border-radius: 8px;
    color: #333;
    transition: all 0.3s ease;
}

.speech-timer-warning {
    color: #d63638 !important;
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* ========== MEDIA CONTAINER ========== */
#question-media-container {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

#question-media-display {
    text-align: center;
}

#question-media-display img,
#question-media-display video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.speech-prompt {
    margin-top: 15px;
    padding: 12px;
    background: #f0f7ff;
    border-left: 4px solid #007cba;
    border-radius: 4px;
    font-size: 15px;
    color: #333;
}

/* ========== STATUS INDICATORS ========== */
.speech-status-ready {
    background: #007cba;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.speech-status-recording {
    background: #d63638;
    color: #fff;
    animation: pulse 1.5s infinite;
}

.speech-status-stopped {
    background: #f0ad4e;
    color: #fff;
}

/* ========== RESPONSIVE IMPROVEMENTS ========== */
@media (max-width: 768px) {
    .speech-timer {
        font-size: 20px;
        padding: 8px;
    }
    
    #question-media-display img,
    #question-media-display video {
        max-height: 250px;
    }
    
    .speech-prompt {
        font-size: 14px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .speech-timer {
        font-size: 18px;
    }
    
    #question-media-display img,
    #question-media-display video {
        max-height: 200px;
    }
}



