/*
Theme Name: Manga Starter
Theme URI: https://yourdomain.com
Author: Admin
Description: A MangaKatana-style multi-manga directory theme for WordPress with Comic Easel support.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: manga-starter
*/

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-body: #f1f1f1;
    --bg-white: #ffffff;
    --bg-light: #f8f8f8;
    --bg-input: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #767676;
    --accent-red: #d32f2f;
    --accent-blue: #2196f3;
    --accent-green: #4caf50;
    --accent-orange: #ff9800;
    --accent-gold: #2196f3;
    --border-color: #e0e0e0;
    --border-light: #eeeeee;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
    --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --radius: 4px;
    --radius-lg: 8px;
    --transition: all 0.2s ease;
    --max-width: 1100px;
}

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus {
    position: absolute;
    top: 5px;
    left: 5px;
    width: auto;
    height: auto;
    clip: auto;
    background: #1976d2;
    color: #fff;
    padding: 10px 15px;
    z-index: 100000;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #1565c0;
}

/* Accessibility: Visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== SITE HEADER ========== */
.site-header {
    max-width: var(--max-width);
    margin: 20px auto 15px;
    padding: 0 20px;
    background: transparent;
    border-bottom: none;
}

.header-inner {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    font-size: 24px;
    font-weight: 900;
    white-space: nowrap;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.site-logo img {
    max-height: 90px;
    width: auto;
    display: block;
}

.site-logo .logo-manga {
    color: #333333;
}

.site-logo .logo-kata {
    color: #2196f3;
}

.header-search {
    flex: 1;
    max-width: 450px;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.header-search select {
    padding: 10px 12px;
    border: none;
    border-right: 1px solid var(--border-color);
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-main);
    cursor: pointer;
    outline: none;
}

.header-search input {
    flex: 1;
    padding: 9px 14px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search button {
    padding: 9px 14px;
    border: none;
    background: #1976d2;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search button:hover {
    background: #1565c0;
}

.header-search button svg {
    width: 16px;
    height: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.header-actions a {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.header-actions a:hover {
    color: var(--accent-red);
}

/* ========== NAV MENU ========== */
.site-nav {
    max-width: var(--max-width);
    margin: 0 auto 20px;
    padding: 0 20px;
}

.nav-inner {
    background: #1976d2;
    border-bottom: 2px solid #1565c0;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
}

.nav-toggle {
    background: none;
    border: none;
    padding: 12px 15px 12px 0;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: #ffeb3b;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    color: #ffeb3b;
}

/* ========== MAIN CONTENT ========== */
.site-main {
    max-width: var(--max-width);
    margin: 20px auto;
    padding: 0 20px;
}

/* ========== SECTION HEADERS ========== */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-red);
}

.section-header h2 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header .star-icon {
    color: var(--accent-orange);
    font-size: 16px;
}

/* ========== MANGA LIST CARDS (Homepage) ========== */
.manga-list {
    display: flex;
    flex-direction: column;
}

.manga-list-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed #ccc;
    align-items: flex-start;
}

.manga-list-item:last-child {
    border-bottom: none;
}

/* Cover thumbnail */
.manga-list-cover {
    flex-shrink: 0;
    width: 70px;
}

.manga-list-cover a {
    display: block;
}

.manga-list-cover img {
    width: 70px;
    height: 100px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid #ddd;
}

.manga-list-cover .no-cover {
    width: 70px;
    height: 100px;
    background: #f0f0f0;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 10px;
}

/* Middle info section */
.manga-list-info {
    flex: 1;
    min-width: 0;
}

.manga-list-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 1.3;
}

.manga-list-title a {
    color: #1a1a2e;
}

.manga-list-title a:hover {
    color: var(--accent-blue);
}

.manga-list-title .update-info {
    color: #d32f2f;
    font-size: 12px;
    font-weight: 600;
}

.manga-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--text-muted);
    align-items: center;
}

.manga-list-meta .status-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.manga-list-meta .status-tag.ongoing {
    background: #e8f5e9;
    color: #388e3c;
}

.manga-list-meta .status-tag.completed {
    background: #fff3e0;
    color: #e65100;
}

.manga-list-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 3px;
}

.manga-list-genres .genre-tag {
    display: inline-block;
    padding: 1px 6px;
    background: #e8f0fe;
    color: #1a73e8;
    font-size: 10px;
    border-radius: 2px;
    font-weight: 500;
}

.manga-list-synopsis {
    font-size: 11px;
    color: #777;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

/* Chapter links */
.manga-list-chapters {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 3px;
}

.manga-list-chapters .chapter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.manga-list-chapters .chapter-link a {
    color: var(--accent-blue);
    font-weight: 600;
}

.manga-list-chapters .chapter-link a:hover {
    color: #1565c0;
    text-decoration: underline;
}

.manga-list-chapters .chapter-date {
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
}

/* Right side: chapter thumbnails */
.manga-list-thumbs {
    flex-shrink: 0;
    display: flex;
    gap: 5px;
    align-items: flex-start;
}

.manga-list-thumbs .chap-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 65px;
}

.manga-list-thumbs .chap-thumb img {
    width: 65px;
    height: 85px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid #ddd;
}

.manga-list-thumbs .chap-thumb .chap-label {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
    text-align: center;
    white-space: nowrap;
}

/* Time info row */
.manga-list-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.manga-list-time svg {
    width: 12px;
    height: 12px;
}

/* ========== MK-LAYOUT: MANGAKATANA STYLE ========== */
.mk-layout {
    max-width: var(--max-width);
    margin: 20px auto;
    padding: 0 20px;
}

/* --- 1. Top Slider (Hot Updates) --- */
.hot-updates-slider {
    margin-bottom: 30px;
    background: var(--bg-white);
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.slider-container {
    overflow: hidden;
    position: relative;
    padding-bottom: 5px;
}

.mk-hot-track {
    display: flex;
    gap: 15px;
    transition: transform 0.4s ease-in-out;
}

.hot-item {
    flex: 0 0 auto;
    width: 140px;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.hot-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hot-item img {
    width: 140px;
    height: 200px;
    object-fit: cover;
    display: block;
}

.hot-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 20px 10px 10px;
    color: #fff;
    font-size: 12px;
}

.hot-title {
    display: block;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.hot-chapter {
    display: block;
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 11px;
}

/* --- Content Wrapper (Main + Sidebar) --- */
.mk-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.mk-main-column {
    flex: 1;
    min-width: 0;
    background: var(--bg-white);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.mk-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--bg-white);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

/* --- 2. Main Content (Updates List) --- */
.updates-list {
    display: flex;
    flex-direction: column;
}

.update-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px dashed var(--border-color);
}

.update-item:last-child {
    border-bottom: none;
}

.update-cover {
    flex-shrink: 0;
    width: 80px;
}

.update-cover img {
    width: 80px;
    height: 115px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.update-info {
    flex: 1;
    min-width: 0;
}

.update-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.update-title a {
    color: var(--text-primary);
}

.update-title a:hover {
    color: var(--accent-gold);
}

.update-chapters {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chap-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.chap-link {
    font-weight: 600;
    color: var(--text-primary);
}

.chap-link:hover {
    color: var(--accent-gold);
}

.chap-time {
    color: var(--text-muted);
    font-style: italic;
    font-size: 11px;
}

/* --- 3. Right Sidebar (Top Manga) --- */
.widget-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.widget-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
}

.top-manga-list {
    display: flex;
    flex-direction: column;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.top-item:last-child {
    border-bottom: none;
}

.top-rank {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.top-rank.rank-1 {
    color: #facc15;
}

/* Gold */
.top-rank.rank-2 {
    color: #94a3b8;
}

/* Silver */
.top-rank.rank-3 {
    color: #b45309;
}

/* Bronze */

.top-cover {
    flex-shrink: 0;
    width: 45px;
}

.top-cover img {
    width: 45px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
}

.top-info {
    flex: 1;
    min-width: 0;
}

.top-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-title a {
    color: var(--text-primary);
}

.top-title a:hover {
    color: var(--accent-gold);
}

.top-chapter {
    font-size: 11px;
    color: var(--accent-gold);
}

/* Responsive Layout */
@media (max-width: 860px) {
    .mk-content-wrapper {
        flex-direction: column;
    }

    .mk-sidebar {
        width: 100%;
    }
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.pagination .current {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

/* ========== MANGA DETAIL PAGE ========== */
.manga-detail {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
}

.manga-detail-header {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
}

.manga-detail-cover {
    flex-shrink: 0;
    width: 200px;
}

.manga-detail-cover img {
    width: 200px;
    height: 280px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.manga-detail-info {
    flex: 1;
}

.manga-detail-info h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-red);
    margin-bottom: 15px;
}

.manga-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.manga-detail-meta .meta-row {
    display: flex;
    gap: 8px;
    font-size: 13px;
}

.manga-detail-meta .meta-label {
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.manga-detail-meta .meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

.manga-detail-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ═══ Manga Info Card (Cover + Details side by side) ═══ */
.manga-info-card {
    display: flex;
    gap: 30px;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
}

.manga-info-cover {
    position: relative;
    flex-shrink: 0;
    width: 200px;
}

.manga-info-cover img {
    width: 100%;
    border-radius: 6px;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.manga-info-cover .status-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
}

.no-cover-placeholder {
    width: 200px;
    height: 280px;
    background: var(--bg-white);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.manga-info-details {
    flex: 1;
    min-width: 0;
}

.manga-info-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent-blue);
    margin: 0 0 18px 0;
    line-height: 1.3;
}

.manga-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.manga-info-table tr {
    border-bottom: 1px solid var(--border-light);
}

.manga-info-table td {
    padding: 8px 0;
    vertical-align: top;
}

.manga-info-table .info-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    width: 140px;
    white-space: nowrap;
    padding-right: 15px;
}

.manga-info-table .info-value {
    color: var(--text-primary);
    font-size: 13px;
}

.genre-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.genre-tags-inline .genre-tag {
    padding: 3px 10px;
    font-size: 11px;
}

.manga-info-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-first {
    background: var(--accent-gold);
    color: #000;
}

.btn-first:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.btn-latest {
    background: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
}

.btn-latest:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-1px);
}

/* ═══ Description Card ═══ */
.manga-description-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
}

.manga-description-card .section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-blue);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-blue);
    display: inline-block;
}

.manga-description-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

/* ═══ Responsive ═══ */
@media (max-width: 640px) {
    .manga-info-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 15px;
    }

    .manga-info-cover {
        width: 160px;
    }

    .manga-info-title {
        font-size: 20px;
    }

    .manga-info-table .info-label {
        width: 110px;
        font-size: 12px;
    }

    .manga-info-table .info-value {
        font-size: 12px;
    }

    .genre-tags-inline {
        justify-content: center;
    }

    .manga-info-actions {
        justify-content: center;
    }
}




.manga-detail-status.ongoing {
    background: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.manga-detail-status.completed {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

/* Synopsis */
.manga-detail-synopsis {
    margin-bottom: 25px;
}

.manga-detail-synopsis h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-red);
    display: inline-block;
}

.manga-detail-synopsis p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
}

/* Chapter List */
.chapter-list-section {
    margin-top: 25px;
}

.chapter-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chapter-list-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.chapter-list-search {
    position: relative;
    width: 250px;
}

.chapter-list-search input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font-main);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.chapter-list-search input:focus {
    border-color: var(--accent-blue);
}

.chapter-list-search .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.chapter-list-search .search-icon svg {
    width: 14px;
    height: 14px;
}

.chapter-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.chapter-list-grid::-webkit-scrollbar {
    width: 6px;
}

.chapter-list-grid::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.chapter-list-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.chapter-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

.chapter-list-item:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.chapter-list-item .chapter-date {
    font-size: 11px;
    color: var(--text-muted);
}

.chapter-list-item.hidden {
    display: none;
}

/* First/Last Chapter Buttons */
.chapter-nav-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chapter-nav-btns a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-white);
    border: 2px solid var(--accent-blue);
    border-radius: var(--radius);
    color: var(--accent-blue);
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
}

.chapter-nav-btns a:hover {
    background: var(--accent-blue);
    color: #fff;
}

/* ========== CHAPTER READER ========== */
.reader-hero {
    position: relative;
    width: 100%;
    max-width: var(--max-width);
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 20px auto 0;
}

.reader-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.reader-hero-overlay h1 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}

.chapter-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 5px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.breadcrumb-bar {
    background: var(--bg-white);
    max-width: var(--max-width);
    margin: 5px auto 0;
    padding: 12px 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.breadcrumb-bar a {
    color: var(--accent-blue);
    text-decoration: none;
}

.breadcrumb-bar a:hover {
    text-decoration: underline;
}

.breadcrumb-bar a.home-crumb {
    color: var(--accent-red);
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-bar span {
    color: var(--text-muted);
}

.breadcrumb-bar .current-crumb {
    color: var(--text-primary);
    font-weight: 600;
}

.reader-header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.reader-nav-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 700px;
    margin: 0 auto 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.reader-nav-bar .nav-arrow {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 50px;
    min-height: 44px;
    color: var(--accent-blue);
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
    flex-shrink: 0;
}

.reader-nav-bar .nav-arrow:hover {
    background: rgba(245, 158, 11, 0.1);
}

.reader-nav-bar .nav-arrow.disabled {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: default;
}

.nav-chapter-select {
    flex: 1;
    position: relative;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.nav-chapter-select select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: none;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    appearance: none;
    outline: none;
}

.nav-chapter-select select option {
    background: var(--bg-light);
    color: var(--text-primary);
}

.nav-chapter-select .select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

.reader-images {
    max-width: 800px;
    margin: 0 auto;
}

.reader-images img {
    width: 100%;
    display: block;
    margin: 0 auto;
}

/* About Manga Box (single-comic) */
.about-manga-box {
    max-width: var(--max-width);
    margin: 30px auto;
    padding: 25px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.about-manga-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 10px;
}

.about-manga-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.about-manga-col h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 10px;
}

.about-manga-col img {
    width: 100%;
    max-width: 250px;
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.about-manga-col p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-manga-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.about-manga-card {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 15px;
}

.about-manga-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 8px;
}

.about-manga-card img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.about-manga-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.key-elements-box {
    max-width: var(--max-width);
    margin: 0 auto 30px;
    padding: 25px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.key-elements-box h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.key-elements-list {
    list-style: disc;
    padding-left: 20px;
}

.key-elements-list li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.6;
}

.key-elements-list li strong {
    color: var(--text-primary);
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    padding: 30px 20px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 13px;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--accent-red);
}

.footer-credit {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.8;
}

/* ========== SCROLL TO TOP ========== */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 9999;
}

#scrollTopBtn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

/* ========== NO RESULTS ========== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .header-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

    .header-search select {
        display: none;
    }

    .header-actions {
        font-size: 12px;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .nav-links a {
        padding: 10px 12px;
        font-size: 12px;
    }

    .manga-card-inner {
        flex-direction: column;
    }

    .manga-card-cover {
        width: 120px;
    }

    .manga-card-cover img {
        width: 120px;
        height: 165px;
    }

    /* Manga list responsive */
    .manga-list-thumbs {
        display: none;
    }

    .manga-list-cover {
        width: 65px;
    }

    .manga-list-cover img {
        width: 65px;
        height: 90px;
    }

    .manga-list-title {
        font-size: 14px;
    }

    .manga-detail-header {
        flex-direction: column;
    }

    .manga-detail-cover {
        width: 150px;
        margin: 0 auto;
    }

    .manga-detail-cover img {
        width: 150px;
        height: 210px;
    }

    .manga-detail-meta {
        grid-template-columns: 1fr;
    }

    .chapter-list-grid {
        grid-template-columns: 1fr;
    }

    .chapter-list-item {
        order: 0 !important;
    }

    .chapter-list-header {
        flex-direction: column;
        gap: 10px;
    }

    .chapter-list-search {
        width: 100%;
    }

    .about-manga-top {
        grid-template-columns: 1fr;
    }

    .about-manga-cards {
        grid-template-columns: 1fr;
    }

    .chapter-nav-btns {
        flex-direction: column;
    }

    .reader-hero-overlay h1 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .site-logo {
        font-size: 22px;
    }

    .manga-card {
        padding: 15px;
    }

    .manga-card-title {
        font-size: 15px;
    }

    .reader-nav-bar {
        border-radius: var(--radius);
    }
}

/* ================================================================
   MK FULL LAYOUT — Slider + 2-Column (Main + Sidebar)
   ================================================================ */

.mk-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── HOT UPDATES BANNER ─────────────────────────────── */
.mk-hot-banner {
    background: #2196f3;
    border-radius: 4px;
    padding: 14px 14px 16px;
    margin: 14px 0;
    overflow: hidden;
}

.mk-hot-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.mk-hot-star {
    color: #ffeb3b;
    font-size: 16px;
    line-height: 1;
}

.mk-hot-title {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
}

.mk-hot-arrows {
    display: flex;
    gap: 6px;
}

.mk-arrow-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.mk-arrow-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: #fff;
}

.mk-hot-track-wrap {
    overflow: hidden;
}

.mk-hot-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.mk-hot-track::-webkit-scrollbar {
    display: none;
}

.mk-hot-item {
    flex-shrink: 0;
    width: 148px;
    display: block;
    text-decoration: none;
    color: inherit;
}

.mk-hot-cover {
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.mk-hot-cover img {
    width: 148px;
    height: 210px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    transition: transform 0.2s;
}

.mk-hot-item:hover .mk-hot-cover img {
    transform: scale(1.03);
}

.mk-hot-nocov {
    width: 148px;
    height: 210px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.mk-hot-info {
    padding: 0 2px;
}

.mk-hot-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mk-hot-ch {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.mk-hot-ch svg {
    flex-shrink: 0;
    opacity: 0.8;
}

/* ── 2-COLUMN WRAPPER ───────────────────────────────── */
.mk-columns {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* ── MAIN COLUMN ────────────────────────────────────── */
.mk-main {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
}

/* ── SECTION HEADER ─────────────────────────────────── */
.mk-section-hdr {
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid #f44336;
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.mk-star {
    color: #f59e0b;
    font-size: 14px;
}

.mk-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── MANGA LIST ROWS ─────────────────────────────────── */
.mk-list {
    display: flex;
    flex-direction: column;
}

.mk-row {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px dashed #d5d5d5;
    align-items: flex-start;
}

.mk-row:last-child {
    border-bottom: none;
}

/* Cover */
.mk-row-cover {
    flex-shrink: 0;
    width: 155px;
}

.mk-row-cover a {
    display: block;
}

.mk-row-cover img {
    width: 155px;
    height: 220px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #ddd;
    display: block;
}

.mk-no-cover {
    width: 155px;
    height: 220px;
    background: #eee;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #aaa;
}

/* Status badge under cover */
.mk-cover-status {
    margin-top: 5px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.mk-cover-status.ongoing {
    background: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.mk-cover-status.completed {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

/* Info middle */
.mk-row-info {
    flex: 1;
    min-width: 0;
}

.mk-row-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.mk-row-title a {
    color: #cc0000;
    text-decoration: none;
}

.mk-row-title a:hover {
    color: #1a73e8;
}

.mk-ch-badge {
    color: #1a73e8;
    font-size: 13px;
    font-weight: 400;
    margin-left: 4px;
}

/* Time row: clock + First Chapter */
.mk-row-timebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: 12px;
    color: #888;
}

.mk-time-ago {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #888;
}

.mk-time-ago svg {
    width: 13px;
    height: 13px;
    color: #aaa;
}

.mk-first-ch {
    color: #1a73e8;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.mk-first-ch:hover {
    color: #cc0000;
    text-decoration: underline;
}

.mk-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 5px;
    font-size: 12px;
    color: #888;
}

.mk-author {
    color: #1a73e8;
}

.mk-status {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 2px;
    text-transform: uppercase;
}

.mk-status.ongoing {
    background: #e8f5e9;
    color: #388e3c;
}

.mk-status.completed {
    background: #fff3e0;
    color: #e65100;
}

.mk-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 7px;
}

.mk-genre {
    font-size: 11px;
    color: #1a73e8;
    font-weight: 600;
    background: transparent;
    border: 1px solid #1a73e8;
    padding: 2px 6px;
    border-radius: 2px;
    text-decoration: none;
}

.mk-synopsis {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 5px 0 8px;
}

.mk-synopsis.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mk-read-more {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 18px;
    border: 1px dashed #aaa;
    border-radius: 3px;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    background: none;
    transition: all 0.2s;
}

.mk-read-more:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.mk-chapters {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
}

.mk-chap-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.mk-chap-link {
    color: #1a73e8;
    font-weight: 600;
    text-decoration: none;
}

.mk-chap-link:hover {
    color: #cc0000;
    text-decoration: underline;
}

.mk-chap-time {
    color: #aaa;
    font-size: 10px;
    font-style: italic;
    white-space: nowrap;
    margin-left: 6px;
}

/* Right chapter thumbnails */
.mk-row-thumbs {
    flex-shrink: 0;
    display: flex;
    gap: 4px;
    align-items: flex-start;
}

.mk-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 58px;
}

.mk-thumb img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid #ddd;
    display: block;
}

.mk-thumb-label {
    font-size: 9px;
    color: #888;
    margin-top: 2px;
    text-align: center;
    white-space: nowrap;
}

/* ── RIGHT SIDEBAR ───────────────────────────────────── */
.mk-sidebar {
    flex-shrink: 0;
    width: 260px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
}

.mk-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mk-sb-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #efefef;
    align-items: flex-start;
}

.mk-sb-item:last-child {
    border-bottom: none;
}

.mk-sb-cover {
    flex-shrink: 0;
    display: block;
    width: 85px;
}

.mk-sb-cover img {
    width: 85px;
    height: 120px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #ddd;
    display: block;
}

.mk-sb-info {
    flex: 1;
    min-width: 0;
}

.mk-sb-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mk-sb-title:hover {
    color: #1a73e8;
}

.mk-sb-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 2px;
    text-transform: capitalize;
    margin-bottom: 3px;
}

.mk-sb-status.ongoing {
    background: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.mk-sb-status.completed {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.mk-sb-ch-num {
    display: block;
    font-size: 11px;
    color: #1a73e8;
    font-weight: 600;
}

.mk-sb-ch {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #595959;
    gap: 4px;
}

.mk-sb-ch a {
    color: #1a73e8;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.mk-sb-ch a:hover {
    color: #cc0000;
}

.mk-sb-ch span {
    color: #767676;
    font-size: 9px;
    white-space: nowrap;
}

.mk-empty {
    text-align: center;
    padding: 30px;
    color: #767676;
    font-size: 14px;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
    .mk-columns {
        flex-direction: column;
    }

    .mk-sidebar {
        width: 100%;
    }

    .mk-row-thumbs {
        display: none;
    }
}

@media (max-width: 600px) {
    .mk-slider-section {
        gap: 6px;
    }

    .mk-slide-item {
        width: 90px;
    }

    .mk-slide-item img {
        width: 90px;
        height: 126px;
    }
}

/* ========== MK PAGINATION ========== */
.mk-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 20px 0 10px;
}

.mk-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.mk-page-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

.mk-page-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
    pointer-events: none;
}

.mk-page-next {
    font-size: 18px;
    padding: 0 12px;
}

.mk-page-dots {
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 4px;
    user-select: none;
}

/* ================================================================
   MANGADEX STYLE SEARCH RESULTS (.mdex-search-card)
   ================================================================ */

.mdex-search-card {
    display: flex;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* very soft shadow */
    margin-bottom: 25px;
    padding: 20px;
    overflow: hidden;
    gap: 25px;
    border: 1px solid #f0f0f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mdex-search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); /* slightly stronger on hover */
}

/* --- Left: Cover --- */
.mdex-sc-cover {
    flex-shrink: 0;
    width: 140px; /* fixed width for cover */
}

.mdex-sc-cover img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* inner shadow for image depth */
}

.mdex-no-cover {
    width: 100%;
    height: 200px;
    background: #f4f4f5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
    font-size: 13px;
    font-weight: 500;
}

/* --- Right: Details --- */
.mdex-sc-details {
    flex: 1;
    min-width: 0; /* prevents flex blowout */
    display: flex;
    flex-direction: column;
}

.mdex-sc-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.mdex-sc-title a {
    color: #111827; /* Near black */
    text-decoration: none;
    transition: color 0.2s;
}

.mdex-sc-title a:hover {
    color: #2563eb; /* Blue highlight */
}

/* -- Rating -- */
.mdex-sc-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563; /* Dark gray */
    margin-bottom: 12px;
}

.mdex-star {
    color: #fbbf24; /* yellow/gold */
    font-size: 16px;
}

/* -- Outline Tags -- */
.mdex-sc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mdex-tag {
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: transparent;
    border: 1px solid #3b82f6;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: capitalize;
}

/* -- Meta Rows -- */
.mdex-sc-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.mdex-meta-row {
    font-size: 13px;
    color: #4b5563;
}

.mdex-meta-label {
    font-weight: 700;
    color: #111827;
    margin-right: 4px;
}

.mdex-meta-value {
    color: #374151;
}

/* -- Synopsis -- */
.mdex-sc-synopsis {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb; /* faint divider line above summary */
}

/* === RESPONSIVE RULES === */
@media (max-width: 640px) {
    .mdex-search-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 15px;
    }
    
    .mdex-sc-cover {
        width: 120px;
    }
    
    .mdex-sc-cover img, .mdex-no-cover {
        height: 170px;
    }
    
    .mdex-sc-title {
        font-size: 18px;
    }
    
    .mdex-sc-synopsis {
        padding-top: 12px;
        font-size: 13px;
    }
}