/* Search and Archive Page */
.mangadex-search-container { margin-bottom: 2em; }
.manga-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.manga-item a { text-decoration: none; color: #333; display: block; }
.manga-item img { width: 100%; height: 255px; object-fit: cover; border-radius: 5px; border: 1px solid #ddd; margin-bottom: 5px; }
.manga-item h4 { margin: 5px 0 0 0; font-size: 15px; line-height: 1.3; height: 3.9em; overflow: hidden; }

/* Single Manga Page */
.mangadex-single-container .manga-header { display: flex; flex-wrap: wrap; gap: 25px; margin-bottom: 30px; }
.mangadex-single-container .manga-header img { width: 250px; height: auto; object-fit: cover; border-radius: 5px; }
.mangadex-single-container .manga-info { flex: 1; min-width: 300px; }
.manga-chapters-list ul { list-style: none; padding: 0; }
.manga-chapters-list li { padding: 10px; border-bottom: 1px solid #eee; transition: background-color 0.2s; }
.manga-chapters-list li:hover { background-color: #f9f9f9; }
.manga-chapters-list li a { text-decoration: none; color: #0073aa; font-weight: 500; }

/* Chapter Reader Page */
.mangadex-reader-container { text-align: center; }
.reader-images img { 
    display: block; 
    max-width: 100%; 
    height: auto; 
    margin: 0 auto 5px auto; 
    border: 1px solid #f0f0f0; 
    /* Jab tak image load na ho, uski jagah par halka sa background dikhayein */
    min-height: 300px;
    background-color: #f5f5f5;
}

/* --- NEW STYLES for Ads and Navigation --- */

/* Ad Spot Styling */
.mangadex-ad-spot {
    margin: 25px auto;
    text-align: center;
    min-height: 50px; /* Ad ke load hone tak jagah banaye rakhein */
    width: 100%;
}

/* Reader Navigation Styling */
.reader-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 10px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.reader-navigation .nav-button {
    text-decoration: none;
    color: #0073aa;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.reader-navigation .nav-button:hover {
    background-color: #e0e0e0;
}
.reader-navigation .nav-disabled {
    color: #999;
    cursor: not-allowed;
    background-color: transparent;
}
.reader-navigation .current-chapter-title {
    font-size: 1.1em;
    font-weight: 500;
    color: #555;
    text-align: center;
}