*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --focus-ring: rgba(99, 102, 241, 0.2);
}

body { 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; 
    background-color: var(--bg-color); 
    background-image: radial-gradient(at 50% 0%, #e0e7ff 0px, transparent 50vw);
    background-repeat: no-repeat;
    color: var(--text-dark); 
    margin: 0; 
    padding: 0; 
    display: flex; 
    flex-direction: column;
    min-height: 100vh; 
    -webkit-font-smoothing: antialiased;
    
    /* 2. YATAY KAYDIRMAYI KÖKÜNDEN KİLİTLEYEN SATIR */
    overflow-x: hidden; 
}

/* --- YENİ: GLOBAL HEADER (ÜST MENÜ) --- */
.global-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}
.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}
.site-logo span { color: var(--primary); }
.nav-menu { display: flex; gap: 25px; }
.nav-menu a { text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.nav-menu a:hover { color: var(--primary); }

/* --- İÇERİK KAPSAYICISI VE KART --- */
.site-wrapper { 
    max-width: 1100px; 
    width: 100%; 
    margin: 20px auto; /* Üstten menüye mesafe */
    padding: 5px;
    box-sizing: border-box;
    flex: 1; /* Footer'ı en alta itmek için */
}
.main-card { 
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 32px;
    padding: 10px;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.05), 0 0 0 1px rgba(255,255,255,0.5) inset;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Arama Motoru ve İçerik Fontları */
.hero-area { text-align: center; margin-bottom: 45px; }
h1.page-title { font-size: 2.8rem; font-weight: 800; margin: 0 0 15px 0; letter-spacing: -1px; color: var(--text-dark); line-height: 1.2; }
.text-gradient { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
p.subtitle { color: var(--text-muted); font-size: 1.15rem; margin: 0; font-weight: 400; }

.search-box-wrapper { position: relative; width: 100%; z-index: 50; max-width: 650px; margin: 0 auto; }
.search-input { width: 100%; padding: 22px 30px 22px 65px; font-size: 1.15rem; border: 2px solid transparent; border-radius: 99px; outline: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08), 0 0 0 1px var(--border-color); font-family: inherit; box-sizing: border-box; background: #fff; color: var(--text-dark); }
.search-input:focus { border-color: var(--primary); box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.15), 0 0 0 4px var(--focus-ring); transform: translateY(-2px); }
.search-input::placeholder { color: #94a3b8; }
.icon-search { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; fill: none; stroke: #64748b; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke 0.3s; }
.search-input:focus + .icon-search { stroke: var(--primary); }
.css-spinner { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border: 3px solid #e0e7ff; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; display: none; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

.results-dropdown { position: absolute; top: calc(100% + 15px); left: 0; width: 100%; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-radius: 24px; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1), 0 0 0 1px var(--border-color); max-height: 400px; overflow-y: auto; display: none; z-index: 100; padding: 10px; }
.results-dropdown::-webkit-scrollbar { width: 6px; }
.results-dropdown::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.book-item { display: flex; align-items: center; padding: 12px; border-radius: 16px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.book-item:hover { background: #f8fafc; border-color: var(--border-color); transform: translateX(5px); }
.book-cover { width: 45px; height: 65px; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); margin-right: 18px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: #94a3b8; border: 1px solid rgba(0,0,0,0.05); }
.book-info { flex: 1; }
.book-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; color: var(--text-dark); }
.book-author { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

#autoGenerateForm { background: linear-gradient(to bottom right, #ffffff, #f8fafc); border: 1px solid var(--border-color); border-radius: 24px; padding: 30px; margin-top: 40px; display: none; text-align: center; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); animation: slideUp 0.4s ease forwards; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
#selCover { width: 100px; border-radius: 12px; box-shadow: 0 10px 20px rgba(0,0,0,0.15); margin-bottom: 20px; border: 3px solid #fff; }

.btn-generate { background: var(--primary-gradient); color: #fff; border: none; padding: 16px 32px; font-size: 1.1rem; font-weight: 700; border-radius: 99px; cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: inherit; width: 100%; max-width: 300px; margin-top: 10px; box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4); }
.btn-generate:hover { transform: translateY(-3px); box-shadow: 0 15px 25px -5px rgba(79, 70, 229, 0.5); }
.btn-generate svg { width: 20px; height: 20px; fill: currentColor; }

.fallback-link { text-align: center; margin-top: 25px; font-size: 0.95rem; color: var(--text-muted); }
.fallback-link button { background: none; border: none; color: var(--primary); font-weight: 700; cursor: pointer; padding: 0; font-family: inherit; font-size: 0.95rem; text-decoration: underline; text-underline-offset: 4px; transition: color 0.2s; }

.recent-books-section { margin-top: 60px; padding-top: 40px; border-top: 1px solid rgba(226, 232, 240, 0.6); }
.recent-title { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); margin-bottom: 25px; display: flex; align-items: center; gap: 10px; }
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 25px; }
.book-card { display: flex; flex-direction: column; text-decoration: none; transition: all 0.3s ease; padding: 15px; border-radius: 20px; background: #fff; border: 1px solid transparent; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); }
.book-card:hover { transform: translateY(-8px); background: #fff; border-color: var(--border-color); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05); }
.book-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); margin-bottom: 15px; }
.book-card h3 { font-size: 1rem; font-weight: 700; color: var(--text-dark); margin: 0 0 5px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-card p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* --- YENİ: GLOBAL FOOTER (ALT BİLGİ) --- */
.global-footer { border-top: 1px solid rgba(226, 232, 240, 0.6); padding: 30px 20px; width: 100%; background: transparent; }
.footer-container { max-width: 900px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.footer-container p { color: var(--text-muted); margin: 0; font-size: 0.95rem; font-weight: 500; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }

@media (max-width: 600px) {
    .main-card { padding: 15px 5px; border-radius: 24px; }
    h1.page-title { font-size: 2.2rem; }
    .search-input { padding: 18px 25px 18px 55px; font-size: 1rem; }
    .books-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .book-card { padding: 10px; }
    .footer-container { justify-content: center; text-align: center; }
}

/* --- KİTAP DETAY SAYFASI ÖZEL TASARIMLARI (V3 - PREMIUM) --- */
.book-header-section { display: flex; gap: 35px; margin-bottom: 35px; align-items: center; background: #fff; padding: 35px; border-radius: 24px; box-shadow: 0 10px 40px -10px rgba(0,0,0,0.06); border: 1px solid var(--border-color); }
.book-header-cover { width: 150px; border-radius: 12px; box-shadow: 0 15px 35px rgba(0,0,0,0.15); flex-shrink: 0; }
.book-header-info { flex: 1; }
.book-header-title { font-size: 2.4rem; font-weight: 800; color: var(--text-dark); margin: 0 0 10px 0; letter-spacing: -1px; line-height: 1.2; }
.book-header-author { font-size: 1.15rem; color: var(--text-muted); font-weight: 500; margin: 0 0 20px 0; display: flex; align-items: center; gap: 8px; }
.book-meta-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.meta-tag { background: #f8fafc; color: #475569; padding: 6px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 6px; border: 1px solid #e2e8f0; }

/* ==========================================================
   SEKMELER (TAB NAVIGATION)
   ========================================================== */
.tab-navigation { 
    display: flex; 
    flex-wrap: wrap; /* Sığmayan sekmelerin alt satıra geçmesini sağlar */
    width: 100%; /* %100 Genişlik kuralı */
    gap: 12px; /* Webde sekmeler arasındaki net ve şık boşluk */
    margin-bottom: 35px; 
}

.tab-btn { 
    flex: 1 1 auto; /* Boşlukları esnek şekilde doldurur */
    background: #f1f5f9; /* Kapsayıcı yerine her butonun kendi arka planı oldu */
    padding: 14px 20px; 
    border-radius: 12px; 
    font-size: 0.95rem; 
    font-weight: 700; 
    color: var(--text-muted); 
    text-align: center;
    text-decoration: none; 
    transition: all 0.3s; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    white-space: nowrap; 
    border: 1px solid transparent;
}

.tab-btn:hover { 
    color: var(--text-dark); 
    background: #e2e8f0;
}

.tab-btn.active { 
    background: #fff8af; 
    color: var(--primary); 
    border-color: var(--primary); /* Aktif sekmeye çok şık bir tema rengi çerçeve */
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.12); 
}

/* --- MOBİL EKRANLAR --- */
@media (max-width: 768px) {
    .tab-navigation {
        gap: 10px; /* Mobilde aralarındaki boşluk biraz daralır */
    }
    .tab-btn {
        /* Mobilde yan yana sığdığı kadar durur, ekrana sığmayan buton otomatik alt satıra iner ve o satırı %100 doldurur */
        flex: 1 1 auto; 
        white-space: normal; 
        padding: 12px 10px;
    }
}

/* ==========================================================
   İÇERİK TİPOGRAFİSİ (PREMIUM EDİTORYAL TASARIM)
   ========================================================== */

/* 1. Temel Metin ve Genel Bakış/Dinamikler Kutusu */
.content-typography { 
    font-size: 1.125rem; 
    line-height: 1.85; 
    color: #475569; 
    word-wrap: break-word;
}

/* 2. Dinamik Giriş Kutusu (Karakter Dinamikleri vs. İçin) */
.info-highlight-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: 0 16px 16px 0;
    padding: 15px 20px 15px 20px;
    margin: 15px 0 30px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}
.info-highlight-box p {
    margin-bottom: 10px !important;
    font-size: 1.05rem;
    color: #334155;
}
.info-highlight-box p:last-child { margin-bottom: 0 !important; }

/* 3. Ana Başlıklar (H2) ve Alt Çizgi Efekti */
.content-typography h2 { 
    color: var(--text-dark); 
    font-size: 1.75rem; 
    margin-top: 20px; 
    margin-bottom: 25px; 
    font-weight: 800; 
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 15px;
}
.content-typography h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 5px;
    background: var(--primary-gradient);
    border-radius: 5px;
}

/* 4. Alt Başlıklar (H3) - Ana Karakter İsimleri İçin */
.content-typography h3 { 
    color: var(--primary); 
    font-size: 1.4rem; 
    margin-top: 25px; 
    margin-bottom: 15px; 
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-typography p { margin-bottom: 20px; }

/* 5. Kalın Yazılar (Fosforlu Kalem / Highlighter Efekti) */
.content-typography strong { 
    color: var(--text-dark); 
    font-weight: 700; 
    background: linear-gradient(120deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    background-repeat: no-repeat;
    background-size: 100% 35%;
    background-position: 0 88%;
    padding: 0 2px;
}

/* 6. Listeler (Özel Tema Renkli Noktalar) */
.content-typography ul { 
    list-style: none;
    padding-left: 0; 
    margin-bottom: 20px;
}
.content-typography ul li { 
    position: relative;
    padding-left: 30px;
    margin-bottom: 6px; 
    font-size: 1.05rem;
}
.content-typography ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: -2px;
    font-size: 1.6rem;
    color: var(--primary);
}

/* 7. Edebi Alıntı Kutusu (Tırnak İşaretli) */
.content-typography blockquote {
    position: relative;
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 15px 0;
    border-radius: 0 16px 16px 0;
    font-size: 1.15rem;
    color: #334155;
    font-style: italic;
    box-shadow: 0 15px 40px -10px rgba(0,0,0,0.06);
    z-index: 1;
    overflow: hidden;
}
.content-typography blockquote::before {
    content: '"';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 10rem;
    font-family: Georgia, serif;
    color: rgba(79, 70, 229, 0.04);
    z-index: -1;
    line-height: 1;
}

/* DİKKAT: Alıntı Numarası Sorununun Çözümü Burası */
.content-typography blockquote strong.quote-num {
    display: inline; /* Alt satıra geçmeyi engeller */
    color: var(--primary);
    font-size: 1.2rem;
    font-style: normal;
    background: none;
    padding: 0;
    margin-right: 5px; /* Numara ve tırnak arasına boşluk */
}
.content-typography blockquote strong:not(.quote-num) {
    color: var(--primary);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0px;
    margin-bottom: 0px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
}

/* 8. Hap Bilgi Kutusu (Genel Bakış İçin) */
.quick-info-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
}
.quick-info-item {
    display: flex;
    flex-direction: column;
}
.quick-info-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 3px;
}
.quick-info-value {
    font-size: 1.05rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* Modern Dashboard Kartları (Paket Görünümü) */
.dash-card { display: flex; align-items: center; justify-content: space-between; padding: 20px 25px; background: #fff; border: 1px solid var(--border-color); border-radius: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.02); transition: all 0.3s; text-decoration: none; margin-bottom: 15px; }
.dash-card:hover { transform: translateY(-3px); box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.1); border-color: rgba(79, 70, 229, 0.3); }
.dash-card-icon { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-right: 20px; flex-shrink: 0; }
.dash-card-info { flex: 1; }
.dash-card-title { font-size: 1.15rem; font-weight: 800; color: var(--text-dark); margin: 0 0 5px 0; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; font-size: 0.8rem; font-weight: 700; }
.status-ready { background: #ecfdf5; color: #10b981; }
.status-waiting { background: #fffbeb; color: #f59e0b; }
.dash-action { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 5px; transition: color 0.2s; }

/* Empty State (Boş Durum) */
.empty-state-box { text-align: center; padding: 60px 20px; background: linear-gradient(to bottom, #f8fafc, #ffffff); border-radius: 24px; border: 2px dashed #cbd5e1; }
.empty-state-icon { width: 70px; height: 70px; background: #e0e7ff; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; }

/* Geri Dön Linki */
.back-to-package { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-weight: 600; text-decoration: none; margin-bottom: 5px; font-size: 0.95rem; transition: color 0.2s; }
.back-to-package:hover { color: var(--primary); }

@media (max-width: 768px) {
    .book-header-section { flex-direction: column; text-align: center; padding: 25px; }
    .book-header-author { justify-content: center; }
    .book-meta-tags { justify-content: center; }
    .dash-card { flex-direction: column; text-align: center; padding: 20px; }
    .dash-card-icon { margin: 0 auto 15px auto; }
    .dash-action { margin-top: 15px; justify-content: center; }
}

/* --- YAPAY ZEKA YÜKLENİYOR (OVERLAY) EKRANI --- */
.ai-loading-overlay { 
    position: fixed; /* Sayfayı kaydırsanız bile ekrana sabit kalır */
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(15, 23, 42, 0.85); /* Arka planı hafif karartalım */
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    z-index: 999999; /* Her şeyin üzerinde durmasını sağlar */
    display: none; /* Başlangıçta gizli */
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
}

.ai-loading-overlay.active { 
    display: flex !important; /* JS ile tetiklendiğinde görünür olur */
}

.loading-content-box { 
    background: #fff; 
    padding: 40px; 
    border-radius: 32px; 
    text-align: center; 
    max-width: 400px; 
    width: 90%; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); 
}

/* Dönen Renkli Halka Animasyonu */
.ai-spinner { width: 80px; height: 80px; border-radius: 50%; border: 4px solid #e0e7ff; border-top-color: var(--primary); border-bottom-color: #6366f1; margin: 0 auto 25px auto; animation: ai-spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite; }
@keyframes ai-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Yazılar */
.loading-title { font-size: 1.6rem; font-weight: 800; color: var(--text-dark); margin: 0 0 10px 0; }
.loading-subtitle { font-size: 1.05rem; color: var(--primary); font-weight: 600; margin: 0 0 30px 0; min-height: 48px; display: flex; align-items: center; justify-content: center; line-height: 1.4; }

/* İlerleme Çubuğu (Progress Bar) */
.progress-container { width: 100%; background: #f1f5f9; border-radius: 99px; height: 8px; overflow: hidden; position: relative; }
.progress-fill { height: 100%; width: 0%; background: var(--primary-gradient); border-radius: 99px; transition: width 0.5s ease-out; box-shadow: 0 0 10px rgba(79, 70, 229, 0.5); }

/* TEST LMS GÖRÜNÜMÜ VE YAZDIRMA */
.test-intro-panel { text-align: center; padding: 40px 20px; background: #fff; border: 1px solid var(--border-color); border-radius: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.intro-stats-grid { display: flex; justify-content: center; gap: 15px; margin: 25px 0; }
.intro-stat-pill { background: #f1f5f9; padding: 10px 20px; border-radius: 12px; font-weight: 700; color: #475569; }
.btn-start-test { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; padding: 15px 35px; border-radius: 12px; font-weight: 800; font-size: 1.1rem; text-decoration: none; transition: 0.2s; }
.btn-start-test:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3); }

.top-q-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; padding-bottom: 5px; border-bottom: 1px solid var(--border-color); }
.nav-dot {font-size: 1.4rem; font-weight: 800; background: #f1f5f9; color: #0d9488; margin-bottom:5px; padding: 5px 20px 5px 20px; display: flex; align-items: center; justify-content: center; border-radius: 8px; text-decoration: none; transition: 0.2s; }
.nav-dot.filled { background: #e0e7ff; color: var(--primary); }
.nav-dot.active { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3); }

/* --- YAN YANA (%100 GENİŞLİKTE) OPTİK FORM BUTONLARI --- */
.opt-container { 
    display: flex; 
    flex-direction: row; 
    gap: 15px; /* Görseldeki gibi butonlar arası tatlı bir boşluk */
    margin-bottom: 25px; 
    width: 100%; 
}
.opt-label { 
    flex: 1; /* Tüm butonları eşit genişlikte böler */
    cursor: pointer; 
}
.opt-label input { display: none; }

.opt-box { 
    padding: 8px 0; 
    border: 2px solid #e2e8f0; /* Görseldeki açık gri/mavi kenarlık */
    border-radius: 12px; 
    background: #f8fafc; /* Görseldeki o çok hafif gri zemin */
    color: #475569; /* Koyu lacivert/gri harf rengi */
    font-weight: 800; 
    font-size: 1.3rem; /* Harflerin net okunması için boyut */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    height: 100%;
    transition: all 0.2s ease-in-out;
}

/* Hover (Üzerine gelince) efekti */
.opt-label:hover .opt-box {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

/* Seçili Durum - Tamamen Tema Rengi Solid Arka Plan */
.opt-label input:checked + .opt-box { 
    border-color: var(--primary); 
    background: var(--primary); 
    color: #fff; 
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25); 
    transform: translateY(-2px); 
}

/* Mobil Görünüm: Ekran daraldığında ezilmesinler */
@media (max-width: 480px) {
    .opt-container { gap: 8px; }
    .opt-box { padding: 6px 0; font-size: 1.1rem; border-radius: 8px; }
}

/* --- AKSİYON ÇUBUĞU VE BUTONLAR (PREMIUM LMS) --- */
.action-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; gap: 15px; }
.btn-act { padding: 14px 0; border-radius: 12px; font-weight: 800; border: none; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); font-size: 1.05rem; flex: 1; display:flex; align-items:center; justify-content:center; gap:8px; }
.btn-prev { background: #f1f5f9; color: #475569; }
.btn-prev:hover { background: #e2e8f0; transform: translateY(-2px); }
.btn-sol { background: #fffbeb; color: #d97706; border: 1px solid #fcd34d; }
.btn-sol:hover { background: #fef3c7; transform: translateY(-2px); }
.btn-next { background: var(--primary); color: #fff; box-shadow: 0 4px 15px rgba(79,70,229,0.3); }
.btn-next:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,70,229,0.4); }

/* --- ALT KONTROLLER (YENİDEN BAŞLA & BİTİR) --- */
.test-controls { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 10px; border-top: 2px dashed var(--border-color); gap: 20px; }
.btn-restart { background: #fff; border: 2px solid #fecaca; color: #ef4444; padding: 14px 20px; border-radius: 12px; font-weight: 800; cursor: pointer; flex: 1; transition: 0.2s; font-size:1rem; }
.btn-restart:hover { background: #fef2f2; transform: translateY(-2px); }
.btn-finish { background: #fff; border: 2px solid #a7f3d0; color: #10b981; padding: 14px 20px; border-radius: 12px; font-weight: 800; cursor: pointer; flex: 1; transition: 0.2s; font-size:1rem; }
.btn-finish:hover { background: #ecfdf5; transform: translateY(-2px); }

/* Çözüm Kutusunun Kayarak Açılma Animasyonu */
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }


.score-circle { width: 120px; height: 120px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; margin: 0 auto 30px auto; }
.score-circle .val { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.score-circle .lbl { font-size: 0.8rem; font-weight: 700; opacity: 0.9; letter-spacing: 1px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 30px; text-align: center; }
.stat-box { background: #f8fafc; padding: 15px; border-radius: 12px; border: 1px solid var(--border-color); }
.stat-box .val { display: block; font-size: 1.8rem; font-weight: 800; }
.stat-box .lbl { font-size: 0.85rem; font-weight: 700; color: #64748b; text-transform: uppercase; }

.ans-card { border: 1px solid var(--border-color); border-radius: 16px; padding: 25px; margin-bottom: 20px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.01); }
.ans-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #e2e8f0; }
.ans-badge { padding: 4px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 800; }
.badge-correct { background: #d1fae5; color: #059669; }
.badge-wrong { background: #fee2e2; color: #dc2626; }
.badge-empty { background: #f1f5f9; color: #64748b; }
.ans-opt { padding: 10px 15px; border-radius: 8px; margin-bottom: 8px; background: #f8fafc; color: #475569; font-weight: 600; display: flex; justify-content: space-between; }
.ans-opt.is-correct { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.ans-opt.is-wrong { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; text-decoration: line-through; }

#print-area { display: none; }
@media print {
    body * { visibility: hidden !important; }
    #print-area, #print-area * { visibility: visible !important; }
    #print-area { display: block !important; position: absolute; left: 0; top: 0; width: 100%; padding: 20px; }
    .print-q { break-inside: avoid; margin-bottom: 30px; }
}

/* --- ÇALIŞMA KAĞIDI / ETKİNLİK KARTLARI --- */
.question-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.question-card h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px dashed var(--border-color);
    font-size: 1.4rem;
}
.question-card ol li, .question-card ul li {
    font-size: 1.1rem;
    color: #334155;
    line-height: 1.6;
}

/* ==========================================================
   PREMIUM KİTAP GENEL BAKIŞ (GRID TASARIM)
   ========================================================== */
.premium-overview-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

/* Üstteki 3'lü Bilgi Kartları */
.po-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.po-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.01);
    transition: all 0.3s ease;
}
.po-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(79, 70, 229, 0.12);
    border-color: #cbd5e1;
}
.po-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px; /* Altındaki metinle arasına hafif boşluk */
}
.po-icon-wrapper {
    width: 45px;
    height: 45px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.po-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 800;
}
.po-value {
    font-size: 1.05rem;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.5;
}

/* Kısa Özet Okuma Alanı */
.po-summary-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.po-summary-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-gradient);
}
.po-summary-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--text-dark);
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}
.po-summary-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
}

/* Alt Açıklama / Dipnot Kutusu */
.po-footer-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 20px 25px;
    display: flex;
    gap: 15px;
    align-items: center;
}
.po-footer-text {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.6;
}

/* --- MOBİL UYUM (Yazar, Konu, Karakter Kutuları Alt Alta İner) --- */
@media (max-width: 768px) {
    .po-grid {
        grid-template-columns: 1fr; /* Mobilde her kutu %100 genişlik kaplar, alt alta dizilir */
        gap: 15px; /* Mobilde aralarındaki boşluğu biraz daraltarak ekranı ferahlatırız */
    }
    
    .po-summary-box {
        padding: 25px 20px; /* Mobilde özet kutusunun iç boşlukları daralır, metne yer açılır */
    }
    
    .po-footer-box {
        flex-direction: column; /* Mobilde açıklama kutusundaki yıldız ve metin alt alta gelir */
        text-align: center;
    }
}