/* Genel Stil ve Reset */
:root {
    --primary-color: #4A90E2;
    --primary-light: #EBF5FF;
    --secondary-color: #6C757D;
    --background-color: #F8F9FA;
    --card-background: #FFFFFF;
    --border-color: #ABABAB;
    --text-color: #343A40;
    --success-color: #28A745;
    --success-light: #E6F7E9;
    --danger-color: #DC3545;
    --danger-light: #FCE8E9;
    --warning-color: #FFC107;
    --warning-light: #FFF8E6;
}

.rapor-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* ------------------------------------- */
/* --- HEADER SECTION (PROFESYONEL) ---- */
/* ------------------------------------- */

.rapor-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 3rem 2.5rem; /* Dikey boşluğu artırıldı */
    border-radius: 16px; /* Köşe yuvarlatma artırıldı */
    margin-bottom: 3rem; /* Alt boşluk artırıldı */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Daha belirgin gölge */
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Genel Başlık Stilleri (Temel font ayarları) */
.rapor-title {
    font-weight: 600; 
    line-height: 1.3;
    margin: 0; 
}

/* Ana KARNE Başlığı (h1) */
.rapor-header h1.rapor-title {
    font-size: 2.8rem; /* Daha büyük ve çarpıcı */
    font-weight: 800;
    letter-spacing: 1px; 
    border-bottom: 2px solid rgba(255, 255, 255, 0.3); /* Altına ayırıcı çizgi */
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Ders/Sınav Adı Başlığı (h2) */
.rapor-header h2.rapor-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0.5rem;
    opacity: 0.95;
}

/* Tarih/Çeyrek Başlığı (h3) */
.rapor-header h3.rapor-title {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.8;
}

/* Meta Bilgileri Kapsayıcısı */
.rapor-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem; /* Bilgi öğeleri arasındaki boşluk */
    margin-top: 2rem; 
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* Üstüne ince çizgi */
    flex-wrap: wrap; /* Gerekirse alt satıra geçiş */
}

/* Meta Öğeleri */
.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9); /* Metin rengi */
}

.meta-item i {
    font-size: 1.2rem;
    color: #fff; /* İkon rengi */
    margin-right: 0rem; /* gap özelliği kullanıldığı için bu sıfırlandı */
}


/* ------------------------------------- */
/* -------- SCORE SECTION FIXES -------- */
/* ------------------------------------- */

.score-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Score Card Orthogonal Centering Fix */
.score-card,
.details-card {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    /* score_div_big elementini yatayda ortalamak için eklendi */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-title,
.score-details-title {
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    width: 100%; /* Başlığın kart genişliğinde olmasını sağlar */
    text-align: left; /* Başlığı sola yasla */
}

.score-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Donut Chart Styles */
/* .score_div_big için HTML/JS'den gelen inline stilleri etkisiz kılmamak için 
   buradaki donut-chart-container stili yorumlandı/kullanılmadı.
   Ancak diğer donut stilleri korundu.
*/
.donut-chart-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto; /* Bu satır, dış div ortalaması için JS'deki inline stile uyum sağlar */
}


.donut-chart {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(closest-side, white 79%, transparent 80% 100%),
                conic-gradient(var(--success-color) calc(var(--p) * 1%), var(--border-color) 0);
    position: relative;
    font-size: 1.2rem;
    font-weight: 600;
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.score-total {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.score-details {
    margin-top: 1.5rem;
    width: 100%; /* Detayların kart genişliğinde olmasını sağlar */
}

.details-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.details-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: var(--text-color);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.score-table-container {
    overflow-x: auto;
}

.rapor_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.rapor_table th,
.rapor_table td {
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.rapor_table thead th {
    font-weight: 600;
    background-color: var(--background-color);
}

.rapor_table tbody tr:last-child td {
    border-bottom: none;
}

.rapor_table tbody tr.correct {
    background-color: var(--success-light);
}

.rapor_table tbody tr.correct td {
    color: var(--success-color);
    font-weight: 500;
}

.rapor_table tbody tr.wrong {
    background-color: var(--danger-light);
}

.rapor_table tbody tr.wrong td {
    color: var(--danger-color);
    font-weight: 500;
}

.rapor_table tbody tr.partial {
    background-color: var(--warning-light);
}

.rapor_table tbody tr.partial td {
    color: var(--warning-color);
    font-weight: 500;
}
/* Question Section */
.questions-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.question-item {
    background-color: var(--card-background);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border-left: 5px solid;
}

.question-item.correct {
    border-left-color: var(--success-color);
}

.question-item.wrong {
    border-left-color: var(--danger-color);
}

.question-item.partial {
    border-left-color: var(--warning-color);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.question-number {
    font-size: 1.1rem;
    font-weight: 600;
}

.question-score {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.question-image {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* Options for test questions */
.options {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    flex: 1; /* Make options shrink to fit */
    background-color: transparent;
    transition: background-color 0.3s ease;
}

/* New style for student's answer background */
.option.student-answer {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Correct answer border */
.option.correct-answer {
    border: 4px solid var(--success-color);
}

.option-label {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-color);
}

.option.student-answer .option-label {
    background-color: var(--primary-color);
    color: #fff;
}

.correct-tick {
    font-size: 2rem;
    position: absolute;
    top: -5px;
    right: 2px;
    border-radius: 50%;
    padding: 2px;
	background:none;
    color: var(--success-color);
}

/* Klasik Soru Butonları */
.classic-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.classic-button {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1 1 30%;
    text-align: center;
}

.classic-button:hover {
    background-color: var(--border-color);
}

.rapor_button {
    /* Mevcut stiller */
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s; 
    margin-top: 1rem;
    
    /* Yeni stiller */
    font-size: 1.1rem; 
    letter-spacing: 0.5px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 
    position: relative; 
    overflow: hidden; 
}

.rapor_button:hover {
    /* Mevcut stiller */
    background-color: #3B82F6;
    
    /* Yeni stiller */
    transform: translateY(-2px); 
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); 
}

/* Tıklandığında efekti (isteğe bağlı) */
.rapor_button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Butonun üzerine fare geldiğinde parlayan ışık efekti (isteğe bağlı) */
.rapor_button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.7s ease-in-out;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0;
}

.rapor_button:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg) scale(1.5);
}

/* Responsive Design */
@media (max-width: 768px) {
	.correct-tick {
		font-size: 1.5rem;
		top: -5px;
		right: -3px;
	}	
    /* Header Responsive Düzeltmeleri */
    .rapor-header {
        padding: 2rem 1.5rem;
        border-radius: 8px;
    }
    .rapor-header h1.rapor-title {
        font-size: 2rem;
    }
    .rapor-header h2.rapor-title {
        font-size: 1.3rem;
    }
    .rapor-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .score-section {
        grid-template-columns: 1fr;
    }

    .score-visual {
        margin-bottom: 1rem;
    }

    .score-details {
        margin-top: 1rem;
    }

    .donut-chart-container {
        width: 150px;
        height: 150px;
    }

    .score-value {
        font-size: 2.5rem;
    }

    /* Test questions options on mobile */
    .options {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .option {
        min-width: 45px;
        flex: 1;
        padding: 0.5rem 0.25rem;
		border: 2px solid var(--border-color);
    }
    
    .option-label {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }

    /* Classic question buttons on mobile */
    .classic-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .classic-button {
        width: 100%;
        flex: none;
    }
}