/* =================================================================== */
/* === SGSMATİK PROJESİ - NİHAİ, TEMİZ VE TAM STİL DOSYASI === */
/* =================================================================== */

/* --- 1. GENEL STİLLER --- */
body {
    font-family: 'Nunito', sans-serif;
    background: #f4f7f6;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease;
}

.hidden {
    display: none !important;
}

/* --- 2. ANA BAŞLIK (HEADER) --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #ffffff;
    border-bottom: 2px solid #e9ecef;
}

.main-header h1 {
    font-size: 2em;
    color: #333;
    margin: 0;
}

.main-header .header-logo {
    height: 45px;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-button, .logout-button {
    padding: 8px 16px;
    border: 2px solid;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
    text-decoration: none;
}

.profile-button {
    border-color: #007bff;
    background-color: #fff;
    color: #007bff;
}
.profile-button:hover {
    background-color: #007bff;
    color: white;
}

.logout-button {
    border-color: #d9534f;
    background-color: transparent;
    color: #d9534f;
}
.logout-button:hover {
    background-color: #d9534f;
    color: white;
}

/* --- 3. GİRİŞ SAYFASI (login.html) --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.login-box p {
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 25px;
    transition: color 0.3s ease;
}

.logos-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-separator {
    font-size: 2rem;
    color: #ccc;
    transition: color 0.3s ease;
}

.login-input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.login-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
}

.login-button {
    width: 100%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.form-links {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 20px;
}

.form-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* TEMA DEĞİŞTİRME BUTONU */
#theme-toggle-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}
#theme-toggle-button:hover {
    transform: scale(1.1) rotate(15deg);
}

/* HATA MESAJI */
#error-message {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-weight: bold;
    visibility: hidden;
}
#error-message.visible {
    visibility: visible;
}
#error-message {
    background-color: #FFD2D2;
    color: #D8000C;
    border: 1px solid #D8000C;
}

/* --- 4. KARANLIK MOD (TÜM SAYFALAR) --- */
body.dark-theme-active {
    background: #121212;
}

.login-box.dark-theme {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
}
.dark-theme p { color: #e0e0e0; }
.dark-theme .logo-separator { color: #444; }
.dark-theme .login-input {
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: #f5f5f5;
}
.dark-theme .login-input:focus {
    border-color: #00aaff;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}
.dark-theme .login-button {
    background: linear-gradient(45deg, #00aaff, #0077cc);
}
.dark-theme .form-links a { color: #00aaff; }
.dark-theme #theme-toggle-button {
    background: #2a2a2a;
    border-color: #444;
    color: #f5f5f5;
}
.dark-theme #error-message.visible {
    background-color: #5c2020;
    color: #ffc0c0;
    border-color: #8c3030;
}

/* --- 5. ANA PANEL (index.html) --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.subject-button {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 25px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.subject-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.trial-exam-container {
    max-width: 1200px;
    margin: 0 auto 20px auto;
    padding: 0 20px;
}

.trial-exam-button {
    width: 100%;
    padding: 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.trial-exam-button:hover {
    background-color: #218838;
}
.trial-exam-button h2 { margin: 0 0 5px 0; font-size: 1.8em; }
.trial-exam-button p { margin: 0; font-size: 1.1em; }


/* --- 6. DENEME SINAVI AYARLARI SAYFASI --- */
.settings-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.settings-container h2 { margin-bottom: 10px; }
.settings-container p { margin-bottom: 30px; color: #666; }

#exam-settings-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
}
.setting-item label { font-weight: bold; color: #333; margin-right: 15px; }
.setting-item input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    font-size: 1rem;
}

.settings-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}
.settings-actions .trial-exam-button {
    width: 100%;
    max-width: 400px;
}
.settings-actions .return-button {
    width: 100%;
    max-width: 400px;
    text-decoration: none;
    background-color: #6c757d;
    text-align: center;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}
.settings-actions .return-button:hover {
    background-color: #5a6268;
}

/* --- 7. MOBİL UYUMLULUK --- */
@media (max-width: 768px) {
    .dashboard-grid, #exam-settings-form {
        grid-template-columns: 1fr;
    }
    .main-header {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 25px;
        margin: 15px;
    }
    .login-input {
        padding: 18px;
        font-size: 1.1rem;
    }
    .login-button {
        padding: 18px;
        font-size: 1.15rem;
    }
    .form-links {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    .dark-theme .login-input, .dark-theme .login-button {
        color: #f5f5f5;
    }
    .dark-theme .login-input {
        background-color: #2a2a2a;
        border-color: #444;
    }
    .dark-theme .login-button {
         background: linear-gradient(45deg, #00aaff, #0077cc);
    }
}
/* --- PROFİL SAYFASI STİLLERİ --- */

.profile-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.profile-container h2 {
    text-align: center;
    margin-top: 0;
}

#results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95em;
}

#results-table th, #results-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

#results-table th {
    background-color: #f8f9fa;
}

#results-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.review-button {
    text-decoration: none;
    color: #fff;
    background-color: #007bff;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}
/* --- SINAV EKRANI (QUIZ.HTML) STİLLERİ --- */

.quiz-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 30px;
}

.quiz-box {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 850px;
    overflow: hidden;
}

/* Header'ı quiz için özelleştirelim */
.quiz-box .quiz-header {
    padding: 15px 25px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-header .header-info {
    font-size: 1.1em;
    font-weight: bold;
    color: #495057;
}

.header-info #timer-text {
    margin-left: 20px;
    color: #007bff;
}

/* Soru alanı */
.question-area {
    padding: 30px 25px;
    font-size: 1.25em;
    line-height: 1.6;
    border-bottom: 1px solid #eee;
    position: relative; /* Bayrak butonu için */
}

/* Seçenekler */
#options-list {
    list-style: none;
    padding: 20px 25px;
    margin: 0;
}

#options-list li {
    background-color: #fff;
    border: 2px solid #e0e0e0;
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.05em;
}

#options-list li:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

#options-list li.selected {
    background-color: #d1e7fd;
    border-color: #007bff;
    color: #004085;
    font-weight: bold;
}

/* Navigasyon Butonları */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    padding: 25px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.quiz-navigation button {
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

#prev-button, #next-button {
    background-color: #6c757d;
    color: white;
}
#prev-button:hover, #next-button:hover {
    background-color: #5a6268;
}
#prev-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#finish-button {
    background-color: #28a745;
    color: white;
}
#finish-button:hover {
    background-color: #218838;
}

/* Bayrak butonu stili */
.flag-button {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 1.8em;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.flag-button.flagged { filter: none; opacity: 1; transform: scale(1.1); }
.flag-button:not(.flagged) { filter: grayscale(1); opacity: 0.4; }
.flag-button:hover { transform: scale(1.2); }

/* SINAV EKRANI - YENİ BUTON STİLİ */

.quiz-navigation {
    /* Butonların daha düzenli durması için */
    gap: 10px;
}

.quit-button {
    background-color: #dc3545 !important; /* Kırmızı, uyarı rengi */
    color: white;
}

.quit-button:hover {
    background-color: #c82333 !important;
}

.finish-button {
    margin-left: auto; /* Bitir butonunu sağa yasla */
}
/* --- PROFİL SAYFASI STİLLERİ --- */

.profile-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.profile-container h2 {
    text-align: center;
    margin-top: 0;
    color: #333;
    font-size: 2em;
}

.profile-container h3 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.results-table-container {
    overflow-x: auto; /* Küçük ekranlarda tabloyu kaydırılabilir yapar */
}

#results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95em;
}

#results-table th, #results-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
}

#results-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

#results-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.review-button {
    text-decoration: none;
    color: #fff;
    background-color: #007bff;
    padding: 6px 12px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.review-button:hover {
    background-color: #0056b3;
}
/* --- AYARLAR SAYFASI - TOPLAM SORU GÖSTERGESİ STİLİ --- */

.settings-actions {
    display: flex;
    flex-direction: row; /* Yan yana hizalamak için ROW olmalı */
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px; /* Boşluğu biraz artırabiliriz */
    margin-top: 30px;
}

#total-questions-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    min-width: 200px;
    text-align: center;
}
#total-questions-display span {
    display: inline-block;
    margin-left: 5px;
}
#total-questions-display.invalid { color: #D8000C; border-color: #D8000C; }
#total-questions-display.valid { color: #155724; border-color: #155724; }

.settings-actions .trial-exam-button, 
.settings-actions .return-button {
    flex-grow: 1; /* Butonların boş alanı doldurmasını sağla */
    max-width: 300px;
}

/* JavaScript ile eklenecek renkler için stiller */
#total-questions-display.invalid {
    color: #D8000C;
    border-color: #D8000C;
}

#total-questions-display.valid {
    color: #155724;
    border-color: #155724;
}
/* ========================================= */
/* === SINAV ANALİZ (REVIEW) SAYFASI STİLLERİ === */
/* ========================================= */

.review-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
}

.review-question-box {
    background-color: #fff;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #6c757d; /* Sol kenarda ayırıcı bir çizgi */
}

.review-question-box h3 {
    margin-top: 0;
    font-size: 1.4em;
    color: #333;
}

.review-options {
    list-style-type: none;
    padding-left: 0;
    margin-top: 20px;
}

.review-options li {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 1.1em;
    transition: all 0.2s ease;
}

/* 1. Doğru Olan Cevabın Stili (Her Zaman Yeşil) */
.review-options li.correct {
    background-color: #d4edda; /* Yeşil arka plan */
    color: #155724;             /* Koyu yeşil yazı */
    border-color: #c3e6cb;
    font-weight: bold;
}

/* 2. Kullanıcının Seçtiği YANLIŞ Cevabın Stili (Kırmızı ve Üstü Çizili) */
.review-options li.incorrect {
    background-color: #f8d7da; /* Kırmızı arka plan */
    color: #721c24;             /* Koyu kırmızı yazı */
    border-color: #f5c6cb;
    font-weight: bold;
    text-decoration: line-through; /* Üstünü çiz */
    opacity: 0.8; /* Biraz soluk göster */
}

/* Açıklama Kutusu Stili */
.explanation {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 5px;
    border-left: 4px solid #007bff;
    color: #495057;
    font-size: 1.05em;
    line-height: 1.6;
}
/* GİRİŞ SAYFASINDAKİ BÜYÜK LOGO SORUNUNU ÇÖZEN KOD */
.logos-header .header-logo {
    height: 45px;
}
/* ÜYELİK GEREKTİREN KİLİTLİ BUTON STİLİ */
.paid-feature.disabled {
    background-color: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
    border-color: #dee2e6;
    box-shadow: none;
    transform: none;
}
.paid-feature.disabled:hover {
    background-color: #f8f9fa; /* Hover efektini kaldır */
}

/* ÜCRETSİZ DENEME BUTONU STİLİ */
.free-trial-button {
    background-color: #17a2b8; /* Farklı bir renk */
    color: white;
    border-color: #17a2b8;
}
.free-trial-button:hover {
    background-color: #138496;
}
/* ÜYELİK GEREKTİREN KİLİTLİ BUTON STİLİ */
.paid-feature.disabled {
    background-color: #f8f9fa !important;
    color: #adb5bd !important;
    cursor: not-allowed !important;
    border-color: #dee2e6 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ÜCRETSİZ DENEME BUTONU STİLİ */
.free-trial-button {
    background-color: #17a2b8 !important;
    color: white !important;
    border-color: #17a2b8 !important;
}
.free-trial-button:hover {
    background-color: #138496 !important;
}
/* SATIN ALMA ÇAĞRISI (CTA) STİLLERİ */
.subscribe-cta {
    max-width: 1200px;
    margin: 0 auto 30px auto;
    padding: 20px 30px;
    background-color: #e0f7fa; /* Açık mavi bir arka plan */
    border-radius: 8px;
    border: 2px solid #4dd0e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cta-text h3 {
    margin: 0 0 5px 0;
    color: #00796b;
}

.cta-text p {
    margin: 0;
    color: #004d40;
}

.cta-button {
    background-color: #ff7043; /* Dikkat çekici turuncu renk */
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cta-button:hover {
    background-color: #f4511e;
    transform: scale(1.05);
}
/* ========================================= */
/* ===== QUIZ BUTON STİLLERİ (YENİ) ====== */
/* ========================================= */

/* Tüm Sınav Butonları İçin Ortak Stil */
.nav-button, .result-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin: 5px;
}

.nav-button:hover, .result-button:hover {
    transform: translateY(-2px);
}

/* Önceki Butonu */
.nav-button.prev {
    background-color: #6c757d;
}
.nav-button.prev:hover {
    background-color: #5a6268;
}

/* Sonraki Butonu */
.nav-button.next {
    background-color: #007bff;
}
.nav-button.next:hover {
    background-color: #0056b3;
}

/* Bitir Butonu */
.nav-button.finish {
    background-color: #28a745;
}
.nav-button.finish:hover {
    background-color: #218838;
}

/* Tekrar Çöz Butonu */
.result-button.restart {
    background-color: #17a2b8;
}
.result-button.restart:hover {
    background-color: #138496;
}

/* Ana Sayfaya Dön Butonu */
.result-button.home {
    background-color: #ffc107;
    color: #212529;
}
.result-button.home:hover {
    background-color: #e0a800;
}

/* Devre dışı bırakılmış butonlar için stil */
.nav-button:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}
.review-options li.correct {
    color: green;
    font-weight: bold;
}

.review-options li.incorrect {
    color: red;
    font-weight: bold;
}

.review-options { list-style: none; padding-left: 0; }
.review-options li { padding: 6px 10px; border-radius: 8px; margin-bottom: 6px; background: #fff; }
.review-options li.correct { color: #0f5132; background: #d1e7dd; font-weight: 600; }
.review-options li.incorrect { color: #842029; background: #f8d7da; font-weight: 600; }
.review-question-box { background:#f7f9fb; border:1px solid #e6eef5; border-radius:12px; padding:14px; margin:16px auto; max-width:900px; }
