/* ============================================
   CHAPTER PAGINATION (Dạng ô vuông)
   ============================================ */
.chapter-pagination-wrapper {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #eee;
}

.chapter-pagination-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.chapter-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chapter-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
}

.chapter-page:hover {
    border-color: var(--primary-color);
    color: #006537;
    transform: translateY(-1px);
}

.chapter-page.active {
    background: var(--primary-color); /* Màu tím giống ảnh */
    color: #fff;
    border-color: #6f42c1;
    font-weight: 700;
}

.chapter-page.active:hover {
    background: var(--primary-color);
    border-color: #5a32a3;
}

/* Responsive */
@media (max-width: 576px) {
    .chapter-page {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* ============================================
   SINGLE STORY PAGE STYLES
   Chỉ load trên trang single
   ============================================ */
.short-content{
    background-color: #ccc;
}
.single-story-article {
    padding: 30px 0 60px;
}

.single-container {
    max-width: 820px;
    margin: 0 auto;
}

.breadcrumb {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #555;
}

.breadcrumb .sep {
    margin: 0 8px;
    color: #aaa;
}

.single-header {
    margin-bottom: 25px;
}

.single-title {
    font-size: 32px;
    line-height: 1.35;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.single-meta {
    font-size: 14px;
    color: #666;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.single-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.single-meta .meta-item i {
    color: var(--primary-color);
}

.single-featured-image {
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.single-featured-image img {
    width: 100%;
    height: auto;
}

/* Audio Player Styling */
.single-audio-player {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow);
}

.single-audio-player .custom-audio-player {
    outline: none;
    border-radius: 8px;
}

.single-audio-player .audio-note {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

.single-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-color);
}

/* Nút Thích truyện nổi bật ở đầu và cuối bài */
.like-action {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.btn-like,
.like-action .btn-like {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 250px;
    padding: 14px 28px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff315f, #d90445);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 9px 24px rgba(217, 4, 69, 0.3);
    transform: translateY(0);
}

.btn-like:hover,
.btn-like:focus-visible {
    background: linear-gradient(135deg, #e91e52, #b90039);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(217, 4, 69, 0.4);
}

.btn-like.liked,
.btn-like:disabled {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    opacity: 1;
    cursor: default;
}

.like-button-count {
    min-width: 32px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
}

.like-success-message {
    color: #d90445;
    font-weight: 700;
}

@media (max-width: 576px) {
    .like-action .btn-like {
        width: 100%;
        min-width: 0;
    }
}

.single-content p {
    margin-bottom: 1.2em;
}

.single-content h2, 
.single-content h3 {
    margin-top: 1.8em;
    margin-bottom: 0.8em;
}

.single-taxonomies {
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.tax-group {
    margin-right: 20px;
}

.tax-label {
    font-weight: 600;
    margin-right: 8px;
    color: #555;
}

.single-actions {
    display: flex;
    align-items: center;
}

.btn-like {
    background-color: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 28px;
    font-weight: 600;
}

.btn-like:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-like.liked {
    background-color: var(--primary-color);
    color: #fff;
}

.single-share h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #444;
}

.share-buttons .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    transition: all 0.3s ease;
}

.share-btn.facebook { background-color: #1877f2; }
.share-btn.telegram { background-color: #26a5e4; }
.share-btn.x-twitter { background-color: #000; }

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Related posts */
.related-posts .grid-4-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-card .card-title {
    font-size: 15px;
}

/* Comments */
.single-comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .single-title {
        font-size: 26px;
    }
    
    .related-posts .grid-4-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/*====================================================
=            COMMENT SECTION MODERN UI
====================================================*/

.single-comments{
    margin:40px 0;
    color:#e8e8e8;
}

.single-comments h3#comments{
    font-size:26px;
    font-weight:700;
    margin-bottom:25px;
    color:#fff;
}

/*====================
Comment List
=====================*/

.commentlist{
    margin:0;
    padding:0;
    list-style:none;
}

.commentlist li{
    list-style:none;
}

/*====================
Comment Card
=====================*/

.comment-body{
    position:relative;
    display:flex;
    flex-direction:column;
    gap:12px;
    background:#1b1d22;
    border:1px solid rgba(255,255,255,.06);
    border-radius:18px;
    padding:18px;
    margin-bottom:18px;
    transition:.3s;
    box-shadow:
        0 8px 30px rgba(0,0,0,.25);
}

.comment-body:hover{
    border-color:#ff4d6d55;
    transform:translateY(-2px);
}

/*====================
Header
=====================*/

.comment-meta{
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    gap:12px;
}

.comment-author{
    display:flex;
    align-items:center;
    gap:12px;
}

.comment-author img{
    width:52px;
    height:52px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid #ff4d6d;
    box-shadow:0 0 15px rgba(255,77,109,.4);
}

.comment-author .fn{
    font-size:16px;
    color:#fff;
    font-weight:700;
}

.comment-author .fn a{
    color:#fff;
    text-decoration:none;
}

.comment-author .says{
    display:none;
}

.comment-metadata{
    font-size:13px;
    opacity:.65;
}

.comment-metadata a{
    color:#aaa;
    text-decoration:none;
}

/*====================
Content
=====================*/

.comment-content{
    line-height:1.8;
    font-size:15px;
    color:#ddd;
}

.comment-content p:last-child{
    margin-bottom:0;
}

/*====================
Reply Button
=====================*/

.reply{
    margin-top:6px;
}

.comment-reply-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:#ff4d6d;
    color:#fff!important;
    text-decoration:none;
    padding:8px 18px;
    border-radius:999px;
    font-size:14px;
    font-weight:600;
    transition:.25s;
}

.comment-reply-link:hover{
    background:#ff2f55;
    transform:translateY(-2px);
}

/*====================
Nested Comments
=====================*/

.children{
    margin-top:18px;
    margin-left:18px;
    padding-left:22px;
    border-left:3px solid #ff4d6d55;
}

.children .comment-body{
    background:#24262d;
}

/*====================
Comment Form
=====================*/

.comment-respond{
    margin-top:45px;
    background:#1b1d22;
    border-radius:18px;
    padding:24px;
    border:1px solid rgba(255,255,255,.06);
}

.comment-reply-title{
    color:#fff;
    font-size:22px;
    margin-bottom:20px;
}

.comment-notes{
    color:#999;
    font-size:14px;
}

/*====================
Inputs
=====================*/

.comment-form label{
    display:block;
    margin-bottom:8px;
    color:#ddd;
    font-weight:600;
}

.comment-form textarea,
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url]{

    width:100%;
    background:#111317;
    color:#fff;

    border:1px solid #333;
    border-radius:12px;

    padding:14px;

    transition:.25s;
    box-sizing:border-box;
}

.comment-form textarea{
    min-height:180px;
    resize:vertical;
}

.comment-form textarea:focus,
.comment-form input:focus{

    outline:none;
    border-color:#ff4d6d;
    box-shadow:0 0 0 4px rgba(255,77,109,.15);

}

/*====================
Submit
=====================*/

.form-submit{
    margin-top:20px;
}

.comment-form .submit{

    width:100%;

    background:linear-gradient(135deg,#ff4d6d,#ff0066);

    border:0;

    color:#fff;

    padding:15px;

    border-radius:14px;

    font-size:16px;

    font-weight:700;

    cursor:pointer;

    transition:.3s;
}

.comment-form .submit:hover{

    transform:translateY(-2px);

    box-shadow:0 10px 25px rgba(255,0,102,.35);

}

/*====================
Cookies
=====================*/

.comment-form-cookies-consent{

    display:flex;
    gap:10px;
    align-items:flex-start;
    margin-top:20px;
    color:#aaa;
    font-size:14px;

}

/*====================
Hide Website Field
=====================*/

.comment-form-url{
    display:none;
}

/*====================
Replying Notice
=====================*/

#reply-title small{

    display:block;
    margin-top:10px;

}

#cancel-comment-reply-link{

    color:#ff4d6d;
    text-decoration:none;
}

/*====================================================
MOBILE
====================================================*/

@media(max-width:768px){

.comment-body{

    padding:15px;
    border-radius:16px;

}

.comment-meta{

    flex-direction:column;

}

.comment-author img{

    width:46px;
    height:46px;

}

.comment-author .fn{

    font-size:15px;

}

.children{

    margin-left:10px;
    padding-left:14px;

}

.comment-reply-link{

    width:100%;
    justify-content:center;

}

.comment-respond{

    padding:18px;

}

.single-comments h3#comments{

    font-size:22px;

}

.comment-reply-title{

    font-size:20px;

}

}
/* ============================================
   SINGLE STORY PAGE STYLES
   ============================================ */

.single-story-article,
.single-chapter-article {
    padding: 30px 0 60px;
}

.single-container {
    max-width: 820px;
    margin: 0 auto;
}

.breadcrumb {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #555;
}

.breadcrumb .sep {
    margin: 0 8px;
    color: #aaa;
}

.single-header {
    margin-bottom: 25px;
}

.single-title {
    font-size: 32px;
    line-height: 1.35;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.single-meta {
    font-size: 14px;
    color: #666;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.single-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.single-meta .meta-item i {
    color: var(--primary-color);
}

.single-featured-image {
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.single-featured-image img {
    width: 100%;
    height: auto;
}

/* Audio Player */
.single-audio-player {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow);
}

.single-content {
    font-size: 17px;
    line-height: 1.85;
    color: #222;
}

.single-content p {
    margin-bottom: 1.2em;
}

.single-taxonomies {
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.tax-group {
    margin-right: 20px;
}

.tax-label {
    font-weight: 600;
    margin-right: 8px;
    color: #555;
}

/* Like Button */
.single-actions {
    display: flex;
    align-items: center;
}

.btn-like {
    background-color: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 28px;
    font-weight: 600;
}

.btn-like:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-like.liked {
    background-color: var(--primary-color);
    color: #fff;
}

/* Social Share */
.single-share h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #444;
}

.share-buttons .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    transition: all 0.3s ease;
}

.share-btn.facebook { background-color: #1877f2; }
.share-btn.telegram { background-color: #26a5e4; }
.share-btn.x-twitter { background-color: #000; }

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Related Posts */
.related-posts .grid-4-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-card .card-title {
    font-size: 15px;
}

/* Comments */
.single-comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   CHAPTER STYLES (Mới thêm)
   ============================================ */

/* Chapter Header */
.chapter-header .chapter-story-title {
    font-size: 15px;
    margin-bottom: 6px;
}

.chapter-header .chapter-story-title a {
    color: #666;
    font-weight: 500;
}

.chapter-title {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 10px;
}

/* Chapter Navigation */
.chapter-navigation {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.chapter-navigation .btn {
    min-width: 150px;
    justify-content: center;
}

.chapter-navigation .btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Chapter List Section (trên trang truyện) */
.chapter-list-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.chapter-list-section .section-title {
    margin-bottom: 20px;
    font-size: 22px;
}

.chapter-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.chapter-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(0, 101, 55, 0.1);
    transform: translateY(-1px);
}

.chapter-item .chapter-number {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 15px;
}

.chapter-item .chapter-meta {
    font-size: 13px;
    color: #777;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Chapter Count */
.chapter-count {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .single-title {
        font-size: 26px;
    }
    
    .chapter-title {
        font-size: 24px;
    }
    
    .chapter-list-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts .grid-4-columns {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chapter-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .chapter-navigation .btn {
        width: 100%;
    }
}

/* Comment styles (giữ nguyên từ bản gốc nếu bạn có) */
.single-comments h3#comments {
    font-size: 24px;
    margin-bottom: 25px;
}

.like-action .btn-like:hover,
.like-action .btn-like:focus-visible {
    background: linear-gradient(135deg, #e91e52, #b90039);
    color: #fff;
}

.like-action .btn-like.liked,
.like-action .btn-like:disabled {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
}
