/* exam.css - ÖĞRENİM SIRASINA GÖRE GÜNCELLENMİŞ VERSİYON */

/* Sınav Stilleri */
.exam-setup {
    text-align: center;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.setup-info {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.setup-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}

.option-group {
    text-align: left;
}

.option-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.option-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.option-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* İlerleme Bilgisi */
.exam-progress-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
    text-align: left;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #fff;
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Sınav Konteyneri */
.exam-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.exam-header {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
    font-weight: 600;
    align-items: center;
}

.exam-header > div {
    text-align: center;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.1rem;
}

.category-info {
    font-size: 0.9rem !important;
    color: #6c757d;
    background: #e8f4fc !important;
    border: 1px solid #3498db !important;
}

/* Soru Alanı */
.question-area {
    margin: 2.5rem 0;
}

.question {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2.5rem;
    text-align: center;
    line-height: 1.6;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

/* Dinleme Testi Bölümü */
.listen-controls {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    color: white;
}

.listen-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.listen-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.listen-button.playing {
    background: rgba(255, 255, 255, 0.4);
}

.listen-instruction {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* Yazma Bölümü */
.answer-section {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.answer-input {
    flex: 1;
    min-width: 300px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.answer-input.correct {
    border-color: #27ae60;
    background: #e8f6f3;
    color: #27ae60;
}

.answer-input.wrong {
    border-color: #e74c3c;
    background: #fdedec;
    color: #e74c3c;
}

.answer-input:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* Seçenek Butonları */
.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.option-btn {
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.option-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

/* DOĞRU CEVAP - YEŞİL */
.option-btn.correct {
    border-color: #27ae60;
    background: #27ae60;
    color: white;
    animation: pulse-green 0.6s ease-in-out;
}

/* YANLIŞ CEVAP - KIRMIZI */
.option-btn.wrong {
    border-color: #e74c3c;
    background: #e74c3c;
    color: white;
    animation: shake 0.5s ease-in-out;
}

/* Animasyonlar */
@keyframes pulse-green {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 25px rgba(39, 174, 96, 0.5); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Sınav Kontrolleri */
.exam-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

/* Sonuç Ekranı */
.exam-results {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
    text-align: center;
    border: 1px solid #e9ecef;
}

.score-display {
    margin-bottom: 3rem;
}

.score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
    border: 6px solid #e8f4fc;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

#resultMessage {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat h3 {
    color: #6c757d;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.stat p {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

/* Kategori İstatistikleri */
.category-breakdown {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: left;
}

.category-breakdown h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.category-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.category-stat strong {
    color: #2c3e50;
}

.category-stat span {
    color: #6c757d;
    font-weight: 500;
}

/* İnceleme Ekranı */
.review-container {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.review-question {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f8f9fa;
}

.review-question:last-child {
    border-bottom: none;
}

.review-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.review-question-header.correct {
    background: #e8f6f3;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.review-question-header.incorrect {
    background: #fdedec;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.review-status {
    font-weight: bold;
    font-size: 1.2rem;
}

.review-question-text {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    line-height: 1.6;
}

.review-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.review-option {
    padding: 1.2rem;
    border: 2px solid #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.review-option.correct {
    border-color: #27ae60;
    background: #e8f6f3;
    color: #27ae60;
    font-weight: 600;
}

.review-option.incorrect {
    border-color: #e74c3c;
    background: #fdedec;
    color: #e74c3c;
    font-weight: 600;
}

.review-explanation {
    padding: 1.5rem;
    background: #e8f4fc;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    font-size: 1rem;
    line-height: 1.6;
    color: #2c3e50;
}

/* Buton Stilleri */
.btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn.secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.btn.secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Timer stilleri */
.timer {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.3rem;
}

.timer[style*="color: red"] {
    color: #e74c3c !important;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hidden {
    display: none !important;
}

/* Responsive tasarım */
@media (max-width: 1024px) {
    .exam-header {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .setup-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .exam-setup,
    .exam-container,
    .exam-results,
    .review-container {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .exam-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .setup-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .exam-controls {
        flex-direction: column;
    }
    
    .answer-section {
        flex-direction: column;
    }
    
    .answer-input {
        min-width: auto;
    }
    
    .options {
        grid-template-columns: 1fr;
    }
    
    .option-btn {
        padding: 1.2rem;
        font-size: 1rem;
        min-height: 70px;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
        font-size: 2rem;
    }
    
    .question {
        font-size: 1.2rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .exam-setup,
    .exam-container,
    .exam-results,
    .review-container {
        padding: 1rem;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .stat {
        padding: 1rem;
    }
    
    .stat p {
        font-size: 1.5rem;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .review-question-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Özel scrollbar */
.exam-results::-webkit-scrollbar,
.review-container::-webkit-scrollbar {
    width: 6px;
}

.exam-results::-webkit-scrollbar-track,
.review-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.exam-results::-webkit-scrollbar-thumb,
.review-container::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.exam-results::-webkit-scrollbar-thumb:hover,
.review-container::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}