:root {
    --c-bg: #fcf6f5;          
    --c-primary: #ffafcc;     
    --c-secondary: #bde0fe;   
    --c-accent: #cdb4db;      
    --c-text: #333333;        
    --c-text-light: #888;
    --c-white: #ffffff;
    --gap: 15px;
    --radius: 10px;
    --shadow: 0 4px 10px rgba(205, 180, 219, 0.2);
}


* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Alata', sans-serif; font-weight: 400; background-color: var(--c-bg); color: var(--c-text); line-height: 1.6; font-size: 15px; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1440px; margin: 0 auto; padding: 0 15px; }
h1, h2, h3, h4, h5, h6, strong, b { font-weight: 400; }


.site-header { background: var(--c-white); padding: 12px 0; box-shadow: var(--shadow); margin-bottom: 25px; position: relative; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; position: relative; min-height: 50px; }
.site-branding { flex-shrink: 0; margin-right: 30px; }
.site-branding img { max-height: 50px; width: auto; }
.text-logo h1 { font-size: 1.8rem; color: var(--c-accent); margin: 0; letter-spacing: 0.5px; }
.site-navigation-wrap { display: flex; justify-content: space-between; align-items: center; flex-grow: 1; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.main-navigation ul li { position: relative; }
.main-navigation ul li a { display: block; padding: 10px 0; color: var(--c-text); font-size: 1rem; transition: 0.2s; }
.main-navigation ul li a:hover { color: var(--c-primary); }
.main-navigation ul ul { display: block; position: absolute; top: 100%; left: 0; background: #fff; min-width: 200px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-radius: 8px; flex-direction: column; gap: 0; padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; z-index: 99; }
.main-navigation ul li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.main-navigation ul ul li { padding: 0 20px; }
.main-navigation ul ul li a { padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 0.95rem; }
.main-navigation ul ul li:last-child a { border-bottom: none; }
.header-search { position: relative; width: 250px; }
.search-form { display: flex; align-items: center; position: relative; }
.search-field { width: 100%; padding: 8px 35px 8px 15px; border: 1px solid #eee; background: #f9f9f9; border-radius: 20px; font-family: 'Alata', sans-serif; font-size: 0.9rem; outline: none; transition: 0.3s; }
.search-field:focus { border-color: var(--c-primary); background: #fff; }
.search-submit { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--c-text-light); cursor: pointer; padding: 5px; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--c-text); padding: 5px; }


.hero-section { margin-bottom: 30px; }
.hero-grid { display: grid; grid-template-columns: 1fr 350px; gap: var(--gap); height: 420px; }
.hero-banner-dynamic { position: relative; border-radius: var(--radius); overflow: hidden; background: #eee; box-shadow: var(--shadow); height: 100%; transform: translateZ(0); }
.hero-bg-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 10s ease; will-change: transform; }
.hero-banner-dynamic:hover .hero-bg-img { transform: scale(1.1); }
.hero-content-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; pointer-events: none; }
.hero-content-overlay a { pointer-events: auto; }
.hero-tag { background: var(--c-primary); color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; width: fit-content; margin-bottom: 10px; }
.hero-title { font-size: 2.2rem; line-height: 1.2; margin-bottom: 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero-meta { display: flex; gap: 15px; font-size: 0.95rem; opacity: 0.9; margin-bottom: 20px; }
.hero-cta-btn { background: #fff; color: #333; padding: 10px 25px; border-radius: 30px; font-weight: bold; width: fit-content; transition: 0.3s; }
.hero-cta-btn:hover { background: var(--c-primary); color: #fff; }
.hero-bookshelf { background: #fdfdfd; border-radius: var(--radius); padding: 0; box-shadow: var(--shadow); display: block; overflow: hidden; position: relative; perspective: 1200px; height: 100%; min-height: 360px; transform: translateZ(0); }
.shelf-title { font-size: 1.1rem; margin: 20px 0 10px 0; color: var(--c-primary); border-bottom: 2px solid #eee; padding-bottom: 10px; text-align: center; position: relative; z-index: 20; background: #fdfdfd; }
.carousel-3d-wrap { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; transform-style: preserve-3d; }
.carousel-item { position: absolute; width: 130px; aspect-ratio: 2/3; border-radius: 5px; background: #fff; transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 10px 20px rgba(0,0,0,0.25); overflow: hidden; opacity: 0; bottom: 65px; left: 50%; margin-left: -65px; transform-origin: center bottom; z-index: 10; will-change: transform, opacity; }
.carousel-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.shelf-wood { height: 20px; background: #e6dbd0; border-radius: 2px; position: absolute; bottom: 40px; width: 120%; left: -10%; z-index: 1; box-shadow: 0 15px 10px rgba(0,0,0,0.1); border-top: 8px solid #dcc6b6; }
.carousel-item.pos-3 { opacity: 1; z-index: 15; transform: translateX(0) scale(1.3) translateZ(20px); box-shadow: 0 5px 5px rgba(24, 24, 24, 0.6); border: 2px solid #fff; }
.carousel-item.pos-2 { opacity: 0.9; z-index: 10; transform: translateX(-100px) scale(0.95) rotateY(20deg); filter: brightness(0.9); }
.carousel-item.pos-4 { opacity: 0.9; z-index: 10; transform: translateX(100px) scale(0.95) rotateY(-20deg); filter: brightness(0.9); }
.carousel-item.pos-1 { opacity: 0; z-index: 5; transform: translateX(-180px) scale(0.7); }
.carousel-item.pos-5 { opacity: 0; z-index: 5; transform: translateX(180px) scale(0.7); }
.hero-bookshelf::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 60px; background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); z-index: 2; pointer-events: none; }

.main-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 30px; margin-bottom: 0 !important; } 
.home-bottom-area { margin-top: 20px !important; padding-top: 0 !important; border-top: none; }
.story-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); }
.genre-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--gap); }

.tab-wrapper { margin-bottom: 30px; }
input[class^="tab-trigger"], input[class^="genre-trigger"] { display: none; }
.tab-labels, .genre-tab-labels { display: flex; gap: 15px; margin-bottom: 25px; border-bottom: 2px solid #eee; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.tab-labels::-webkit-scrollbar, .genre-tab-labels::-webkit-scrollbar { display: none; }
.tab-label, .genre-tab-label { font-size: 1.1rem; color: var(--c-text-light); cursor: pointer; padding: 10px 15px; position: relative; transition: 0.3s; flex-shrink: 0; }
.genre-tab-label { color: var(--c-text); padding: 8px 16px; border-radius: 6px; background: transparent; }
.tab-label:hover, .genre-tab-label:hover { color: var(--c-primary); }
.tab-trigger-new:checked ~ .tab-labels .tab-label-new, .tab-trigger-hot:checked ~ .tab-labels .tab-label-hot, .tab-trigger-rec:checked ~ .tab-labels .tab-label-rec { color: var(--c-text); }
.tab-trigger-new:checked ~ .tab-labels .tab-label-new::after, .tab-trigger-hot:checked ~ .tab-labels .tab-label-hot::after, .tab-trigger-rec:checked ~ .tab-labels .tab-label-rec::after { content: ''; display: block; width: 100%; height: 3px; background: var(--c-primary); position: absolute; bottom: -2px; left: 0; }
.genre-trigger-1:checked ~ .genre-tab-labels .g-label-1, .genre-trigger-2:checked ~ .genre-tab-labels .g-label-2, .genre-trigger-3:checked ~ .genre-tab-labels .g-label-3, .genre-trigger-4:checked ~ .genre-tab-labels .g-label-4 { background: var(--c-primary); color: #fff; box-shadow: 0 4px 10px rgba(255, 175, 204, 0.4); }
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-trigger-new:checked ~ .content-new, .tab-trigger-hot:checked ~ .content-hot, .tab-trigger-rec:checked ~ .content-rec, .genre-trigger-1:checked ~ .content-g1, .genre-trigger-2:checked ~ .content-g2, .genre-trigger-3:checked ~ .content-g3, .genre-trigger-4:checked ~ .content-g4 { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.story-card { position: relative; }
.story-card:hover .card-thumb-wrap img { transform: scale(1.05); }
.story-card:hover .card-title { color: var(--c-primary); }
.card-thumb-wrap { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 2/3; margin-bottom: 8px; box-shadow: 0 3px 6px rgba(0,0,0,0.1); }
.card-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.badge { position: absolute; top: 8px; left: 8px; padding: 4px 8px; font-size: 0.7rem; border-radius: 4px; color: #fff; z-index: 3; box-shadow: 0 2px 4px rgba(0,0,0,0.2); font-weight: 400; }
.badge-hot { background: #ff4757; }
.badge-new { background: #2ed573; }
.badge-full { background: #1e90ff; top: 8px; right: 8px; left: auto; }
.card-meta-overlay { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: 30px 8px 6px; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%); display: flex; justify-content: space-between; align-items: flex-end; color: #fff; font-size: 0.8rem; text-shadow: 0 1px 2px rgba(0,0,0,0.9); }
.meta-rating { display: flex; align-items: center; color: #ffd700; gap: 3px; font-weight: 400; }
.meta-listen { opacity: 0.95; font-size: 0.75rem; font-weight: 400; }
.card-title { font-size: 0.95rem; font-weight: 400; line-height: 1.4; color: var(--c-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.8em; }

.widget, .home-widget-block { margin-bottom: 25px; background: var(--c-white); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.widget-title { font-size: 1.1rem; margin-bottom: 15px; border-bottom: 2px solid var(--c-bg); padding-bottom: 10px; font-weight: 400; color: var(--c-primary); text-transform: uppercase; }
.bxh-list { list-style: none; padding: 0; margin: 0; }
.bxh-item { display: flex; align-items: center; margin-bottom: 10px; border-bottom: 1px dashed #eee; padding-bottom: 10px; }
.bxh-item:last-child { margin-bottom: 0; border: none; padding-bottom: 0; }
.bxh-number { width: 24px; height: 24px; border-radius: 6px; background: #eee; color: #666; font-size: 0.8rem; font-weight: bold; display: flex; align-items: center; justify-content: center; margin-right: 8px; flex-shrink: 0; }
.bxh-item.rank-1 .bxh-number { background: #ff9f1c; color: #fff; }
.bxh-item.rank-2 .bxh-number { background: #5db995; color: #fff; }
.bxh-item.rank-3 .bxh-number { background: #4cc9f0; color: #fff; }
.bxh-thumb-link { flex-shrink: 0; width: 48px; height: 72px; margin-right: 10px; border-radius: 5px; overflow: hidden; display: block; }
.bxh-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.bxh-item:hover .bxh-thumb { transform: scale(1.1); }
.bxh-info { flex: 1; min-width: 0; }
.bxh-title { font-size: 0.9rem; margin-bottom: 3px; line-height: 1.3; font-weight: 400; }
.bxh-title a { color: var(--c-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bxh-item:hover .bxh-title a { color: var(--c-primary); }
.bxh-meta { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--c-text-light); }
.bxh-rating { display: flex; align-items: center; gap: 2px; color: #ffd700; font-weight: 400; }
.bxh-views { opacity: 0.8; }


.breadcrumb { margin-bottom: 20px; font-size: 0.9rem; color: var(--c-text-light); }
.breadcrumb a { color: var(--c-text); font-weight: 500; }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb .sep { margin: 0 8px; color: #ccc; }
.breadcrumb .current { color: var(--c-text-light); }
.story-header-wrap { background: #fff; border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow); margin-bottom: 30px; position: relative; }
.story-header-grid { display: flex; gap: 30px; }
.kk-rating-absolute { position: absolute; top: 25px; right: 25px; z-index: 10; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 10px 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 140px; }
.kk-rating-absolute .kk-star-ratings { display: flex !important; flex-direction: column !important; align-items: center !important; margin: 0 !important; float: none !important; }
.kk-rating-absolute .kksr-stars { margin-bottom: 5px !important; line-height: 1 !important; }
.kk-rating-absolute .kksr-stars a { width: 20px !important; }
.kk-rating-absolute .kksr-legend { font-size: 0.85rem !important; font-weight: 600 !important; color: #555 !important; margin: 0 !important; white-space: nowrap; text-align: center; }
.story-cover { width: 200px; flex-shrink: 0; }
.story-cover .card-thumb-wrap { margin-bottom: 0; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.story-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.single-title { font-size: 1.6rem; margin-bottom: 10px; line-height: 1.3; color: var(--c-text); font-weight: bold; padding-right: 150px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 15px 30px; margin-bottom: 15px; font-size: 0.95rem; color: #555; padding-bottom: 15px; border-bottom: 1px dashed #eee; }
.meta-item { display: inline-flex; align-items: center; }
.meta-item strong { color: #333; font-weight: 600; margin-left: 4px; }
.meta-item a { color: var(--c-primary); margin-left: 4px; }
.s-icon { width: 16px; height: 16px; margin-right: 6px; stroke: var(--c-text-light); stroke-width: 2; vertical-align: text-bottom; }
.stats-row.compact-stats { display: flex; gap: 25px; margin-bottom: 20px; background: #fff; padding: 0; border: none; }
.stat-box { display: inline-flex; align-items: center; font-size: 0.9rem; color: #666; }
.s-icon-lg { width: 20px; height: 20px; margin-right: 8px; stroke: var(--c-primary); stroke-width: 1.5; }
.story-desc-block { margin-bottom: 20px; position: relative; }
.desc-label { font-weight: bold; margin-bottom: 5px; color: var(--c-primary); text-transform: uppercase; font-size: 0.8rem; }
.desc-inner .kk-star-ratings, .desc-inner .kksr-legend-div, .desc-inner .kksr-stars { display: none !important; }
.desc-content-wrap { position: relative; font-size: 0.95rem; line-height: 1.6; color: #444; overflow: hidden; transition: max-height 0.3s ease; }
.desc-content-wrap.collapsed { max-height: 100px; }
.desc-content-wrap.expanded { max-height: none; }
.desc-gradient { position: absolute; bottom: 0; left: 0; width: 100%; height: 40px; background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1)); pointer-events: none; transition: opacity 0.3s; }
.desc-content-wrap.expanded .desc-gradient { opacity: 0; pointer-events: none; }
.btn-text-expand { display: block; margin-top: 8px; background: none; border: none; color: var(--c-primary); font-weight: bold; font-size: 0.85rem; cursor: pointer; padding: 0; }
.btn-text-expand:hover { text-decoration: underline; }
.action-buttons { display: flex; gap: 15px; margin-top: auto; }
.btn { padding: 12px 30px; border-radius: 30px; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: 0.2s; border: none; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px; }
.btn-play { background: linear-gradient(135deg, var(--c-primary), #ff8fab); color: #fff; box-shadow: 0 4px 15px rgba(255, 175, 204, 0.4); }
.btn-play:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 175, 204, 0.6); color: #fff; }
.btn-save { background: #f8f9fa; color: #555; border: 1px solid #eee; }
.btn-save:hover { background: #fff; border-color: var(--c-primary); color: var(--c-primary); }
.audio-player-placeholder { margin-bottom: 40px; background: #222; border-radius: var(--radius); padding: 20px; color: #fff; text-align: center; box-shadow: var(--shadow); }
.related-section { margin-bottom: 40px; }
.section-title { font-size: 1.2rem; border-left: 4px solid var(--c-primary); padding-left: 10px; margin-bottom: 20px; font-weight: 600; color: var(--c-text); }


.archive-header { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); margin-bottom: 30px; border-left: 5px solid var(--c-primary); }
.archive-header-inner { display: flex; align-items: center; gap: 20px; }
.arc-icon-wrap { width: 60px; height: 60px; background: var(--c-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.arc-icon { width: 30px; height: 30px; stroke: var(--c-primary); }
.arc-info { flex: 1; }
.archive-title { font-size: 1.8rem; margin-bottom: 5px; color: var(--c-text); font-weight: bold; text-transform: capitalize; }
.archive-desc { font-size: 0.95rem; color: #666; line-height: 1.5; }
.archive-empty { text-align: center; padding: 50px 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); color: #777; font-size: 1.1rem; }
.archive-filter-bar { margin-top: 20px; padding-top: 20px; border-top: 1px dashed #eee; }
.filter-form { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { font-weight: 600; color: var(--c-text); display: flex; align-items: center; font-size: 0.95rem; }
.filter-select { padding: 8px 30px 8px 12px; border: 1px solid #ddd; border-radius: 20px; background-color: #f9f9f9; color: #555; font-family: 'Alata', sans-serif; font-size: 0.9rem; outline: none; cursor: pointer; transition: 0.2s; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.filter-select:hover { border-color: var(--c-primary); background-color: #fff; }
.filter-select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(255, 175, 204, 0.2); }

/* --- FIX LỖI PHÂN TRANG (PAGINATION) --- */
.audiostory-pagination { 
    margin-top: 50px; 
    margin-bottom: 40px; 
    text-align: center; 
}

/* Container của WordPress Pagination (fix lỗi flex khiến nó bị méo) */
.audiostory-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px; /* Khoảng cách giữa các số */
}

/* Item Phân trang */
.page-numbers { 
    display: inline-flex; /* QUAN TRỌNG: inline-flex giúp nó không bị full width */
    align-items: center; 
    justify-content: center; 
    min-width: 40px; 
    height: 40px; 
    padding: 0 14px; 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 50%; 
    color: var(--c-text); 
    font-weight: 600; 
    font-size: 0.95rem; 
    transition: all 0.2s ease; 
    text-decoration: none; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    /* margin: 0 4px; -> Đã dùng gap ở trên */
}
.page-numbers:hover, .page-numbers.current { 
    background: var(--c-primary); 
    color: #fff; 
    border-color: var(--c-primary); 
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(255, 175, 204, 0.4); 
}
.page-numbers.prev, .page-numbers.next { 
    border-radius: 20px; 
    padding: 0 20px; /* Tăng padding nút Next/Prev cho đẹp */
}


.audio-player-wrapper { margin-bottom: 40px; }


.main-audio-player.light-theme { 
    background: #fff; color: #333; padding: 20px; 
    border-radius: var(--radius); box-shadow: 0 5px 25px rgba(0,0,0,0.06); 
    margin-bottom: 20px; position: relative; border: 1px solid #f0f0f0; 
}


.sv-dropdown-wrap {
    position: absolute; top: 15px; right: 15px; z-index: 50;
}


.sv-trigger {
    background: #f5f5f5; border: 1px solid #eee;
    padding: 6px 12px; border-radius: 20px;
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; transition: 0.2s ease;
    font-size: 0.8rem; color: #555; font-weight: 600;
}
.sv-trigger:hover, .sv-trigger.active {
    background: #fff; border-color: var(--c-primary);
    color: var(--c-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.sv-icon svg, .sv-arrow svg { display: block; }
.sv-arrow svg { transition: transform 0.2s; }
.sv-trigger.active .sv-arrow svg { transform: rotate(180deg); }


.sv-menu {
    position: absolute; top: 110%; right: 0;
    background: #fff; min-width: 180px;
    border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
    padding: 5px;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: 0.2s ease;
}
.sv-menu.show {
    opacity: 1; visibility: visible; transform: translateY(0);
}


.sv-item {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 8px 12px;
    border: none; background: none;
    text-align: left; font-size: 0.85rem; color: #666;
    cursor: pointer; border-radius: 5px; transition: 0.1s;
}
.sv-item:hover { background: #fafafa; color: var(--c-primary); }
.sv-item.active { background: #fff0f6; color: var(--c-primary); font-weight: bold; }

.sv-check { opacity: 0; font-size: 0.8rem; font-weight: bold; width: 15px; }
.sv-item.active .sv-check { opacity: 1; }


/* --- PLAYER HEADER (Mặc định PC: Tĩnh, có dấu ...) --- */
.player-header {
    text-align: center;
    margin-bottom: 12px;
    padding-top: 15px;
}

.track-title {
    font-size: 1.1rem;
    color: #333;
    font-weight: 700;
    margin: 0 auto;
    
    /* Mặc định trên PC: Ẩn bớt nếu dài */
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-container { width: 100%; height: 6px; background: #eee; border-radius: 10px; cursor: pointer; position: relative; margin-bottom: 12px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--c-primary); border-radius: 10px; width: 0%; transition: width 0.1s linear; position: relative; }
.player-bottom-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.time-display { font-size: 0.8rem; color: #888; font-weight: 500; font-family: monospace; min-width: 80px; }
.player-controls { display: flex; align-items: center; gap: 15px; flex: 1; justify-content: center; }
.ctrl-btn { background: none; border: none; color: #666; cursor: pointer; transition: 0.2s; padding: 0; display: flex; align-items: center; }
.ctrl-btn:hover { color: var(--c-primary); transform: scale(1.1); }
.btn-main-play { width: 45px; height: 45px; border-radius: 50%; background: var(--c-primary); color: #fff; box-shadow: 0 4px 15px rgba(255, 175, 204, 0.5); display: flex; align-items: center; justify-content: center; }
.btn-main-play:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255, 175, 204, 0.7); }
.btn-main-play svg, .btn-main-play path, .btn-main-play rect, .btn-main-play polygon { fill: #ffffff !important; stroke: none !important; }
.btn-main-play svg { display: block; pointer-events: none; }
.ctrl-btn-sm { background: none; border: none; color: #999; cursor: pointer; font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 2px; transition: 0.2s; }
.ctrl-btn-sm:hover { color: var(--c-primary); }
.ctrl-btn-sm svg { width: 14px; height: 14px; }
.player-right-actions { min-width: 80px; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.btn-action { background: #f5f5f5; border: 1px solid #ddd; border-radius: 8px; padding: 0; width: 32px; height: 32px; font-size: 0.75rem; font-weight: bold; color: #555; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-action:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
#btn-speed { width: auto; padding: 0 8px; }


/* --- PLAYLIST (Tối ưu padding & Icon Download) --- */
.playlist-container { background: #fff; border: 1px solid #eee; border-radius: var(--radius); overflow: hidden; max-height: 350px; display: flex; flex-direction: column; box-shadow: 0 5px 15px rgba(0,0,0,0.03); }
.playlist-header { padding: 12px 20px; background: #fafafa; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.pl-title { font-weight: 600; color: #444; font-size: 0.95rem; }
.pl-count { font-size: 0.8rem; background: #eee; padding: 2px 8px; border-radius: 10px; color: #666; }
.playlist-ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; scroll-behavior: smooth; content-visibility: auto; contain-intrinsic-size: 1px 1000px; }
.playlist-ul::-webkit-scrollbar { width: 5px; }
.playlist-ul::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

/* Tối ưu padding item */
.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px 8px !important; /* Giữ tối ưu này cho cả PC/Mobile để thoáng */
    gap: 5px;
    border-bottom: 1px dashed #eee;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
    color: #555;
    contain: layout style;
}
.playlist-item:hover { background: #fdfdfd; color: var(--c-primary); padding-left: 15px !important; }
.playlist-item:last-child { border-bottom: none; }
.playlist-item.active { background: #fff0f6; color: var(--c-primary); font-weight: 600; border-left: 3px solid var(--c-primary); }

.p-num { width: 30px; font-size: 0.85rem; color: #aaa; flex-shrink: 0; }
.playlist-item.active .p-num { color: var(--c-primary); }

/* Tên truyện trong Playlist (Mặc định PC: Tĩnh) */
.p-title {
    flex: 1;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 5px !important;
}

/* Nút Download (Đẩy sát lề phải) */
.p-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Tăng vùng bấm */
    height: 32px;
    border-radius: 50%;
    color: #aaa;
    margin-right: 2px !important; /* Đẩy sát lề */
    flex-shrink: 0;
    transition: 0.2s;
    background: transparent;
}
.p-download:hover { background: #eee; color: var(--c-primary); transform: translateY(-2px); }
.p-status { width: 20px; display: flex; align-items: center; justify-content: center; opacity: 0; flex-shrink: 0; }
.playlist-item.active .p-status { opacity: 1; }
.playlist-item.active .icon-playing { fill: var(--c-primary); stroke: var(--c-primary); }


svg use { pointer-events: none; }
.p-download svg { fill: none; stroke: #aaa; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.p-download:hover svg { stroke: var(--c-primary); }
.p-status svg { fill: none; stroke: currentColor; stroke-width: 2; }


#btn-bg-music.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); box-shadow: 0 0 10px rgba(255, 175, 204, 0.6); }
.bg-music-popup { display: none; position: absolute; bottom: 50px; right: 0; width: 250px; background: #fff; border: 1px solid #eee; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.15); padding: 15px; z-index: 1000; text-align: left; animation: fadeInUp 0.2s ease; }
.bg-music-popup.show { display: block; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.bg-popup-header { display: flex; justify-content: space-between; align-items: center; font-weight: bold; margin-bottom: 15px; border-bottom: 1px dashed #eee; padding-bottom: 10px; color: var(--c-text); }
.close-icon { cursor: pointer; font-size: 1.2rem; color: #888; }
.close-icon:hover { color: red; }
.bg-popup-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 0.9rem; color: #555; }
.switch-toggle { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch-toggle input { opacity: 0; width: 0; height: 0; }
.slider-toggle { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 20px; }
.slider-toggle:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider-toggle { background-color: var(--c-primary); }
input:checked + .slider-toggle:before { transform: translateX(20px); }
#bg-volume { width: 100px; accent-color: var(--c-primary); cursor: pointer; }
.bg-popup-list { margin-top: 10px; }
.list-label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.85rem; }
#bg-track-list { list-style: none; margin: 0; padding: 0; max-height: 120px; overflow-y: auto; border: 1px solid #eee; border-radius: 5px; }
#bg-track-list li { padding: 6px 10px; font-size: 0.85rem; cursor: pointer; border-bottom: 1px dashed #f5f5f5; transition: 0.2s; }
#bg-track-list li:hover { background: #fafafa; color: var(--c-primary); }
#bg-track-list li.active { background: #fff0f6; color: var(--c-primary); font-weight: bold; }


.toast-notification { visibility: hidden; min-width: 250px; background-color: #333; color: #fff; text-align: center; border-radius: 50px; padding: 12px 25px; position: fixed; z-index: 9999; left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 0.9rem; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); opacity: 0; transition: opacity 0.5s, bottom 0.5s; display: flex; align-items: center; gap: 10px; }
.toast-notification.show { visibility: visible; opacity: 1; bottom: 50px; }
.toast-icon { font-size: 1.2rem; }


@media (max-width: 1200px) { 
    .story-grid, .genre-grid { grid-template-columns: repeat(4, 1fr); } 
}

@media (max-width: 992px) { 
    .menu-toggle { display: block; position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 101; }
    .header-inner { justify-content: center; }
    .site-branding { margin-right: 0; }
    .site-navigation-wrap { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: flex-start; padding: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-top: 1px solid #f0f0f0; }
    .site-navigation-wrap.toggled { display: flex; animation: slideDown 0.3s ease; }
    @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
    .main-navigation { width: 100%; margin-bottom: 20px; }
    .main-navigation ul { flex-direction: column; gap: 0; }
    .main-navigation ul li { border-bottom: 1px solid #f5f5f5; }
    .main-navigation ul li a { padding: 12px 0; }
    .main-navigation ul ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 20px; display: none; }
    .main-navigation ul li:hover > ul { display: block; }
    .header-search { width: 100%; }
    .hero-grid { grid-template-columns: 1fr; height: auto; } 
    .main-layout { grid-template-columns: 1fr; } 
    .hero-bookshelf { height: 320px; min-height: 320px; margin-top: 20px; }
    .shelf-wood { bottom: 30px; }
    .carousel-item { width: 100px; margin-left: -50px; bottom: 55px; }
    .carousel-item.pos-3 { box-shadow: 0 10px 20px rgba(255, 175, 204, 0.5); }
    .carousel-item.pos-2, .carousel-item.pos-4 { box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
    .carousel-item.pos-2 { transform: translateX(-70px) scale(0.9) rotateY(20deg); }
    .carousel-item.pos-4 { transform: translateX(70px) scale(0.9) rotateY(-20deg); }
    .carousel-item.pos-1, .carousel-item.pos-5 { opacity: 0; }
}

@media (max-width: 768px) { 
    .site-header { margin-bottom: 10px !important; padding: 10px 0 !important; }
    .hero-section { margin-bottom: 15px !important; }
    .main-layout { display: flex; flex-direction: column; margin-bottom: 15px !important; gap: 15px !important; }
    .home-bottom-area { margin-top: 0 !important; }
    .widget, .home-widget-block { margin-bottom: 15px !important; padding: 15px !important; }
    .story-grid { grid-template-columns: repeat(3, 1fr); gap: 10px !important; row-gap: 15px !important; }
    .genre-grid { grid-template-columns: repeat(3, 1fr); gap: 10px !important; row-gap: 15px !important; }
    .container { padding: 0 10px; }
    .tab-label, .genre-tab-label { font-size: 0.95rem; padding: 8px 10px; }
    .shelf-title, .widget-title { font-size: 1rem; }
    .hero-bookshelf { display: none !important; }
    .hero-grid { display: block !important; height: auto !important; }
    .hero-banner-dynamic { width: 100% !important; height: 200px !important; }
    .hero-content-overlay { padding: 15px !important; }
    .hero-title { font-size: 1.1rem !important; margin-bottom: 5px !important; }
    .hero-tag { font-size: 0.65rem !important; padding: 2px 8px !important; margin-bottom: 5px !important; }
    .bxh-item { padding-bottom: 8px !important; margin-bottom: 8px !important; }
    .bxh-thumb-link { width: 40px !important; height: 60px !important; }
    .story-header-grid { flex-direction: column; align-items: center; }
    .story-cover { width: 240px; max-width: 100%; margin: 0 auto 20px; }
    .story-info { text-align: center; width: 100%; }
    .single-title { padding-right: 0; font-size: 1.5rem; margin-bottom: 15px; }
    .kk-rating-absolute { position: static; margin: 0 auto 20px auto; display: flex; width: fit-content; box-shadow: none; border: 1px solid #eee; background: #fdfdfd; }
    .meta-row { justify-content: center; gap: 10px; }
    .stats-row.compact-stats { justify-content: center; flex-wrap: wrap; gap: 15px; }
    .stat-box { background: #f9f9f9; padding: 8px 12px; border-radius: 20px; }
    .action-buttons { justify-content: center; width: 100%; }
    .btn { flex: 1; max-width: 200px; padding: 12px 10px; font-size: 0.9rem; }
    .story-desc-block { text-align: left; }
    .archive-header-inner { flex-direction: column; text-align: center; }
    .archive-title { font-size: 1.5rem; }
    .filter-form { justify-content: center; }
    .filter-select { width: 100%; max-width: 200px; }
    
    /* --- VIBE CODE MOBILE: CHỮ CHẠY KHI MÀN HÌNH NHỎ --- */
    
    /* 1. Player Header Marquee */
    .player-header {
        max-width: 90%;
        margin-left: auto; margin-right: auto;
        overflow: hidden;
        mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
    }

    .track-title {
        max-width: none !important;
        text-overflow: clip !important;
        overflow: visible !important;
        display: inline-block;
        padding-left: 100%;
        animation: audiostory-marquee 12s linear infinite;
    }
    
    /* 2. Playlist Active Item Marquee */
    .playlist-item.active .p-title {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip !important;
        mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
        animation: playlist-marquee 12s linear infinite;
    }
}

@media (max-width: 480px) { 
    .story-grid { grid-template-columns: repeat(2, 1fr); }
    .genre-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 1.5rem; }
    .hero-content-overlay { padding: 20px; }
    .player-bottom-row { flex-wrap: wrap; justify-content: center; row-gap: 15px; }
    .time-display { order: 2; width: 45%; text-align: left; }
    .player-right-actions { order: 3; width: 45%; text-align: right; }
    .player-controls { order: 1; width: 100%; border-bottom: 1px dashed #eee; padding-bottom: 15px; }
    .p-download { width: 24px; height: 24px; margin-right: 5px; }
    .p-download svg { width: 14px; height: 14px; }
}


@media (max-width: 768px) {
    
    
    .hero-bookshelf { 
        display: none !important; 
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    
    .site-header { margin-bottom: 10px !important; padding: 10px 0 !important; }
    .hero-section { margin-bottom: 15px !important; }
    
    .main-layout { 
        display: flex; flex-direction: column; 
        margin-bottom: 15px !important; gap: 15px !important; 
    }
    .home-bottom-area { margin-top: 0 !important; }
    
    .widget, .home-widget-block { margin-bottom: 15px !important; padding: 15px !important; }
    
    
    .story-grid { grid-template-columns: repeat(3, 1fr); gap: 10px !important; row-gap: 15px !important; }
    .genre-grid { grid-template-columns: repeat(3, 1fr); gap: 10px !important; row-gap: 15px !important; }
    
    .container { padding: 0 10px; }
    .tab-label, .genre-tab-label { font-size: 0.95rem; padding: 8px 10px; }
    
    
    .hero-grid { display: block !important; height: auto !important; }
    .hero-banner-dynamic { width: 100% !important; height: 200px !important; }
    .hero-content-overlay { padding: 15px !important; }
    .hero-title { font-size: 1.1rem !important; margin-bottom: 5px !important; }
    .hero-tag { font-size: 0.65rem !important; padding: 2px 8px !important; margin-bottom: 5px !important; }
    
    
    .story-header-grid { flex-direction: column; align-items: center; }
    .story-cover { width: 180px; margin-bottom: 15px; } 
    .story-info { text-align: center; width: 100%; }
    .single-title { padding-right: 0; font-size: 1.4rem; margin-bottom: 10px; line-height: 1.3; }
    .kk-rating-absolute { position: static; margin: 0 auto 15px auto; width: fit-content; box-shadow: none; border: 1px solid #eee; background: #fdfdfd; }
    .meta-row { justify-content: center; gap: 8px; }
    .stats-row.compact-stats { justify-content: center; flex-wrap: wrap; gap: 10px; }
    .stat-box { background: #f9f9f9; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; }
}



@media (max-width: 480px) {
    
    .story-grid { grid-template-columns: repeat(2, 1fr); }
    .genre-grid { grid-template-columns: repeat(2, 1fr); }
    
    .hero-title { font-size: 1.5rem; }
    .hero-content-overlay { padding: 20px; }

    
    .main-audio-player.light-theme {
        padding: 10px !important;
    }

    
    .sv-dropdown-wrap {
        position: relative !important;
        
        
        margin: -20px -20px 0 -20px !important; 
        width: calc(100% + 40px) !important;
        
        
        padding: 15px 20px !important;
        
        display: flex;
        justify-content: flex-end; 
        align-items: center;
        
        
        background: transparent !important; 
        border-bottom: none !important; 
        
        z-index: 50;
    }
    
    
    .sv-trigger {
        padding: 5px 5px;
        font-size: 0.75rem;
        
        background: #f5f5f5; 
        border: 1px solid #eee;
        border-radius: 20px;
        font-weight: 600;
        color: #555;
    }

    
    .sv-menu {
        top: 85% !important; 
        right: 20px !important; 
        left: auto !important;
        min-width: 180px;
        z-index: 100 !important;
        border-top: none;
        box-shadow: 0 5px 20px rgba(0,0,0,0.15);
        border-radius: 8px;
    }
    
    
    .player-header { 
        padding-top: 5px !important; 
        margin-bottom: 15px; 
    }
    .track-title { 
        font-size: 1.1rem; 
        padding: 0 5px; 
        font-weight: 700;
        line-height: 1.4;
    }

    .player-bottom-row { flex-wrap: wrap; justify-content: center; row-gap: 15px; }
    .time-display { order: 2; width: 45%; text-align: left; font-size: 0.75rem; color: #999; }
    .player-right-actions { order: 3; width: 45%; text-align: right; }
    
    .player-controls { 
        order: 1; width: 100%; 
        border-bottom: 1px dashed #eee; padding-bottom: 15px; 
        justify-content: space-between; padding-left: 5px; padding-right: 5px;
    }
    
    .p-download { width: 24px; height: 24px; margin-right: 5px; }
    .p-download svg { width: 14px; height: 14px; }
}


@media (min-width: 992px) {
    
    .main-navigation ul ul.multi-col-drop {
        display: grid !important;
        
        
        grid-template-rows: repeat(8, min-content);
        
        
        grid-auto-flow: column;
        
        
        grid-auto-columns: minmax(140px, max-content);
        
        width: max-content !important; 
        max-width: 90vw;
        
        
        gap: 0 20px; 
        
        padding: 12px 20px !important;
        border-radius: 10px !important;
    }

    
    .main-navigation ul ul.multi-col-drop li {
        width: auto !important; 
        padding: 0 !important;
    }

    
    .main-navigation ul ul.multi-col-drop li a {
        padding: 6px 0 !important; 
        font-size: 0.9rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }
}

.report-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
    padding: 15px;
}
.report-modal-overlay.show { opacity: 1; visibility: visible; }

.report-modal-box {
    background: #fff;
    width: 100%; max-width: 450px;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateY(20px); transition: 0.3s ease;
}
.report-modal-overlay.show .report-modal-box { transform: translateY(0); }

.rm-title { font-size: 1.4rem; font-weight: bold; margin-bottom: 5px; color: var(--c-primary); text-align: center; }
.rm-subtitle { font-size: 0.95rem; color: #666; margin-bottom: 20px; text-align: center; }
.rm-subtitle strong { color: #333; }

#rm-message {
    width: 100%; padding: 12px;
    border: 1px solid #ddd; border-radius: 8px;
    font-family: inherit; font-size: 0.95rem;
    resize: none; outline: none; margin-bottom: 20px;
    background: #f9f9f9; transition: 0.2s;
}
#rm-message:focus { border-color: var(--c-primary); background: #fff; }

.rm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-rm { padding: 10px 20px; border-radius: 25px; font-weight: 600; cursor: pointer; border: none; font-size: 0.9rem; transition: 0.2s; }
.btn-rm-cancel { background: #f0f0f0; color: #555; }
.btn-rm-cancel:hover { background: #e0e0e0; }
.btn-rm-send { background: var(--c-primary); color: #fff; box-shadow: 0 4px 10px rgba(255, 175, 204, 0.4); }
.btn-rm-send:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255, 175, 204, 0.6); }


#btn-report:hover { color: #e74c3c; background: #fff; }
#btn-report:hover svg { stroke: #e74c3c; }

.error-404-wrap { text-align: center; padding: 80px 20px; background: #fff; border-radius: 10px; margin: 40px 0; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.error-icon { margin-bottom: 20px; }
.error-title { font-size: 3rem; color: #333; margin-bottom: 10px; }
.error-text { font-size: 1.2rem; color: #666; margin-bottom: 30px; }
.error-search { max-width: 400px; margin: 0 auto 30px; }
.error-search .search-form { display: flex; gap: 10px; }
.error-search .search-field { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 30px; outline: none; }
.error-search .btn-play { padding: 0 25px; border-radius: 30px; }
.btn-back-home { text-decoration: none; padding: 12px 30px; border-radius: 30px; }

.site-title-h1, .site-title-p {
    font-size: 1.8rem;
    color: var(--c-accent);
    margin: 0;
    letter-spacing: 0.5px;
    font-weight: bold;
    font-family: 'Alata', sans-serif;
}


.site-footer {
    background: #fff;
    padding: 40px 0;
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid #eee;
}
.site-footer p {
    color: #666;
    font-size: 0.9rem;
}

.audio-player-placeholder {
    background: #fff5f5;
    border: 2px dashed #ff7675;
    padding: 40px 20px;
    border-radius: 15px;
    text-align: center;
    margin: 30px 0;
    transition: all 0.3s;
}
.audio-player-placeholder:hover {
    border-color: #d63031;
    background: #ffecec;
}


.audio-player-placeholder #btn-report {
    animation: pulse-red 2s infinite;
    transition: all 0.3s ease;
}
.audio-player-placeholder #btn-report:hover {
    transform: scale(1.05);
    background: #c0392b !important;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(214, 48, 49, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(214, 48, 49, 0); }
    100% { box-shadow: 0 0 0 0 rgba(214, 48, 49, 0); }
}

#back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 45px; height: 45px;
    background: var(--c-primary); color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 175, 204, 0.5);
    z-index: 999;
    opacity: 0; visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    cursor: pointer;
}
#back-to-top.show {
    opacity: 1; visibility: visible; transform: translateY(0);
}
#back-to-top:hover {
    background: #ff8fab; transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 175, 204, 0.7);
}


.btn-quick-remove { display: none; }


#guest-library-grid .btn-quick-remove,
#library-content-area .btn-quick-remove {
    display: flex;
    position: absolute; top: -8px; right: -8px;
    width: 28px; height: 28px;
    background: #ff4757; color: #fff;
    border: 2px solid #fff; border-radius: 50%;
    align-items: center; justify-content: center;
    cursor: pointer; z-index: 10;
    font-size: 14px; line-height: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s;
}
#guest-library-grid .btn-quick-remove:hover,
#library-content-area .btn-quick-remove:hover {
    background: #ff6b81; transform: scale(1.1);
}
/* =========================================
   HERO SLIDER STYLES (GRID BLOWOUT FIXED)
   ========================================= */

/* 1. Cấu trúc Layout Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    /* Chia cột 75% - 25% */
    gap: 20px;
    width: 100%;
    margin-bottom: 40px;
    /* Không fix cứng height nữa để tránh lỗi đè chữ nếu màn hình lạ */
    min-height: 450px;
}

/* 2. Style cho Slider Banner (Cột Trái) */
.hero-slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
    border-radius: 15px;
    background: #e0e0e0;

    /* [FIX QUAN TRỌNG] Chống vỡ khung Grid khi quay lại trang */
    min-width: 0;
    max-width: 100%;
}

.hero-banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

.hero-banner-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Fix khoảng trắng dưới ảnh */
}

/* 3. Style cho BTV Đề Cử (Cột Phải) */
.hero-bookshelf {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    /* Đảm bảo chiều cao tương đồng */
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;

    /* [FIX QUAN TRỌNG] Chống vỡ khung Grid */
    min-width: 0;
}

/* Dots điều hướng */
.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-dot.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* 4. Responsive cho Mobile */
@media (max-width: 992px) {
    .hero-grid {
        display: flex;
        /* Chuyển sang Flex để dễ xếp chồng */
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .hero-slider-wrapper {
        height: auto;
        width: 100%;
        aspect-ratio: 16/9;
        /* Tỉ lệ chuẩn cho mobile */
        min-height: 250px;
    }

    .hero-bookshelf {
        height: 380px;
        /* Chiều cao cố định cho carousel quay */
        width: 100%;
    }
}

/* --- ANIMATION MARQUEE (Chung) --- */
@keyframes audiostory-marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}
@keyframes playlist-marquee {
    0% { text-indent: 100%; } /* Chạy từ phải */
    100% { text-indent: -150%; } /* Sang trái */
}