.reader-main{
    padding-bottom: 50px;
}

/* ================= NAV BUTTON ================= */
.reader-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 10px 18px;
    border-radius: 25px;
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
    text-decoration: none;
    font-size: 14px;
    transition: all .25s ease;
}

.nav-btn:hover {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* Nút riêng */
.nav-btn.prev {
    background: #fff3cd;
}
.nav-btn.next {
    background: #d1e7dd;
}
.nav-btn.chapter-btn {
    background: #e2e3e5;
}

/* ================= MODAL ================= */
#chapterModal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

/* ================= LIST GRID ================= */
.chapter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* ITEM */
.chapter-list li {
    margin: 0;
}

/* LINK */
.chapter-list a {
    display: block;
    text-align: center;
    padding: 10px 5px;
    border-radius: 8px;

    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    font-size: 13px;

    border: 1px solid #ddd;

    transition: all .2s ease;
}

/* HOVER */
.chapter-list a:hover {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* ACTIVE CHAPTER */
.chapter-list a.active {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
    font-weight: bold;
}

/* ================= SCROLL ================= */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* ================= MOBILE ================= */
@media(max-width:768px) {
    .chapter-list {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .nav-btn {
        font-size: 13px;
        padding: 8px 14px;
    }
}

.chapter-list a {
    font-weight: 600;
    font-size: 14px;
}

/* ================= SEARCH ================= */
.chapter-search {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chapter-search input {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.chapter-search button {
    padding: 8px 14px;
    border: none;
    background: #0d6efd;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

/* ================= GRID ================= */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}

/* ITEM */
.chapter-cell {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 8px;

    background: #f1f1f1;
    color: #333;
    text-decoration: none;

    border: 1px solid #ddd;

    transition: all .2s ease;
}

/* HOVER */
.chapter-cell:hover {
    background: #0d6efd;
    color: #fff;
}

/* ACTIVE */
.chapter-cell.active {
    background: #dc3545;
    color: #fff;
    font-weight: bold;
}


/* Căn giữa khối nội dung */
.reader-content {
    display: flex;
    justify-content: center;
}

/* Giới hạn chiều rộng + căn giữa text */
.chapter-content {
    max-width: 1300px; /* chỉnh  */
    width: 100%;
    margin: 0 auto;
    text-align: justify; /* đọc truyện đẹp hơn */
}

/* Căn giữa tiêu đề */
.reader-header {
    text-align: center;
    margin-bottom: 20px;
}

.story-title {
    font-size: 22px;
    margin-bottom: 10px;
}

.chapter-title {
    font-size: 28px;
    font-weight: bold;
}

/* Mobile fix */
@media (max-width: 768px) {

    .reader-content {
        padding: 0 12px; /* cách lề trái phải */
    }

    .chapter-content {
        max-width: 100%;
        padding: 0;
        font-size: 16px; /* đọc mobile dễ hơn */
        line-height: 1.7;
    }

    .reader-header {
        padding: 0 10px;
    }

    .chapter-title {
        font-size: 22px;
    }

    .story-title {
        font-size: 18px;
    }
}






/* ========================================
LOCK BOX
======================================== */
.lock-box {
    max-width: 520px;
    margin: 40px auto;
    padding: 32px;
    border-radius: 24px;
    background: linear-gradient(
        145deg,
        #ffffff,
        #f7f8fc
    );
    box-shadow:
        0 10px 35px rgba(0,0,0,0.08),
        0 2px 8px rgba(0,0,0,0.04);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

/* glow */
.lock-box::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    background: rgba(99,102,241,0.12);
    border-radius: 50%;
    top: -60px;
    right: -60px;
    filter: blur(10px);
}

/* ========================================
TITLE
======================================== */
.lock-box h3 {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

/* ========================================
TEXT
======================================== */
.lock-box p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    position: relative;
    z-index: 2;
}

/* ========================================
BUY BUTTON
======================================== */
.buy-chapter-btn {
    position: relative;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-width: 220px;
    height: 56px;

    padding: 0 28px;

    border: 0;
    border-radius: 16px;

    background: linear-gradient(
        135deg,
        #6366f1,
        #8b5cf6
    );

    color: #fff;
    font-size: 17px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        opacity .2s ease;

    box-shadow:
        0 8px 20px rgba(99,102,241,0.35);
}

/* hover */
.buy-chapter-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 28px rgba(99,102,241,0.45);
}

/* active */
.buy-chapter-btn:active {
    transform: scale(.98);
}

/* disabled */
.buy-chapter-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
UNLOCK SUCCESS
======================================== */
.unlock-success {
    padding: 20px;
    border-radius: 18px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.unlock-success p {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #047857;
}

/* ========================================
MOBILE
======================================== */
@media (max-width: 768px) {

    .lock-box {
        margin: 24px 16px;
        padding: 24px;
        border-radius: 20px;
    }

    .lock-box h3 {
        font-size: 22px;
    }

    .buy-chapter-btn {
        width: 100%;
        min-width: unset;
    }
}





/* ========================================
BUTTONS
======================================== */
.report-box-buttons {
    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-top: 16px;
}

/* ========================================
BUTTON BASE
======================================== */
.report-box button {
    width: 100%;

    height: 50px;

    border: 0;
    border-radius: 14px;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform .2s ease,
        opacity .2s ease,
        box-shadow .2s ease;
}

/* SEND BUTTON */
#sendReport {
    background: linear-gradient(
        135deg,
        #6366f1,
        #8b5cf6
    );

    color: #fff;

    box-shadow:
        0 6px 16px rgba(99,102,241,0.18);
}

/* CLOSE BUTTON */
#closeReport {
    background: #eef2f7;

    color: #374151;
}

/* HOVER */
.report-box button:hover {
    transform: translateY(-1px);
    opacity: .96;
}
/* ========================================
TEXTAREA FIX
======================================== */
.report-box textarea {
    width: 100%;

    max-width: 100%;

    height: 110px;

    padding: 14px 16px;

    border-radius: 12px;
    border: 1px solid #dbe3ee;

    font-size: 16px;
    line-height: 1.6;

    resize: none;
    outline: none;

    transition: .2s;

    box-sizing: border-box;

    display: block;
}



