body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Telefonlarda metin seçimini daha kolay hale getirmek için */
    -webkit-text-size-adjust: 100%; 
    text-size-adjust: 100%;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* General link styling */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #2980b9;
}

.dark-mode a {
    color: #8e44ad;
}

/* Scrollbar Styling (Webkit - Chrome, Safari) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dark-mode::-webkit-scrollbar-track {
    background: #333;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.dark-mode::-webkit-scrollbar-thumb {
    background: #555;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.dark-mode::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Settings Sidebar (manga-chapters-sidebar) and Chapter List Overlay */
#manga-chapters-sidebar,
#manga-chapter-list-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; /* Responsive width */
    max-width: 450px; /* Max width for larger screens */
    background-color: rgba(30, 30, 30, 0.95);
    color: white;
    padding: 25px;
    border-radius: 12px;
    z-index: 10000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    max-height: 80vh; /* Max height relative to viewport */
    overflow-y: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none; /* Controlled by JS */
}

/* Headings within overlays */
#manga-chapters-sidebar h1,
#manga-chapter-list-overlay h1,
#manga-chapters-sidebar h5,
#manga-chapter-list-overlay h5 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

/* Horizontal rule within overlays */
#manga-chapters-sidebar hr,
#manga-chapter-list-overlay hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

/* Styling for Madara's chapter list classes within the overlay */
#manga-chapter-list-overlay ul.main.version-chap {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#manga-chapter-list-overlay li.wp-manga-chapter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}


#manga-chapter-list-overlay li.wp-manga-chapter a {
    flex-grow: 1;
    color: #000000; /* Changed from #000000 to a lighter color for dark overlay */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0;
    border-radius: 0px; /* This was already 0px, keeping it */
}

#manga-chapter-list-overlay li.wp-manga-chapter a:hover {
    color: #f1c40f;
    background-color: transparent;
}

#manga-chapter-list-overlay li.wp-manga-chapter:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Chapter release date (if reintroduced) - kept for completeness */
#manga-chapter-list-overlay span.chapter-release-date {
    font-size: 0.85em;
    color: #bbb;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Input checkbox styling for settings sidebar */
#manga-chapters-sidebar input[type="checkbox"] {
    margin-right: 10px;
    /* Custom checkbox styling if desired */
}
#manga-chapters-sidebar label {
    cursor: pointer;
    color: #e0e0e0;
}

/* Bottom Menu (manga-bottom-menu) */
#manga-bottom-menu {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: #2c2c2c;
    z-index: 9999;
    padding: 10px 0;
    transition: bottom 0.3s ease;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
}

#manga-bottom-menu .container {
    max-width: 100%;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#selected-chapter-title {
    color: #fff;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px; /* Base font size */
    text-align: center;
    max-width: 95vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 10px;
}

#manga-bottom-menu .d-flex {
    width: 100%;
    justify-content: space-around;
    align-items: center;
}

#manga-bottom-menu a,
#manga-bottom-menu button {
    color: #fff;
    font-size: 13px; /* Base button font size */
    background: none;
    border: none;
    outline: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#manga-bottom-menu button:hover,
#manga-bottom-menu a:hover {
    color: #f1c40f;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

#manga-bottom-menu i {
    margin: 0;
    margin-bottom: 4px;
    font-size: 18px; /* Base icon size */
}

/* Okuma Hızı Ayarları Konteyneri */
.reading-speed-container {
    position: fixed; /* Ekran içinde sabit konum */
    right: 20px; /* Sağ kenardan 20px uzaklık */
    top: 50%; /* Dikeyde ortala */
    transform: translateY(-50%) translateX(0); /* Tam dikey ortalama ve başlangıç yatay konumu */
    z-index: 1000; /* Diğer içeriklerin üzerinde görünmesini sağla */
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 10px;
    max-width: 250px; /* Maksimum genişlik */
    opacity: 1; /* Başlangıç opaklığı */
    pointer-events: auto; /* Başlangıçta tıklanabilir */
    /* Geçiş efekti için animasyon tanımları */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Okuma Hızı Ayarları Geçiş Düğmesi */
.reading-speed-toggle-button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px; /* Düğme ile içerik arasında boşluk */
}

.reading-speed-toggle-button:hover {
    background-color: #0056b3;
}

/* Okuma Hızı Ayarları İçeriği (gizlenecek/gösterilecek kısım) */
.reading-speed-settings-content {
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.reading-speed-settings-content h5 {
    margin-top: 0;
    margin-bottom: 10px;
}

.reading-speed-settings-content select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Bildirim Mesajı Stili (Notification) */
#notification, #fullscreen-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none; /* Tıklanmayı engelle */
}

#notification.show, #fullscreen-notification.show {
    opacity: 1;
}

/* Dark Mode İçin Ek Stil (Eğer kullanılıyorsa) */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .reading-speed-container {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .reading-speed-toggle-button {
    background-color: #0056b3;
}

body.dark-mode .reading-speed-settings-content {
    border-top-color: #444;
}

body.dark-mode .reading-speed-settings-content select {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555;
}

/* Arka Planı Gizle Stili */
body.hide-background {
    background-image: none !important;
    background-color: #fff !important; /* Veya istediğin tek bir renk */
}

body.dark-mode.hide-background {
    background-color: #1a1a1a !important;
}

/* Alt Menü (Bottom Menu) için Geçiş */
#manga-bottom-menu {
    transition: bottom 0.3s ease-out;
}

/* Okuma Hızı Ayarları Konteyneri */
.reading-speed-container {
    position: fixed; /* Ekran içinde sabit konum */
    right: 20px; /* Sağ kenardan 20px uzaklık */
    top: 50%; /* Dikeyde ortala */
    transform: translateY(-50%) translateX(0); /* Tam dikey ortalama ve başlangıç yatay konumu */
    z-index: 1000; /* Diğer içeriklerin üzerinde görünmesini sağla */
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 10px;
    max-width: 250px; /* Maksimum genişlik */
    opacity: 1; /* Başlangıç opaklığı */
    pointer-events: auto; /* Başlangıçta tıklanabilir */
    /* Geçiş efekti için animasyon tanımları */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Okuma Hızı Ayarları Geçiş Düğmesi */
.reading-speed-toggle-button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px; /* Düğme ile içerik arasında boşluk */
}

.reading-speed-toggle-button:hover {
    background-color: #0056b3;
}

/* Okuma Hızı Ayarları İçeriği (gizlenecek/gösterilecek kısım) */
.reading-speed-settings-content {
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.reading-speed-settings-content h5 {
    margin-top: 0;
    margin-bottom: 10px;
}

.reading-speed-settings-content select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Bildirim Mesajı Stili (Notification) */
#notification, #fullscreen-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none; /* Tıklanmayı engelle */
}

#notification.show, #fullscreen-notification.show {
    opacity: 1;
}

/* Dark Mode İçin Ek Stil (Eğer kullanılıyorsa) */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .reading-speed-container {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .reading-speed-toggle-button {
    background-color: #0056b3;
}

body.dark-mode .reading-speed-settings-content {
    border-top-color: #444;
}

body.dark-mode .reading-speed-settings-content select {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555;
}

/* Arka Planı Gizle Stili */
body.hide-background {
    background-image: none !important;
    background-color: #fff !important; /* Veya istediğin tek bir renk */
}

body.dark-mode.hide-background {
    background-color: #1a1a1a !important;
}

/* Alt Menü (Bottom Menu) için Geçiş */
#manga-bottom-menu {
    transition: bottom 0.3s ease-out;
}

---


@media (max-width: 768px) { /* Tablet ve daha küçük ekranlar için */
    .reading-speed-container {
        right: 10px; /* Sağdan biraz daha az boşluk */
        max-width: calc(100% - 20px); /* Ekran genişliğinin %100'ü - kenar boşlukları */
        left: 10px; /* Soldan da boşluk bırakarak ortalama */
        transform: translateY(-50%) translateX(0); /* Yeni ortalama pozisyon */
        /* Telefonlarda gizlerken farklı bir transform kullanabiliriz,
           örneğin tamamen sağa itmek yerine alta doğru kaydırmak.
           Ancak mevcut translateX(120%) de telefonlarda iyi çalışacaktır.
           Eğer farklı bir animasyon istersen, aşağıdaki transform'u yorum satırından çıkarabilirsin:
           transform: translateY(120%);
        */
    }

    /* JavaScript tarafından gizlendiğinde uygulanacak transform */
    .reading-speed-container[style*="translateX(120%)"] {
        transform: translateY(-50%) translateX(120%) !important; /* Telefonda da sağa kaydır */
    }

    /* Eğer yukarıdaki farklı bir animasyon tercih edilirse: */
    /*
    .reading-speed-container[style*="translateY(120%)"] {
        transform: translateY(120%) !important;
        top: auto;
        bottom: 20px;
    }
    */
}

@media (max-width: 480px) { /* Çok küçük telefonlar için */
    .reading-speed-container {
        right: 5px; /* Daha dar ekranlarda daha az boşluk */
        left: 5px;
        max-width: calc(100% - 10px); /* Daha dar ekranlarda maksimum genişlik */
        padding: 8px; /* İç boşluğu azalt */
    }

    .reading-speed-toggle-button {
        font-size: 14px; /* Düğme font boyutunu küçült */
        padding: 8px;
    }

    .reading-speed-settings-content select {
        padding: 6px;
        font-size: 14px;
    }
}

/* Dark mode adjustments */
body.dark-mode #manga-bottom-menu {
    background-color: #1c1c1c;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
}

/* Notifications */
#notification,
#fullscreen-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    white-space: nowrap;
}

#notification.show,
#fullscreen-notification.show {
    opacity: 1;
    visibility: visible;
}

/* Hide background feature */
body.hide-background {
    background-color: transparent !important;
    background-image: none !important;
}
body.hide-background #content,
body.hide-background .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ==============================================
   RESPONSIVE ADJUSTMENTS (for smaller screens)
   ============================================== */

@media (max-width: 768px) {
    /* Adjust general padding for overlays on smaller tablets/large phones */
    #manga-chapters-sidebar,
    #manga-chapter-list-overlay {
        padding: 20px;
    }

    /* Adjust font sizes for headings in overlays */
    #manga-chapters-sidebar h1,
    #manga-chapter-list-overlay h1 {
        font-size: 24px;
    }
    #manga-chapters-sidebar h5,
    #manga-chapter-list-overlay h5 {
        font-size: 18px;
    }

    /* Chapter list items */
    #manga-chapter-list-overlay li.wp-manga-chapter {
        padding: 7px 10px;
        font-size: 15px; /* Slightly smaller chapter link font */
    }

    /* Bottom Menu - General */
    #manga-bottom-menu {
        padding: 8px 0; /* Reduce vertical padding */
    }

    #selected-chapter-title {
        font-size: 14px; /* Slightly smaller title */
        margin-bottom: 6px;
    }

    /* Bottom Menu Buttons */
    #manga-bottom-menu a,
    #manga-bottom-menu button {
        font-size: 12px; /* Smaller text on buttons */
        padding: 6px 8px; /* Reduce button padding */
    }

    #manga-bottom-menu i {
        font-size: 16px; /* Slightly smaller icons */
        margin-bottom: 3px;
    }

    /* Notifications - move up slightly to avoid bottom menu */
    #notification,
    #fullscreen-notification {
        bottom: 70px;
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    /* Further adjustments for smaller phones (e.g., iPhone SE, older Androids) */
    #manga-chapters-sidebar,
    #manga-chapter-list-overlay {
        padding: 15px;
        width: 95%; /* Make them take up more width on very small screens */
    }
    
    #manga-chapters-sidebar h1,
    #manga-chapter-list-overlay h1 {
        font-size: 22px;
    }
    #manga-chapters-sidebar h5,
    #manga-chapter-list-overlay h5 {
        font-size: 16px;
    }

    #manga-chapter-list-overlay li.wp-manga-chapter {
        padding: 6px 8px;
        font-size: 14px; /* Even smaller chapter link font */
    }

    /* Bottom Menu - Tighter spacing for very small screens */
    #manga-bottom-menu {
        padding: 5px 0;
    }
    
    #selected-chapter-title {
        font-size: 13px;
        margin-bottom: 5px;
    }

    #manga-bottom-menu a,
    #manga-bottom-menu button {
        font-size: 11px;
        padding: 5px 6px;
    }

    #manga-bottom-menu i {
        font-size: 15px;
        margin-bottom: 2px;
    }

    #notification,
    #fullscreen-notification {
        bottom: 65px; /* Adjust if bottom menu padding changes */
        padding: 7px 12px;
        font-size: 13px;
    }
}