/* Ek stiller (isteğe bağlı) */
body {
    font-family: 'Inter', sans-serif; /* Yeni font ailesini tanımladık */
}

.answer-option {
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.answer-option:not(:disabled) {
    cursor: pointer;
    background-color: #f9fafb;
}

.answer-option:disabled:hover {
    background-color: inherit;
    color: inherit;
    border-color: inherit;
}

.answer-option:disabled {
    cursor: not-allowed;
    opacity: 1;
    background-color: #e5e7eb;
    color: #6b7280;
    border-color: #d1d5db;
}

#questionLevelAnalysisContainer-pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start; /* Butonları sola hizala */
    padding: 1rem 0;
    max-width: 100%;
    overflow-x: auto; /* Yatay kaydırma çubuğu */
    white-space: nowrap; /* Butonların tek satırda kalmasını sağlar */
}

.answer-option.correct {
    background-color: #d1fae5;
    color: darkslateblue;
    border-color: #10b981;
    font-weight: bold;
    font-size: large;
}

.answer-option.incorrect {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
    font-weight: bold;
    font-size: large;
}

.answer-option.selected {
    font-weight: bold;
    font-size: 1.3rem;
    background-color: #b3e5fc;
    color: #01579b;
    border-color: #039be5;
}

.answer-option.selected.incorrect {
    background-color: #fee2e2;
    color: #991b1b;
}

.progress-transition {
    transition: width 0.3s ease-in-out;
}

.hidden {
    display: none;
}

/* Progress bar ana stili */
#progressBar {
    position: relative;
    height: 8px; /* Varsayılan yükseklik */
}

#progressBar::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 0;
    top: -20px;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#progressBar:hover::after {
    opacity: 1;
}

.progress-bar-container {
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 0.375rem;
    overflow: hidden;
}

.progress-bar {
    height: 1.5rem;
    background-color: #4ade80; /* Yeşil renk */
    border-radius: 0.375rem;
    transition: width 0.3s ease-in-out;
}

.progress-bar-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
}

#question {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #555;
    font-weight: 500;
}

.answer-option {
    display: block;
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s;
    font-size: 1.1rem;
    font-weight: 400;
}

.answer-option:hover {
    background-color: #e9e9e9;
}

#explanation {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f8ff;
    border: 2px solid #bdd8e5;
    border-radius: 8px;
    color: #333;
    text-align: left;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Doğru seçim için stil */
.answer-option.correct-selection {
    background-color: #4ade80 !important; /* Yeşil - Zaten iyi */
    color: white !important;
    border-color: #22c55e !important; /* Yeşil - Zaten iyi */
}

/* Yanlış seçim için stil */
.answer-option.incorrect-selection {
    font-weight: 800;
    font-size: 1.2rem;
    background-color: #f87171 !important; /* Kırmızı - Zaten iyi */
    color: white !important; /* Beyaz metin daha iyi kontrast sağlar */
    border-color: #ef4444 !important; /* Kırmızı - Zaten iyi */
}

/* Doğru cevap için stil */
.answer-option.correct {
    font-weight: 800;
    font-size: 1.2rem;
    background-color: #bbf7d0 !important; /* Açık yeşil - Zaten iyi */
    color: #166534 !important; /* Koyu yeşil - Zaten iyi */
    border-color: #22c55e !important; /* Yeşil - Zaten iyi */
}

#chartContainer canvas {
    margin-bottom: 20px;
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    select {
        width: 100%;
    }

    .answer-option {
        font-size: 0.95rem;
        padding: 0.75rem;
    }

    #question {
        font-size: 1.1rem;
    }

    #questionText {
        font-size: 1.1rem;
    }

    #explanation {
        font-size: 1.2rem;
    }

    #testHistoryTable th,
    #testHistoryTable td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    #testHistoryTable th {
        display: none;
    }

    #testHistoryTable td {
        display: block;
        width: 100%;
        padding: 0.5rem;
        text-align: right;
        border-bottom: 1px solid #ddd;
    }

    #testHistoryTable td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
    }

    #testHistoryTable tr {
        margin-bottom: 1rem;
        display: block;
        border: 1px solid #ddd;
        border-radius: 0.375rem;
    }

    #testHistoryLink {
        background: none;
        border: none;
        color: #3b82f6;
        text-decoration: underline;
        cursor: pointer;
        padding: 0;
        font-size: 0.875rem;
    }

    #testHistoryLink:hover {
        color: #2563eb;
    }

    #historyAnchor {
        display: block;
        position: relative;
        top: -100px; /* Sayfanın üstünden ne kadar uzakta olacağını ayarlayın */
        visibility: visible; /* Görünür olmalı */
    }

    #progressBar {
        height: 24px; /* 16px'den 24px'e çıkardık */
        touch-action: none; /* Dokunmatik kaydırmayı iyileştir */
    }
    
    .w-full.bg-gray-200.rounded-full {
        height: 24px; /* 16px'den 24px'e çıkardık */
        margin: 15px 0; /* 10px'den 15px'e çıkardık - daha fazla dokunma alanı */
    }

    #progressText {
        font-size: 1rem; /* Progress metin boyutunu da büyüttük */
        margin-top: 8px;
    }
}

/* Analiz tabloları için mobil stil */
@media (max-width: 768px) {
    .analysis-table tbody tr {
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
    }

    .analysis-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .analysis-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        font-weight: 600;
    }

    .analysis-table td:last-child {
        border-bottom: none;
    }
}