        :root {
            --primary: #6c5ce7;
            --accent: #ff7675;
            --bg: #f8f9fa;
            --card-bg: #ffffff;
			--card-bg-rgb: 255 255 255;
            --text-main: #2d3436;
            --text-sub: #636e72;
            --shadow: 0 10px 30px rgba(0,0,0,0.1);
            --radius: 20px;
        }

        [data-theme="dark"] {
            --bg: #141414;
            --card-bg: #16161a;
            --text-main: #f5f5f5;
            --text-sub: #a0a0a0;
            --shadow: 0 10px 40px rgba(0,0,0,0.3);
        }
html { font-size: 16px; }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Quicksand', sans-serif;  }
        body {font-size: 1rem;  background-color: var(--bg); color: var(--text-main); transition: 0.4s; overflow-x: hidden; line-height:1.4}
		body,
.story-card,
.cat-item,
.featured-card,
.masonry-item,
.sidebar-box {
    transition: background-color 0.35s ease,
                color 0.35s ease,
                border-color 0.35s ease,
                transform 0.3s ease;
}
/* Mobile Responsive */
@media (max-width: 768px) {
    .content-wrapper {
        max-width: 100%;
    }
    .featured-image {
        opacity: 0.2; /* Trên mobile cho ảnh chìm hẳn xuống làm nền */
        height: 100%;
    }
}
/* NAVBAR */
header{
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    background: rgb(var(--bg) / 0.72); 
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow);
}
nav {

}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-links {
    display: flex;
    list-style: none;
    padding: 4px;
    border-radius: 16px;
    position: relative;
    overflow-y: visible; /* desktop không scroll */
}

        .nav-links li {
            position: relative;
            z-index: 2;
        }
.nav-links li:last-child,.nav-links li:nth-last-child(-n+2) {
    display: none;
}
.nav-links li:nth-child(4){
    display: block !important;
}.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%; /* luôn nằm sát đáy li cha */
    left: 0;
    z-index: 9999;
    background: var(--card-bg);
    min-width: 180px;
}

.sub-menu li a {
    padding: 8px 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.nav-links li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    max-height: 500px; /* cho hiệu ứng mở */
}
        .nav-links a {
            text-decoration: none;
            color: var(--text-main);
            font-size: 16px;
            font-weight: 600;
            padding: 8px 20px;
            display: block;
            transition: color 0.3s;
        }
.nav-links a:hover{      background:rgb(var(--card-bg-rgb) / 0.72);  border-radius: 25px;}

        .nav-links li:hover a {
            color: var(--text-main);
        }

        .logo-dot {
            width: 8px;
            height: 8px;
            background: var(--accent);
            border-radius: 50%;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
            70% { transform: scale(1.2); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
            100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
        }

        /* Responsive Mobile Menu */
        .menu-toggle {
            display: none;
            flex-direction: column;
            cursor: pointer;
            gap: 5px;
        }

        .menu-toggle span {
            width: 25px;
            height: 3px;
            background-color: var(--text-main);
            border-radius: 2px;
            transition: all 0.3s;
        }

        @media (max-width: 768px) {
			.nav-links {
    overflow-x: hidden;
}
			.menu-item-has-children .sub-menu {
    max-height: 0;       /* ẩn */
    overflow: hidden;    /* ẩn nội dung tràn */
    transition: max-height 0.3s ease; /* animation */
    margin: 0;
    padding-left: 20px; /* thụt submenu nếu muốn */
    list-style: none;
}
			.search-box {display:none}
            /* Menu chiếm toàn bộ width */
          .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg);
        border-radius: 0;
        overflow-y: auto; /* bật scroll dọc */
        max-height: 0;    /* ẩn menu */
        transition: max-height 0.4s ease;
        width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 999;
        opacity: 0;
    }

            .nav-links li a {
                padding: 15px 20px;
            }
.nav-links li:last-child,.nav-links li:nth-last-child(-n+2) {
    display: block;
}
			
 /* Khi toggle mở menu */
    .nav-links.show {
        max-height: 90vh; /* max 90% chiều cao viewport */
        opacity: 1;
    }
			  /* Scrollbar đẹp optional */
    .nav-links::-webkit-scrollbar {
        width: 6px;
    }
    .nav-links::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
    }
			.nav-links li:hover > .sub-menu{    position: unset;}
            .menu-toggle {
                display: flex;
            }
        }
.search-box {
    position: relative;
    width: 300px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}


.search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 20px;
    font-size: 16px;
    color: var(--text-main);
}

.search-input::placeholder {
    color: var(--text-main);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #764ba2;
    transition: transform 0.2s ease;
}

/* Right side */
.nav-actions {
    display: flex;
    align-items: center;
	gap:10px;
}



/* User */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 15px;
    border-radius: 30px;
    background: var(--card-bg);
    border: 1px solid var(--primary);
    cursor: pointer;
	box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.2);
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 700;
}

.user-level {
    font-size: 0.6rem;
    color: var(--accent);
}

/* Dropdown */
.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 200px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: none;
    padding: 10px;
    z-index: 100;
}

.user-dropdown.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.user-dropdown a {
    display: block;
    padding: 10px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
}

.user-dropdown a:hover {
    background: var(--primary);
    color: #fff;
}

.dropdown-divider {
    margin: 5px 0;
    opacity: 0.1;
}

.logout {
    color: var(--accent);
}
        .auth-buttons {
            display: flex;
            gap: 15px;
        }

        .btn {
            padding: 12px 20px;
            border-radius: 50px;
            text-decoration: none;
            font-size: 16px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s ease;
            box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        }

        .btn-login {
            background: linear-gradient(135deg, #4facfe, #00f2fe);
            color: #fff;
        }

        .btn-register {
            background: linear-gradient(135deg, #43e97b, #38f9d7);
            color: #fff;
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 15px 25px rgba(0,0,0,0.25);
            opacity: 0.95;
        }

        .btn:active {
            transform: scale(0.97);
        }
        /* CATEGORY COLORFUL */
.category-bar.colorful {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 15px;
    padding:10px 0;
    background: transparent;
    border: none;
}

.cat-item {
    height: 90px;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    transition: 0.3s;
}

.cat-item i {
    font-size: 1.4rem;
}

.cat-item:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}

/* COLORS */
.c-all        { background: linear-gradient(135deg,#636e72,#2d3436); }
.c-tienhiep,.c-di-gioi   { background: linear-gradient(135deg,#6c5ce7,#a29bfe); }
.c-huyenhuyen,.c-hai-huoc { background: linear-gradient(135deg,#00b894,#55efc4); }
.c-dothi,.c-huyen-huyen      { background: linear-gradient(135deg,#0984e3,#74b9ff); }
.c-khoahuyen,.c-linh-di  { background: linear-gradient(135deg,#fdcb6e,#e17055); }
.c-hesystem,.c-tien-hiep   { background: linear-gradient(135deg,#00cec9,#81ecec); }
.c-dasu       { background: linear-gradient(135deg,#e84393,#fd79a8); }
.c-trinhtham  { background: linear-gradient(135deg,#2d3436,#636e72); }
.c-codai      { background: linear-gradient(135deg,#e1b12c,#fbc531); }

/* MOBILE */
@media (max-width: 480px) {
    .cat-item {
        height: 80px;
        font-size: 0.7rem;
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}
.logo-accent {
    color: var(--accent);
}
/* Container logo */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px; /* khoảng cách giữa logo và chữ */
    text-decoration: none;
    font-family: 'Arial', sans-serif;
}

/* Logo hình ảnh */
.logo-icon {
    height: 60px; /* chiều cao logo */
    width: auto;  /* giữ tỉ lệ ảnh */
}

/* Chữ TRUYỆNHAY */
.logo a {
    font-size: 28px;
    font-weight: bold;
    color: #333; /* màu chữ TRUYỆN */
}

.logo-accent {
    color: #ff4500; /* màu chữ HAY, bạn chỉnh theo ý thích */
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 768px) {
    .logo a {
        font-size: 20px;
    }
    .logo-icon {
        height: 45px;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 18px;
    }
    .logo-icon {
        height: 45px;
    }
}
        .user-container { position: relative; }
		
        .user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

        /* --- LAYOUT STRUCTURE --- */
        .main-wrapper {
            display: grid;
            grid-template-columns: 1fr 320px;
            gap: 30px;
           margin-top: 0;
        }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* thêm padding để không dính mép */
}
       
       /* Responsive cho mobile */
@media (max-width: 768px) {
	.nav-actions{display:none}
	.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px; /* thêm padding để không dính mép */
}
    .main-wrapper {
        display:block
    }
}
       .section-title-text {
    font-size: 1.4rem;
    font-weight: 700;
}
.mini-title {
    margin-top: 10px;
    font-size: 0.8rem;
}

        /* Sidebar Styles */
        .sidebar { display: flex; flex-direction: column; gap: 30px; }
        .sidebar-box { background: var(--card-bg); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom:20px }
        .sidebar-title { margin-bottom: 15px; font-size: 1.1rem; font-weight: 700; border-left: 4px solid var(--primary); padding-left: 10px; }

        /* Section Titles */
        .section-title { margin: 30px 0 20px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }

        /* Ranking List in Sidebar */
        .rank-item {
            display: flex; align-items: center; gap: 15px;
            padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
        }
        .rank-item:last-child { border-bottom: none; }
        .rank-number { font-size: 1.2rem; font-weight: 900; color: var(--primary); opacity: 0.5; width: 25px; }

        /* Grids & Cards */
		.story-tag {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
}

.story-title {
    margin: 5px 0;
    font-size: 0.95rem;
}

.story-meta {
    font-size: 0.8rem;
    color: var(--text-sub);
}

        .standard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
        .story-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: 0.3s; }
        .story-card:hover { transform: translateY(-5px); }
        .story-card img { width: 100%; height: 240px; object-fit: cover; }
        .card-body { padding: 12px; }

        .scroll-container { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
        .story-mini-card { min-width: 120px; text-align: center; }
        .story-mini-card img { width: 120px; height: 170px; border-radius: 15px; object-fit: cover; box-shadow: var(--shadow); }

       /* MASONRY */
.masonry-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.masonry-item {
    background: var(--card-bg);
    padding: 15px;
    border-radius: var(--radius);
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: var(--shadow);
    transition: 0.3s;
}

.masonry-item:hover {
    transform: translateY(-4px);
}

/* Image */
.masonry-item img {
    width: 80px;
    height: 110px;
    border-radius: 12px;
    object-fit: cover;
}

/* Content */
.masonry-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.masonry-title {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 700;
}

.masonry-chapter {
    font-size: 0.8rem;
    color: var(--text-main);
}

.masonry-time {
    font-size: 0.7rem;
    color: var(--accent);
}

/* FEATURED */
.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.featured-card {
    height: 350px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    padding: 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Badge */
.featured-badge {
    align-self: flex-start;
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
	z-index:999;
}

/* Title */
.featured-title {
    font-size: 2.2rem;
    margin-top: 15px;
    line-height: 1.2;
	z-index:999;
}

/* Description */
.featured-desc {
    opacity: 0.9;
    margin-top: 10px;
    max-width: 80%;
    font-size: 0.95rem;
	z-index:999;
}

/* Button */
.featured-btn {
    margin-top: 25px;
    padding: 12px 35px;
    border-radius: 30px;
    border: none;
    font-weight: 700;
    background: #fff;
    color: var(--primary);
    cursor: pointer;
    width: fit-content;
    transition: 0.3s;
	z-index:999;
}

.featured-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
.featured-image {
    position: absolute;
    right: -20px; /* Đẩy nhẹ ra ngoài rìa để tạo chiều sâu */
    bottom: -10px;
    height: 110%; /* Cho ảnh cao hơn card một chút */
    width: auto;
    opacity: 0.8; /* Làm mờ nhẹ để hòa hợp với gradient */
    transform: rotate(-5deg); /* Xoay nhẹ cho nghệ thuật */
    transition: 0.5s ease;
    pointer-events: none; /* Tránh việc click nhầm vào ảnh */
}

/* Hiệu ứng khi di chuột vào card */
.featured-card:hover .featured-image {
    transform: rotate(0deg) scale(1.1);
    opacity: 1;
}

/* RECENT */
.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-item img {
    width: 40px;
    height: 55px;
    border-radius: 6px;
    object-fit: cover;
}

.recent-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.recent-title {
    font-size: 0.8rem;
    font-weight: 600;
}

.recent-meta {
    font-size: 0.7rem;
    color: var(--text-sub);
}

        .main-feat { height: 350px; border-radius: var(--radius); background: linear-gradient(135deg, #6c5ce7, #a29bfe); position: relative; overflow: hidden; color: white; padding: 30px; }
.footer {
    background: linear-gradient(135deg, rgba(var(--card-bg-rgb),0.95), rgba(var(--card-bg-rgb),0.85));
    padding: 10px 0;
    color: var(--text-sub);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Row & Columns */
.footer .row {
    display: flex;
    flex-wrap: wrap;
    gap: 35px;
}

.footer-col {
    flex: 1 1 280px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transition: all 0.5s ease;
    position: relative;
}

.footer-col:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

/* Tiêu đề cột */
.footer-col h4 {
    font-size: 24px;
    color: var(--text-main);
    margin-bottom: 25px;
    font-weight: 800;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Underline gradient động neon */
.footer-col h4::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    height: 4px;
    width: 60px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 10px var(--accent);
    transition: width 0.4s ease, box-shadow 0.4s ease;
}

.footer-col:hover h4::before {
    width: 100%;
    box-shadow: 0 0 15px var(--accent);
}

/* Text & Links */
.footer-col p {
    color: var(--text-sub);
    line-height: 1.9;
    font-size: 15px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: var(--text-sub);
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
}

.footer-col ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    border-radius: 1px;
    background: var(--accent);
    transition: 0.3s;
}

.footer-col ul li a:hover::after {
    width: 100%;
}

.footer-col ul li a:hover {
    color: var(--text-main);
    transform: translateX(5px);
}

/* Social Links Neon Glow */
.social-links a {
    display: inline-flex;
	display: none;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
    margin: 0 12px 15px 0;
    border-radius: 50%;
    font-size: 20px;
    background: rgba(var(--card-bg-rgb),0.1);
    color: var(--text-main);
    transition: all 0.5s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    transform: translateY(-8px) scale(1.2) rotate(5deg);
    box-shadow: 0 0 20px var(--accent), 0 15px 40px rgba(0,0,0,0.3);
}

/* Subscribe Form Material Glass */
.subscribe-form {
    display: flex;
    margin-top: 25px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    background: rgba(var(--card-bg-rgb),0.12);
    transition: all 0.4s ease;
}

.subscribe-form input {
    flex: 1;
    padding: 16px 25px;
    font-size: 14px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
}

.subscribe-form input::placeholder {
    color: var(--text-sub);
}

.subscribe-form button {
    padding: 16px 35px;
    border: none;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
}

.subscribe-form button:hover {
    filter: brightness(115%);
    transform: scale(1.08);
}

/* Footer Bottom Neon */
.footer-bottom {
    text-align: center;
    font-size: 14px;
    color: var(--text-sub);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
	padding:30px;
}

.footer-bottom i {
    color: var(--accent);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { text-shadow: 0 0 5px var(--accent); }
    100% { text-shadow: 0 0 15px var(--accent); }
}

/* Responsive */
@media(max-width: 991px) {
    .footer .row {
        flex-direction: column;
        gap: 25px;
    }
}

@media(max-width: 576px) {
    .subscribe-form {
        flex-direction: column;
    }

    .subscribe-form input,
    .subscribe-form button {
        width: 100%;
        border-radius: 0;
    }

    .subscribe-form button {
        margin-top: 12px;
    }
}
/* =====================
   MAIN INFO
===================== */
.main-info {
	    background: var(--card-bg);
    border-radius: 14px;
    padding: 15px 20px;
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
	    box-shadow: var(--shadow);
}

.comic-cover {
    flex: 0 0 280px;
	position: relative;
}
.comic-cover img {
    width: 100%;
	height:auto;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}
.comic-cover:hover img {
            transform: translateY(-5px);
        }
/* =====================
   DETAILS
===================== */
.comic-details h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.meta-data {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.badge {
    background: rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-sub);
    width: fit-content;
}

/* Trạng thái chung */
.story-meta .story-chuong{margin-bottom:10px}
.story-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
	width: fit-content;
	    text-align: center;
}
/* Trạng thái riêng biệt */
.story-status.status-active {
    background: #d4f5d4;
    color: #2a8f2a;
}

.story-status.status-complete {
    background: #d4e7fb;
    color: #1a73e8;
}

.story-status.status-paused {
    background: #fff3d4;
    color: #e68f00;
}


.description {
    margin-top: 15px;
    background: rgba(0,0,0,0.04);
    padding: 10px;
    border-radius: 12px;
    color: var(--text-sub);
    line-height: 1.8;
}

/* =====================
   BUTTON
===================== */
.actions {
    margin-top: 0;
    text-align: center;
}

.btn-doctruyen {
	    position: relative;
    overflow: hidden;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    background: var(--primary);
    color: white;
    transition: 0.3s;
}
.btn-doctruyen:hover {
    opacity: 0.9;
    box-shadow: var(--shadow);
}
/* Hiệu ứng tia sáng quét qua khi hover (tùy chọn) */
.btn-doctruyen::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.btn-doctruyen:hover::after {
    left: 100%;
}
.chapter-count {
	position: relative;
	overflow: hidden;
	margin-top:10px;
    display: inline-block;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: #fff;
    padding: 12px 28px;
    font-size: 13px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
/* Hiệu ứng tia sáng quét qua khi hover (tùy chọn) */

.chapter-count::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}


.chapter-count:hover::after {
    left: 100%;
}
/* =====================
   CHAPTERS
===================== */
.chapter-section {
    margin-top: 40px;
}

.chapter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.chapter-item {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: 0.3s;
    border: 1px solid transparent;
	gap:10px;
}
.chapter-item:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.chapter-item a {
    color: var(--text-main);
    text-decoration: none;
}

.chapter-time {
    font-size: 12px;
    color: var(--text-sub);
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 850px) {
    .main-info {
        flex-direction: column;
        text-align: center;
    }
    .chapter-grid {
        grid-template-columns: 1fr;
    }
}
.story-header{text-align:center;margin-bottom:20px;padding:20px 20px;background:var(--card-bg);border-radius:var(--radius);box-shadow:var(--shadow);position:relative;}
.breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-bottom:18px;padding:10px 16px;background:var(--card-bg);border-radius:14px;box-shadow:var(--shadow);font-size:0.95rem;}
.breadcrumb a{color:var(--text-sub);text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:color 0.2s ease;}
.breadcrumb a:hover{color:var(--primary);}
.breadcrumb .sep{opacity:0.4;font-size:1rem;}
.breadcrumb .current{color:var(--primary);font-weight:600;}
@media (max-width:600px){.breadcrumb{font-size:0.85rem;padding:8px 12px;}}
.story-name{font-size:1.8rem;font-weight:800;color:var(--primary);margin-bottom:10px;text-transform:uppercase;letter-spacing:0.5px;}
.chapter-info{font-size:1.2rem;color:var(--text-sub);font-weight:500;}
.meta-info{margin-top:8px;font-size:0.95rem;color:var(--text-sub);display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap;}
.meta-info i{color:var(--primary);margin-right:4px;}
.meta-info .dot{opacity:0.6;}
.chapter-content{padding: 30px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);font-size:var(--font-size);line-height:var(--line-height);color:var(--text-main);margin-bottom:60px;}
.chapter-content p{margin-bottom:20px;}
.bottom-nav{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:15px;background:var(--card-bg);padding:10px 20px;border-radius:50px;box-shadow:var(--shadow);border:1px solid rgba(0,0,0,0.05);z-index:100;width:max-content;}
.nav-btn{background:transparent;border:none;color:var(--text-sub);font-size:1rem;font-weight:600;cursor:pointer;padding:10px 15px;border-radius:20px;display:flex;align-items:center;gap:8px;transition:all 0.2s ease;text-decoration:none;}
.nav-btn:hover{color:var(--primary);background:rgba(108,92,231,0.1);}
.nav-btn.list-btn{color:var(--primary);}
@media (max-width:600px){.nav-btn{font-size:0.8rem;}.story-name{font-size:1.4rem;}.chapter-info{font-size:1rem;}.container{padding:15px;}.bottom-nav{width:90%;justify-content:space-between;bottom:15px;}.nav-btn span{display:none;}.nav-btn i{font-size:1.2rem;}.nav-btn{padding:10px;}}
.chuong-lock {
    max-width: 100%;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lock-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.lock-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.lock-text strong {
    color: #ff6600;
}

.buy-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(90deg, #ff7a00, #ff4a00);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255,74,0,0.4);
}

.buy-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(255,74,0,0.5);
}

@media (max-width: 500px) {
    .chuong-lock {
        padding: 25px 15px;
    }
    .lock-icon {
        font-size: 40px;
    }
    .buy-btn {
        width: 100%;
        padding: 12px 0;
    }
}
/* ===== MÀU TÊN THEO ROLE ===== */
.bhv-role-administrator, 
.bhv-role-administrator a {
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ff0000, #ff7300, #fffb00, #ff0000);
    background-size: 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow_animation 8s linear infinite;
    filter:
  drop-shadow(0 0 6px rgba(255,115,0,.6))
  drop-shadow(2px 2px 4px rgba(0,0,0,.35));
}

@keyframes rainbow_animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bhv-role-editor a,
.bhv-role-editor {
    color: #9b59b6 !important;
}

.bhv-role-author a,
.bhv-role-author {
    font-weight: bold;
    position: relative;
    align-items: center;
    gap: 8px;
    
    /* Màu nền gradient hologram */
    background: linear-gradient(
        135deg, 
        #00e5ff 0%, 
        #ffffff 25%, 
        #00e5ff 50%, 
        #ffffff 75%, 
        #00e5ff 100%
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Tạo độ nổi khối và phát sáng lan tỏa */
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.6));
    animation: 
        gradientMove 3s ease infinite,
        gentleFloat 2s ease-in-out infinite;
}

/* Hiệu ứng chuyển động luồng sáng */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hiệu ứng chữ hơi bay bổng nhẹ nhàng */
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
}

.bhv-role-contributor {
    font-weight: bold;    
    background: linear-gradient(
        to right, 
        #16a085 20%, 
        #1abc9c 40%, 
        #f1c40f 60%, 
        #16a085 80%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
    transition: all 0.3s ease;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.bhv-role-icon i {
    -webkit-text-fill-color: initial;
    animation: beat 2s infinite ease-in-out;
}

@keyframes beat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.bhv-role-bhv-role-mod {
    align-items: center;
    font-weight: bold;
    background: linear-gradient(
        to right, 
        #00e5ff, #00ff88, #ff00ea, #ffcc00, #00e5ff
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.1));
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.bhv-role-icon i {
    -webkit-background-clip: initial;
    background-clip: initial;
    color: #00e5ff;
    margin-right: 5px;
}
.bhv-role-subscriber a,
.bhv-role-subscriber {
    color: #7f8c8d !important;
}

.rank-glass-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.rank-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Thẻ tác giả với hiệu ứng hover nâng cao */
.rank-card {
    display: flex;
    align-items: center;
    padding: 14px;
    background: #f8fafc;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.rank-card:hover {
    transform: translateY(-5px);
}

.rank-number-box {
    width: 32px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #94a3b8;
}

.rank-avatar-wrapper {
    position: relative;
    margin-right: 14px;
}

.rank-img {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: cover;
    background: #eee;
}

/* Hiệu ứng hào quang cho vị trí dẫn đầu */
/* Top 1 – Vàng */
.card-gold {
    background: linear-gradient(135deg, #fffbe6 0%, #fff1c2 100%);
    border: 1px solid #fde68a;
}
.card-gold .rank-number-box { color: #f59e0b; }
.card-gold .rank-shine { box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.2); }
.card-gold .rank-trend-label {
    background: #f59e0b;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

/* Top 2 – Bạc */
.card-silver {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
}
.card-silver .rank-number-box { color: #64748b; }
.card-silver .rank-shine { box-shadow: inset 0 0 0 2px rgba(148, 163, 184, 0.2); }
.card-silver .rank-trend-label {
    background: #64748b;
    box-shadow: 0 4px 10px rgba(100, 116, 139, 0.3);
}

/* Top 3 – Đồng */
.card-bronze {
    background: linear-gradient(135deg, #fef7f0 0%, #fcd9b6 100%);
    border: 1px solid #fbbf24;
}
.card-bronze .rank-number-box { color: #d97706; }
.card-bronze .rank-shine { box-shadow: inset 0 0 0 2px rgba(217, 119, 6, 0.2); }
.card-bronze .rank-trend-label {
    background: #d97706;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}
.rank-shine {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.2);
    border-radius: 16px;
}

.rank-content {
    flex-grow: 1;
}

.rank-name {
    display: block;
    font-weight: 700;
    color: #334155;
    font-size: 0.95rem;
}
.rank-name a{
    color: #334155;
}
.rank-stats {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.rank-trend-label {
    font-size: 10px;
    font-weight: 700;
    background: #f59e0b;
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
	    display: inline-block;
    white-space: nowrap;
}
