﻿/* =========================================
 * Pages: doc-truyen.php
 * Author: Thanh ??
 * Note: Auto-extracted from inline <style>
 * ========================================= */
.locked-content {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            border: 2px solid #e2e8f0;
            border-radius: 20px;
            padding: 40px 30px;
            text-align: center;
            margin: 30px 0;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
            position: relative;
            overflow: hidden;
        }
         
        .locked-content::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle at 50% 0%, rgba(99,102,241,0.04) 0%, transparent 60%);
            pointer-events: none;
        }

        .lock-icon {
            font-size: 48px;
            color: #64748b;
            margin-bottom: 16px;
            display: block;
            animation: lockPulse 2s ease-in-out infinite;
        }
         
        @keyframes lockPulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.06); opacity: 0.7; }
        }

        .lock-title {
            font-size: 20px;
            font-weight: 800;
            margin-bottom: 10px;
            color: #1e293b;
            letter-spacing: -0.3px;
        }

        .lock-desc {
            color: #64748b;
            font-size: 14px;
            margin-bottom: 24px;
            line-height: 1.6;
        }

        .price-box {
            background: white;
            border-radius: 16px;
            padding: 18px 24px;
            display: inline-flex;
            align-items: center;
            gap: 14px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.06);
            margin-bottom: 20px;
            flex-wrap: wrap;
            justify-content: center;
            border: 1px solid #e2e8f0;
        }

        .lock-price {
            font-size: 26px;
            font-weight: 800;
            color: #0f172a;
            letter-spacing: 0.5px;
        }
        .lock-price .unit {
            font-size: 16px;
            font-weight: 600;
            color: #64748b;
        }

        .old-price {
            text-decoration: line-through;
            color: #94a3b8;
            font-size: 14px;
            font-weight: 600;
        }

        .vip-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
            color: #fff;
        }

        .lock-balance {
            font-size: 14px;
            color: #64748b;
            margin-bottom: 20px;
            background: white;
            padding: 10px 20px;
            border-radius: 12px;
            display: inline-block;
            box-shadow: 0 2px 6px rgba(0,0,0,0.04);
            border: 1px solid #e2e8f0;
        }

        .lock-balance strong {
            color: #059669;
            font-size: 16px;
        }

        .btn-unlock {
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            color: #fff;
            border: none;
            padding: 14px 36px;
            border-radius: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 15px;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
        }

        .btn-unlock:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
        }

        .btn-unlock:active {
            transform: translateY(0);
        }

        .btn-unlock.disabled {
            background: #94a3b8;
            box-shadow: none;
            opacity: 0.6;
            cursor: not-allowed;
            transform: none !important;
        }

        .btn-nap-song {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #fff;
            padding: 12px 28px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 14px;
            text-decoration: none;
            box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
            transition: all 0.3s;
        }
        .btn-nap-song:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
        }

        .btn-login-unlock {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: #fff;
            padding: 12px 28px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 14px;
            text-decoration: none;
            box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
            transition: all 0.3s;
        }
        .btn-login-unlock:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 14px rgba(59, 130, 246, 0.4);
        }

                /* Combo & Nâng cấp VIP đã được gỡ bỏ theo yêu cầu */
         
        /* ============ RESPONSIVE ============ */
        @media (max-width: 768px) {
            .locked-content {
                padding: 25px 16px;
                border-radius: 12px;
                margin: 20px -4px;
            }
            .lock-icon {
                font-size: 40px;
            }
            .lock-title {
                font-size: 18px;
            }
            .lock-desc {
                font-size: 13px;
                margin-bottom: 16px;
            }
            .price-box {
                padding: 12px 14px;
                gap: 8px;
                flex-direction: column;
            }
            .lock-price {
                font-size: 22px;
            }
            .lock-balance {
                font-size: 13px;
                padding: 8px 14px;
                width: 100%;
                box-sizing: border-box;
            }
            .lock-balance strong {
                font-size: 14px;
            }
            .btn-unlock {
                padding: 12px 28px;
                font-size: 14px;
                width: 100%;
                justify-content: center;
            }
                        /* Combo responsive removed */
        }
         
        @media (max-width: 480px) {
            .locked-content {
                padding: 20px 12px;
                margin: 15px -6px;
                border-width: 1.5px;
            }
            .lock-icon {
                font-size: 34px;
                margin-bottom: 8px;
            }
            .lock-title {
                font-size: 16px;
            }
            .lock-desc {
                font-size: 12px;
                margin-bottom: 14px;
            }
            .price-box {
                padding: 10px 12px;
            }
            .lock-price {
                font-size: 20px;
            }
            .old-price {
                font-size: 13px;
            }
            .btn-unlock {
                padding: 10px 22px;
                font-size: 13px;
                gap: 6px;
            }
                        /* Combo 480px removed */
        }

        .container {
            padding-bottom: 150px;
        }

        .zen-comments {
            margin-top: 60px;
            padding-top: 30px;
            border-top: 2px dashed var(--border);
            margin-bottom: 50px;
        }

        .cmt-header {
            font-size: 20px;
            font-weight: 800;
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--text-main);
        }

        .cmt-input-box {
            background: var(--bg-surface);
            padding: 20px;
            border-radius: 16px;
            margin-bottom: 40px;
            border: 1px solid var(--border);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
        }

        .cmt-textarea {
            width: 100%;
            border: none;
            background: transparent;
            resize: none;
            outline: none;
            font-family: inherit;
            font-size: 15px;
            color: var(--text-main);
            min-height: 80px;
        }

        .cmt-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid var(--border);
        }

        .btn-send {
            background: var(--primary);
            color: #fff;
            border: none;
            padding: 8px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: 0.2s;
        }

        .btn-send:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }

        .cmt-list {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .cmt-item {
            display: flex;
            gap: 15px;
            animation: fadeIn 0.3s ease;
        }

        .cmt-avatar-wrapper {
            flex-shrink: 0;
        }

        .cmt-content {
            flex: 1;
        }

        .cmt-name {
            font-weight: 700;
            font-size: 15px;
            color: var(--text-main);
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .cmt-text {
            font-size: 15px;
            line-height: 1.6;
            color: var(--text-sec);
            word-break: break-word;
        }

        .cmt-footer {
            display: flex;
            gap: 15px;
            margin-top: 8px;
            align-items: center;
            font-size: 13px;
            color: var(--text-muted);
        }

        .btn-act {
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            color: inherit;
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            font-weight: 600;
            transition: 0.2s;
        }

        .btn-act:hover {
            color: var(--primary);
        }

        .btn-like.liked {
            color: #e11d48;
        }

        .btn-like.liked i {
            font-weight: 900;
        }

        .badge {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            color: #fff;
        }

        .badge.admin {
            background: #ef4444;
        }

        .badge.author {
            background: #f59e0b;
        }

        .cmt-gift-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 12px;
            font-weight: 600;
            border: 1px solid transparent;
        }

        .badge-flower {
            background: #ffe4e6;
            color: #be123c;
            border-color: #fecdd3;
        }

        .badge-coffee {
            background: #fef3c7;
            color: #b45309;
            border-color: #fde68a;
        }

        .badge-diamond {
            background: #eff6ff;
            color: #1d4ed8;
            border-color: #bfdbfe;
        }

        .badge-gold {
            background: #fffbeb;
            color: #b45309;
            border-color: #fcd34d;
        }

        .reply-node {
            margin-left: 50px;
            position: relative;
            margin-top: 15px;
        }

        .reply-node::before {
            content: "";
            position: absolute;
            left: -25px;
            top: -10px;
            width: 15px;
            height: 20px;
            border-left: 2px solid var(--border);
            border-bottom: 2px solid var(--border);
            border-bottom-left-radius: 10px;
        }

        .reply-box {
            margin-top: 10px;
            background: var(--bg-body);
            padding: 10px;
            border-radius: 8px;
            border: 1px solid var(--border);
        }

        .reply-box.hidden {
            display: none;
        }

        .cmt-textarea.small {
            min-height: 50px;
            font-size: 14px;
            background: var(--bg-surface);
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 8px;
        }

        .btn-send.small {
            padding: 4px 12px;
            font-size: 12px;
        }

        .btn-cancel {
            background: transparent;
            color: var(--text-sec);
            border: none;
            cursor: pointer;
            font-size: 12px;
            margin-right: 10px;
        }

        .btn-gift-select {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 20px;
            border: 1px solid var(--border);
            background: var(--bg-surface);
            color: var(--text-sec);
            font-size: 14px;
            cursor: pointer;
            transition: 0.2s;
        }

        .btn-gift-select:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: rgba(37, 99, 235, 0.05);
        }

        .btn-gift-select.active {
            border-color: var(--primary);
            color: var(--primary);
            font-weight: 700;
            background: rgba(37, 99, 235, 0.1);
        }

        .modal-gift-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 9999;
            justify-content: center;
            align-items: center;
        }

        .modal-gift-overlay.show {
            display: flex;
        }

        .modal-gift-box {
            background: var(--bg-card);
            width: 90%;
            max-width: 500px;
            max-height: 80vh;
            border-radius: 16px;
            padding: 20px;
            display: flex;
            flex-direction: column;
        }

        .gift-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            overflow-y: auto;
            padding: 5px;
        }

        .gift-item {
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 15px 5px;
            text-align: center;
            cursor: pointer;
            transition: 0.2s;
        }

        .gift-item:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
        }

        .gift-item.selected {
            border: 2px solid var(--primary);
            background: rgba(37, 99, 235, 0.05);
        }

        .gift-icon {
            font-size: 28px;
            display: block;
            margin-bottom: 5px;
        }

        .gift-name {
            font-size: 13px;
            font-weight: 700;
            display: block;
            color: var(--text-main);
        }

        .gift-price {
            font-size: 11px;
            color: var(--text-sec);
            display: block;
        }

        .c-red {
            color: #ef4444;
        }

        .c-pink {
            color: #ec4899;
        }

        .c-blue {
            color: #3b82f6;
        }

        .c-gold {
            color: #d97706;
        }

        .c-purple {
            color: #a855f7;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* THEME BỔ SUNG: SEPIA, GREEN, BLUE (không dùng CSS variables gốc) */
        /* Mỗi theme ghi đè background, text, border cho mọi element trong reading area */

        /* ===== SEPIA MODE ===== */
        html.sepia-mode {
            --bg-body: #fbf0d9;
            --bg-card: #fbf0d9;
            --bg-surface: #f5e6c6;
            --bg-input: #f5e6c6;
            --text-main: #5b4636;
            --text-sec: #7a6b5a;
            --border: #e0d0b0;
        }

        html.sepia-mode body {
            background-color: var(--bg-body);
            color: var(--text-main);
        }

        html.sepia-mode .zen-header,
        html.sepia-mode .reading-box,
        html.sepia-mode .reading-box.zen,
        html.sepia-mode .cmt-input-box,
        html.sepia-mode .locked-content,
        html.sepia-mode .chapter-nav,
        html.sepia-mode .comment-section,
        html.sepia-mode .comment-item,
        html.sepia-mode select,
        html.sepia-mode option {
            background-color: var(--bg-card) !important;
            border-color: var(--border) !important;
        }

        html.sepia-mode .chapter-content p {
            color: var(--text-main);
        }

        html.sepia-mode .chapter-title h2 {
            color: var(--text-main);
        }

        html.sepia-mode .chapter-title span {
            color: var(--text-sec);
        }

        html.sepia-mode input,
        html.sepia-mode textarea {
            background: var(--bg-input);
            border-color: var(--border);
            color: var(--text-main);
        }

        /* ===== GREEN MODE ===== */
        html.green-mode {
            --bg-body: #d8f0db;
            --bg-card: #d8f0db;
            --bg-surface: #c5e4c9;
            --bg-input: #c5e4c9;
            --text-main: #002b0e;
            --text-sec: #246b3f;
            --border: #a3c9a6;
        }

        html.green-mode body {
            background-color: var(--bg-body);
            color: var(--text-main);
        }

        html.green-mode .zen-header,
        html.green-mode .reading-box,
        html.green-mode .reading-box.zen,
        html.green-mode .cmt-input-box,
        html.green-mode .locked-content,
        html.green-mode .chapter-nav,
        html.green-mode .comment-section,
        html.green-mode .comment-item,
        html.green-mode select,
        html.green-mode option {
            background-color: var(--bg-card) !important;
            border-color: var(--border) !important;
        }

        html.green-mode .chapter-content p {
            color: var(--text-main);
        }

        html.green-mode .chapter-title h2 {
            color: var(--text-main);
        }

        html.green-mode .chapter-title span {
            color: var(--text-sec);
        }

        html.green-mode input,
        html.green-mode textarea {
            background: var(--bg-input);
            border-color: var(--border);
            color: var(--text-main);
        }

        /* ===== BLUE MODE (Dark xanh dương, dịu mắt) ===== */
        html.blue-mode {
            --bg-body: #0f172a;
            --bg-card: #0f172a;
            --bg-surface: #1a2332;
            --bg-input: #1a2332;
            --text-main: #c8d6e5;
            --text-sec: #8899b0;
            --border: #1e293b;
        }

        html.blue-mode body {
            background-color: var(--bg-body);
            color: var(--text-main);
        }

        html.blue-mode .zen-header,
        html.blue-mode .reading-box,
        html.blue-mode .reading-box.zen,
        html.blue-mode .cmt-input-box,
        html.blue-mode .locked-content,
        html.blue-mode .chapter-nav,
        html.blue-mode .comment-section,
        html.blue-mode .comment-item,
        html.blue-mode select,
        html.blue-mode option {
            background-color: var(--bg-card) !important;
            border-color: var(--border) !important;
        }

        html.blue-mode .chapter-content p {
            color: var(--text-main);
        }

        html.blue-mode .chapter-title h2 {
            color: #e2e8f0;
        }

        html.blue-mode .chapter-title span {
            color: var(--text-sec);
        }

        html.blue-mode input,
        html.blue-mode textarea {
            background: var(--bg-input);
            border-color: var(--border);
            color: var(--text-main);
        }
/* ===== [CLAPS] FLOAT BUTTON ===== */
.clap-float-btn {
    position: fixed;
    bottom: 140px;
    right: 24px;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(225, 29, 72, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    animation: clapFloatInit 0.5s ease;
}
@keyframes clapFloatInit {
    from { opacity: 0; transform: scale(0) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.clap-float-btn::after {
    content: '👏';
    position: absolute;
    top: -8px;
    right: -6px;
    font-size: 16px;
    animation: clapEmoji 2s ease-in-out infinite;
}
@keyframes clapEmoji {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}
.clap-float-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 32px rgba(225, 29, 72, 0.55);
}
.clap-float-btn:active {
    transform: scale(0.92);
}
.clap-float-btn i {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}
.clap-float-count {
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    background: rgba(255,255,255,0.25);
    padding: 1px 6px;
    border-radius: 8px;
    min-width: 20px;
    text-align: center;
    backdrop-filter: blur(4px);
}

/* Popup */
.clap-float-popup {
    position: fixed;
    bottom: 215px;
    right: 24px;
    z-index: 9998;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 20px;
    padding: 20px 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    display: none;
    min-width: 160px;
}
.clap-float-popup.show {
    display: block;
    animation: clapPopIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes clapPopIn {
    from { opacity: 0; transform: translateY(12px) scale(0.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.clap-popup-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main, #1e293b);
    margin-bottom: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.clap-popup-title::before {
    content: '👏';
    font-size: 16px;
}
.clap-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.clap-popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 12px;
    background: var(--bg-main, #f8fafc);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main, #1e293b);
    transition: all 0.2s;
    text-align: center;
}
.clap-popup-btn:hover {
    border-color: #f43f5e;
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    color: #e11d48;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.12);
}

@media (max-width: 768px) {
    .clap-float-btn { width: 54px; height: 54px; bottom: 120px; right: 16px; font-size: 16px; }
    .clap-float-btn i { font-size: 20px; }
    .clap-float-count { font-size: 9px; }
    .clap-float-popup { bottom: 188px; right: 16px; padding: 16px 14px; min-width: 140px; }
    .clap-popup-btn { padding: 9px 12px; font-size: 14px; }
}
@media (max-width: 480px) {
    .clap-float-btn { width: 48px; height: 48px; bottom: 105px; right: 12px; font-size: 15px; }
    .clap-float-btn i { font-size: 18px; }
    .clap-float-btn::after { font-size: 13px; top: -6px; right: -4px; }
    .clap-float-popup { bottom: 168px; right: 12px; padding: 14px 12px; min-width: 120px; }
    .clap-popup-btn { padding: 8px 10px; font-size: 13px; }
}

