* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1rem;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* نوار پیشرفت */
.progress-bar-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
}

.progress-step {
    text-align: center;
    padding: 8px 15px;
    border-radius: 30px;
    background: rgba(255,255,255,0.3);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

.progress-step.completed {
    background: #10b981;
}

.progress-step small {
    font-size: 0.7rem;
    display: block;
}

/* بخش‌های تست */
.test-section {
    display: none;
}

.test-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.btn-next {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-next:hover:not(:disabled) {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-small {
    background: #e2e8f0;
    color: #4a5568;
    padding: 8px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.question-section h3 {
    margin-bottom: 15px;
    color: #2d3748;
}

.question-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #2d3748;
    padding: 15px;
    background: #f7fafc;
    border-radius: 15px;
    border-right: 4px solid #667eea;
}

/* کیوکارت */
.cue-card-content {
    background: linear-gradient(135deg, #fff5e6, #ffe6cc);
    padding: 25px;
    border-radius: 20px;
    border-right: 5px solid #f59e0b;
}

.cue-card-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #92400e;
    margin-bottom: 15px;
}

.cue-card-points ul {
    margin: 10px 0 0 20px;
    color: #78350f;
    line-height: 1.8;
}

/* تایمر آماده‌سازی */
.preparation-timer {
    background: #fef3c7;
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #92400e;
}

#timerDisplay {
    font-size: 2rem;
    font-weight: bold;
    color: #ea580c;
}

/* دکمه‌های ضبط */
.recording-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover:not(:disabled) {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.recording-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 15px;
    margin-top: 15px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e0;
    transition: all 0.3s ease;
}

.status-indicator.recording {
    background: #ef4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.audio-playback {
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 15px;
}

.audio-playback audio {
    width: 100%;
    margin-top: 10px;
}

/* تحلیل و نمرات */
.analysis-section {
    margin-top: 20px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 15px;
}

.scores-grid-mini {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.mini-score {
    background: white;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mini-score span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
}

.feedback-box-mini {
    background: white;
    padding: 15px;
    border-radius: 15px;
    margin-top: 15px;
}

/* نتیجه نهایی */
.result-card {
    text-align: center;
}

.final-scores {
    margin: 30px 0;
}

.final-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

.final-score-item.overall {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px;
    margin-top: 20px;
}

.part-label {
    font-weight: 500;
}

.part-score {
    font-size: 1.5rem;
    font-weight: bold;
}

.band-indicator {
    width: 80px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.band-indicator::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--width, 0%);
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.overall-band::after {
    background: #ffd700;
}

.overall-feedback {
    background: #f7fafc;
    padding: 25px;
    border-radius: 20px;
    text-align: right;
    margin: 20px 0;
}

.result-actions {
    margin-top: 20px;
}

/* لودینگ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 20px;
    font-size: 1.1rem;
}

.loading-overlay small {
    margin-top: 10px;
    opacity: 0.8;
}

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.9;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .progress-step {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    
    .scores-grid-mini {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .final-score-item {
        flex-direction: column;
        text-align: center;
    }
    
    .question-content p {
        font-size: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}