/* ===========================================================================
   KITAP DETAY SAYFASI STILLERI

   FAZ 9e: bu blok templates/kitap_detay.php icinde 504 satirlik satir ici
   <style> olarak duruyordu. Uc sorunu vardi:
     1. Her kitap sayfasi isteginde 13 KB tekrar indiriliyordu (onbelleklenemez).
     2. Sabit renkler tema belirteclerini eziyordu -> koyu tema ve iki ayri
        gorsel kimlik bu sayfada calismazdi.
     3. Iki sitede AYNI 13 KB (md5 birebir esit) ayri ayri bakiliyordu.

   Yalnizca kitap detay sayfasinda yuklenir (header.php'de $seoKitap kontrolu).
   Renkler arac/tema_belirte.py ile belirtece cevrildi.
   =========================================================================== */

/* Kitap detay sayfası için özel stiller */
    .book-detail-container {
        background-color: var(--theme-bg);
    }

    .book-cover-wrapper {
        position: sticky;
        top: 20px;
        text-align: center;
    }

    .book-cover {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        transition: transform 0.3s ease;
    }
    .book-cover:hover {
        transform: scale(1.03);
    }

    .book-info-wrapper {
        background-color: var(--theme-surface);
        padding: 2rem;
        border-radius: 0.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .book-title {
        font-weight: 700;
        color: var(--theme-text);
    }

    .author-name {
        font-size: 1.25rem;
        font-weight: 400;
        color: var(--bs-primary);
    }
    .author-name a { color: inherit; text-decoration: none; }
    .author-name a:hover { text-decoration: underline; }

    /* Rating Section Interactive */
    .rating-section-container {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    .rating-section.interactive .stars {
        cursor: pointer;
    }
    .rating-section.interactive .stars .star-input {
        color: #ccc;
        transition: color 0.2s, transform 0.2s;
    }
    .rating-section.interactive .stars:hover .star-input {
        color: #ffc107;
    }
    .rating-section.interactive .stars .star-input:hover ~ .star-input {
        color: #ccc;
    }
    .rating-section.interactive .stars .star-input.selected,
    .rating-section.interactive .stars .star-input.hovered {
        color: #ffc107;
        transform: scale(1.1);
    }

    .rating-section .rating-text {
        color: var(--theme-text-muted);
        margin-left: 0.5rem;
    }

    .meta-info {
        list-style: none;
        padding: 0;
        margin: 1.5rem 0 0;
    }
    .meta-info li {
        display: flex;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--theme-border);
        font-size: 0.85rem; /* Smaller font size */
    }
    .meta-info li:last-child {
        border-bottom: none;
    }
    .meta-info .meta-label {
        font-weight: 600;
        color: var(--theme-text-muted);
        margin-right: 0.5rem;
    }
    .meta-info .meta-label::after {
        content: ':';
    }
    .meta-info .meta-value {
        color: var(--theme-text);
    }
    .meta-info .meta-value a { color: inherit; text-decoration: none; }
    .meta-info .meta-value a:hover { text-decoration: underline; }

    .book-statistics .stat-item {
        background: linear-gradient(135deg, var(--theme-bg) 0%, var(--theme-border) 100%);
        border: 1px solid var(--theme-border);
        border-radius: 8px;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--theme-text-muted);
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        flex: 1;
        text-align: center;
        min-width: 0;
    }
    .book-statistics .stat-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    /* Anlamli renkler (mavi=goruntulenme, yesil=okuma) KORUNDU ama sabit
       degerden belirtece cevrildi: sabit kaldiklarinda koyu temada acik mavi/
       yesil parlak lekeler olarak kaliyorlardi (ekran goruntusuyle yakalandi).
       Ayrica acik temadaki metin renkleri gradyanin koyu ucunda kontrast
       sinirinin ALTINDAYDI (4.09 ve 3.81); belirtec degerleri duzeltildi. */
    .book-statistics .stat-item.views {
        background: linear-gradient(135deg, var(--ist-gor-zemin1) 0%, var(--ist-gor-zemin2) 100%);
        border-color: var(--ist-gor-kenar);
        color: var(--ist-gor-metin);
    }
    .book-statistics .stat-item.reads {
        background: linear-gradient(135deg, var(--ist-oku-zemin1) 0%, var(--ist-oku-zemin2) 100%);
        border-color: var(--ist-oku-kenar);
        color: var(--ist-oku-metin);
    }
    .book-statistics .stat-item.downloads {
        background: linear-gradient(135deg, var(--theme-bg) 0%, var(--theme-border) 100%);
        border-color: var(--theme-text-muted);
        color: var(--theme-text);
    }
    .book-statistics .stat-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
        opacity: 0.8;
    }
    .book-statistics .stat-number {
        font-size: 1.1rem;
        font-weight: 700;
    }
    @media (max-width: 768px) {
        .book-statistics .stat-item {
            padding: 0.5rem 0.75rem;
            font-size: 0.8rem;
        }
        .book-statistics .stat-label {
            font-size: 0.7rem;
        }
        .book-statistics .stat-number {
            font-size: 1rem;
        }
    }

    .editor-note {
        background-color: var(--theme-bg);
        border-left: 4px solid var(--bs-primary, var(--marka-metin));
        padding: 1.5rem;
        border-radius: 0.25rem;
    }
    .editor-note-title {
        font-weight: 600;
        font-size: 1.1rem;
        color: var(--theme-text);
    }
    .editor-note-text {
        color: var(--theme-text-muted);
        font-size: 0.9rem;
    }

    .action-buttons .btn {
        flex-grow: 1;
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    /* Modern Pill-Style Tabs */
    .book-tabs .nav-tabs {
        border-bottom: none;
        gap: 0.5rem;
    }

    .book-tabs .nav-link {
        color: var(--theme-text-muted);
        background-color: var(--theme-border);
        border: none;
        border-radius: 50rem;
        padding: 0.75rem 1.5rem;
        font-weight: 500;
        transition: all 0.3s ease;
        text-align: center;
    }

    .book-tabs .nav-link:hover {
        background-color: #dee2e6;
    }

    .book-tabs .nav-link.active {
        color: #fff;
        background-color: var(--bs-primary, var(--marka));
        box-shadow: 0 4px 8px rgba(var(--marka-rgb), 0.2);
    }

    .book-tabs .tab-content {
        background-color: var(--theme-surface);
        padding: 2.5rem;
        border: 1px solid var(--theme-border);
        border-radius: 0.5rem;
        margin-top: 1rem; 
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    
    .tab-pane {
        transition: opacity 0.3s ease-in-out;
    }

    .tab-pane:not(.show) {
        opacity: 0;
    }

    /* Yorumlar Alanı Yeni Stil */
    .comments-section {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }
    .comment-card {
        background-color: var(--theme-surface);
        border: 1px solid var(--theme-border);
        border-radius: 8px;
        padding: 1.25rem;
        margin-bottom: 1rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        transition: opacity 0.3s ease;
    }
    .comment-card .comment-header {
        display: flex;
        align-items: center;
        margin-bottom: 0.75rem;
    }
    .comment-card .user-avatar {
        width: 40px;
        height: 40px;
        background-color: var(--bs-primary);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-weight: bold;
        font-size: 1.1rem;
        margin-right: 1rem;
    }
    .comment-card .comment-meta {
        flex-grow: 1;
    }
    .comment-card .user-name {
        font-weight: 600;
        color: var(--theme-text);
        margin: 0;
    }
    .comment-card .comment-date {
        font-size: 0.8rem;
        color: var(--theme-text-muted);
    }
    .comment-card .comment-rating .fa-star {
        color: #ffc107;
    }
    .comment-card .comment-body {
        color: var(--theme-text-muted);
        line-height: 1.6;
        white-space: pre-wrap; /* Satır sonlarını koru */
    }
    .comment-card .comment-actions {
        display: flex;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    .comment-card .comment-actions .btn-action {
        background: none;
        border: none;
        color: var(--theme-text-muted);
        font-size: 0.85rem;
        font-weight: 500;
        padding: 0.25rem 0.5rem;
        cursor: pointer;
        transition: color 0.2s;
    }
    .comment-card .comment-actions .btn-action:hover {
        color: var(--bs-primary);
    }
    .comment-replies {
        margin-left: 2.5rem;
        padding-left: 1.5rem;
        border-left: 2px solid var(--theme-border);
        margin-top: 1rem;
    }
    .comment-form-container {
        margin-top: 1rem;
        display: none; /* Başlangıçta gizli */
    }
    .comment-form-main {
        background-color: var(--theme-bg);
        padding: 2rem;
        border-radius: 8px;
        margin-top: 2rem;
    }
    .rating-stars-input .star { font-size: 1.5rem; color: #ccc; cursor: pointer; transition: color 0.2s; }
    .rating-stars-input .star:hover,
    .rating-stars-input .star.selected { color: #ffc107; }

    /* Sayfalama */
    .pagination .page-link {
        color: var(--bs-primary);
    }
    .pagination .page-item.active .page-link {
        background-color: var(--bs-primary);
        border-color: var(--bs-primary);
    }
    .pagination .page-item.disabled .page-link {
        color: var(--theme-text-muted);
    }

    /* İlgili Kitaplar */
    .related-books-section .card { transition: all 0.3s ease; }
    .related-books-section .card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }

    .section-title-wrapper {
    position: relative;
    background-color: var(--theme-surface);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid var(--theme-border);
    text-align: center;
    overflow: hidden;
    }
    .section-title-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 8px;
        background: linear-gradient(90deg, var(--bs-primary), var(--bs-success));
    }
    .section-title-wrapper h2 {
        margin: 0;
        font-weight: 700;
        color: var(--theme-text);
        font-size: 1.8rem;
        display: inline-block;
        vertical-align: middle;
    }
    .section-title-wrapper i {
        color: var(--bs-primary);
        margin-right: 1rem;
        font-size: 1.8rem;
        vertical-align: middle;
    }

    .rating-notification {
        padding: 0.5rem 1rem;
        border-radius: 5px;
        color: #fff;
        text-align: center;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        font-size: 0.9rem;
        margin-left: 1rem;
    }

    .rating-notification.show {
        opacity: 1;
    }

    .rating-notification.success {
        background-color: #28a745;
    }

    .rating-notification.error {
        background-color: #dc3545;
    }

    /* Destek Ol Sekmesi Stilleri */
    .support-section {
        text-align: center;
        background: linear-gradient(135deg, #f5f7fa 0%, #e9f0f7 100%);
        padding: 3rem;
        border-radius: 15px;
    }
    .support-section .icon {
        font-size: 2.5rem;
        color: var(--bs-primary);
        margin-bottom: 1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background-color: var(--theme-surface);
        width: 80px;
        height: 80px;
        border-radius: 50%;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .support-section h4 {
        font-weight: 700;
        color: #2c3e50;
        margin-bottom: 1rem;
    }
    .support-section .lead {
        font-size: 1.1rem;
        color: var(--theme-text-muted);
        max-width: 650px;
        margin: 0 auto 2rem auto;
    }
    .purchase-links-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
        margin-top: 2.5rem;
    }
    .purchase-link-btn {
        background-color: var(--theme-surface);
        border: 1px solid var(--theme-border);
        border-radius: 10px;
        padding: 1.5rem 1rem;
        text-align: center;
        text-decoration: none;
        color: #333;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    }
    .purchase-link-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        color: var(--bs-primary);
        border-color: var(--bs-primary);
    }
    .purchase-link-btn .platform-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
        display: block;
        color: var(--bs-primary);
    }

    /* Yazar Hakkında Kartı Stilleri */
    .author-card {
        background-color: var(--theme-surface);
        border-radius: 15px;
        padding: 2rem;
        box-shadow: 0 8px 25px rgba(0,0,0,0.08);
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .author-card-header {
        display: flex;
        align-items: center;
        width: 100%;
        margin-bottom: 1.5rem;
    }
    .author-card .author-image {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        object-fit: cover;
        margin-right: 2rem;
        border: 5px solid #fff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .author-card .author-info {
        flex-grow: 1;
    }
    .author-card .author-info h4 {
        font-weight: 700;
        margin-bottom: 0.25rem;
    }
    .author-card .author-info .text-muted {
        font-weight: 500;
    }
    .author-card .author-bio {
        text-align: left;
        width: 100%;
        border-top: 1px solid var(--theme-border);
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }
    .author-social-links {
        margin-top: 1rem;
    }
    .author-social-links a {
        color: var(--theme-text-muted);
        font-size: 1.5rem;
        margin: 0 0.75rem;
        transition: color 0.3s ease, transform 0.3s ease;
    }
    .author-social-links a:hover {
        color: var(--bs-primary);
        transform: scale(1.2);
    }
