﻿/* ========== PAGE BASE ========== */
body {
    background: #f6f8fb;
}

/* ========== HERO ========== */
.cd-hero {
    position: relative;
    padding: 40px 0;
    overflow: hidden;
}

/* Background blur like sample */
.cd-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(255, 0, 140, 0.35), transparent 45%), radial-gradient(circle at 85% 35%, rgba(0, 170, 255, 0.35), transparent 45%), linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(30, 0, 60, 0.7), rgba(0, 0, 0, 0.75));
    filter: blur(10px);
    transform: scale(1.15);
}

.cd-hero-inner {
    position: relative;
    z-index: 2;
}

.cd-hero-card {
    display: flex;
    gap: 28px;
    padding: 28px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 420px;
}

/* ========== COVER ========== */
.cd-cover-wrap {
    flex: 0 0 auto;
}

.cd-cover {
    width: 260px;
    height: 360px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* ========== INFO ========== */
.cd-info {
    flex: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.cd-title {
    font-size: 28px;
    font-weight: 800;
    margin: 4px 0 10px;
}

.cd-sub {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.35;
    margin-bottom: 14px;
}

.cd-sub-line {
    margin-bottom: 4px;
}

.cd-sub-label {
    opacity: 0.75;
    margin-right: 6px;
}

.cd-sub-value {
    font-weight: 600;
}

/* ========== STATS ========== */
.cd-stats {
    display: flex;
    gap: 18px;
    margin-top: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.cd-stat {
    min-width: 120px;
    padding-right: 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

    .cd-stat:last-child {
        border-right: none;
        padding-right: 0;
    }

.cd-stat-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 6px;
}

.cd-stat-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
}

.cd-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ff4d4f;
    box-shadow: 0 0 12px rgba(255, 77, 79, 0.65);
}

/* ========== TAGS ========== */
.cd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 12px;
}

.cd-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(68, 90, 255, 0.25);
    border: 1px solid rgba(98, 130, 255, 0.35);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

/* ========== UPDATE ========== */
.cd-update {
    color: rgba(255, 255, 255, 0.82);
    margin-top: 4px;
    margin-bottom: 16px;
}

/* ========== ACTIONS ========== */
.cd-actions {
    display: flex;
    gap: 14px;
    margin-top: auto;
    flex-wrap: wrap;
}

.cd-btn {
    border-radius: 12px !important;
    padding: 12px 18px !important;
    min-width: 210px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.cd-btn-primary {
    background: #2f6fff !important;
    border: none !important;
    color: #fff !important;
}

.cd-btn-outline {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #fff !important;
}

.cd-btn-title {
    line-height: 1;
    font-size: 14px;
}

.cd-btn-sub {
    opacity: 0.9;
    font-size: 11px;
    letter-spacing: 0.6px;
}

/* ========== TABS / PANELS ========== */
.cd-tabs {
    gap: 10px;
}

    .cd-tabs .nav-link {
        border-radius: 999px !important;
        font-weight: 700;
        background: rgba(15, 23, 42, 0.06);
        color: #0f172a;
    }

        .cd-tabs .nav-link.active {
            background: #2f6fff !important;
            color: #fff !important;
        }

.cd-panel {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.cd-panel-title {
    padding: 14px 16px;
    font-weight: 800;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.cd-panel-body {
    padding: 16px;
}

/* ========== CHAPTER LIST ========== */
.cd-chapter-list .cd-chapter-item {
    border: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 12px 16px;
}

.cd-chapter-link {
    text-decoration: none;
    font-weight: 700;
    color: #1d4ed8;
}

    .cd-chapter-link:hover {
        text-decoration: underline;
    }



.cd-bookmark-btn::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 400; /* regular */
    content: "\f02e"; /* bookmark icon */
    margin-right: 8px;
}
.cd-bookmark-btn.is-bookmarked::before {
    font-weight: 900; /* solid */
}



/* ========== COMMENTS ========== */
.cd-comment-form {
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(220, 230, 255, 0.8);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(15, 65, 120, 0.08);
}

    .cd-comment-form input,
    .cd-comment-form textarea,
    .cd-comment-form .form-control {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

.cd-textarea {
    border-radius: 14px;
    resize: vertical;
}

.cd-image-preview {
    padding: 10px;
    background: rgba(245, 248, 255, 0.95);
    border: 1px dashed rgba(130, 170, 255, 0.55);
    border-radius: 14px;
}

.cd-comment-item {
    padding: 0;
}

.cd-comment-avatar {
    width: 44px;
    height: 44px;
    object-fit: cover;
}

.cd-comment-avatar-sm {
    width: 34px;
    height: 34px;
}

.cd-comment-bubble {
    background: rgba(250, 252, 255, 0.98);
    border: 1px solid rgba(220, 230, 255, 0.85);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    margin-right: 16px
}

.cd-comment-author {
    color: #0b3d91;
}

.cd-comment-time {
    white-space: nowrap;
}

.cd-comment-content {
    line-height: 1.5;
    color: #1f2937;
}

.cd-comment-image img {
    border: 1px solid rgba(220, 230, 255, 0.9);
}

.cd-edit-box,
.cd-reply-box {
    background: rgba(245, 248, 255, 0.95);
    border: 1px solid rgba(220, 230, 255, 0.85);
    border-radius: 14px;
    margin-right: 16px;
    /* tăng khoảng trống trong box để input không dính mép */
    padding: 16px 18px;
}



/* action pills (LinkButton) */
.cd-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
    white-space: nowrap;
    overflow: visible;
}

    .cd-action:hover {
        transform: translateY(-1px);
        filter: brightness(0.98);
        text-decoration: none;
    }
    /* icon theo màu text */
    .cd-action i {
        color: currentColor;
    }



/* colors */
.cd-action-reply {
    color: #0b5ed7;
    background: rgba(13, 110, 253, 0.10);
    border-color: rgba(13, 110, 253, 0.15);
}

.cd-action-warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.20);
}

.cd-action-danger {
    color: #b42318;
    background: rgba(220, 38, 38, 0.10);
    border-color: rgba(220, 38, 38, 0.15);
}

/* Responsive */
@media (max-width: 991px) {
    .cd-hero-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cd-cover {
        width: 220px;
        height: 320px;
    }

    .cd-stat {
        border-right: none;
        padding-right: 0;
    }

    .cd-actions {
        justify-content: center;
    }
}
