/* ==========================================================================
   TỦ SÁCH LÝ LUẬN - CLB LÝ LUẬN TRẺ APAG ĐÀ NẴNG
   Version: 5.0 (Flawless Premium UI - Fixed Modal & Layout)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Colors CLB Lý luận trẻ */
    --red-brand: #dd0300;
    --red-hover: #b80200;
    --yellow-brand: #fff500;
    
    /* Light Theme */
    --bg-main: #f4f7f9;
    --bg-card: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    
    /* Shadows - Hiệu ứng nổi 3D */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 25px 50px rgba(221, 3, 0, 0.15);
    
    /* Metrics */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-pill: 50px;
    --trans: 0.3s ease-in-out;
}

/* --- DARK MODE (Công nghệ) --- */
[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: #334155;
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; transition: background-color var(--trans), border-color var(--trans); }
body { background: var(--bg-main); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Scrollbar xịn sò */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-brand); }
::selection { background: var(--yellow-brand); color: var(--red-brand); }

/* --- NAVBAR --- */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-light);
    padding: 15px 0; position: sticky; top: 0; z-index: 1000;
}
[data-theme="dark"] .navbar { background: rgba(30, 41, 59, 0.85); }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 15px; font-weight: 800; font-size: 1.3rem; color: var(--red-brand); letter-spacing: -0.5px; text-transform: uppercase; }
[data-theme="dark"] .logo-area { color: var(--yellow-brand); }
.logo-area img { height: 50px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }
.nav-actions { display: flex; gap: 12px; }
.theme-toggle { width: 45px; height: 45px; border-radius: 50%; border: 1px solid var(--border-light); background: var(--bg-main); color: var(--text-muted); cursor: pointer; display: grid; place-items: center; font-size: 1.2rem; }
.theme-toggle:hover { color: var(--red-brand); border-color: var(--red-brand); }
.btn-donate { background: var(--red-brand); color: white; border: none; padding: 0 25px; border-radius: var(--radius-pill); font-weight: 700; display: flex; align-items: center; gap: 8px; cursor: pointer; box-shadow: 0 4px 15px rgba(221, 3, 0, 0.3); transition: transform 0.2s; }
.btn-donate:hover { background: var(--red-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(221, 3, 0, 0.4); }

/* --- HERO BANNER (Khôi phục hình nền cực đẹp) --- */
.hero {
    position: relative;
    /* KHÓA CỨNG HÌNH NỀN Ở ĐÂY */
    background: url('https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?q=80&w=2000') center/cover no-repeat;
    padding: 100px 0; text-align: center; color: white;
    margin-bottom: -50px;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(221, 3, 0, 0.95), rgba(15, 23, 42, 0.85)); z-index: 1; }
.hero-content { position: relative; z-index: 2; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 245, 0, 0.2); border: 1px solid var(--yellow-brand); color: var(--yellow-brand); padding: 8px 25px; border-radius: var(--radius-pill); font-size: 0.95rem; font-weight: 700; margin-bottom: 25px; backdrop-filter: blur(5px); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; margin-bottom: 15px; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 700px; margin: 0 auto; }

/* Thanh tìm kiếm nổi */
.search-wrapper { max-width: 650px; margin: 40px auto 0; position: relative; transform: translateY(20px); z-index: 10; }
.search-icon { position: absolute; left: 25px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.2rem; z-index: 2; }
.search-wrapper input { width: 100%; padding: 22px 25px 22px 60px; border-radius: var(--radius-pill); border: none; font-size: 1.1rem; background: var(--bg-card); color: var(--text-dark); box-shadow: var(--shadow-md); outline: none; font-weight: 500; }
.search-wrapper input:focus { box-shadow: 0 0 0 4px rgba(221, 3, 0, 0.2); }

/* --- THỐNG KÊ & BỘ LỌC --- */
.stats-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; position: relative; z-index: 10; margin-top: 20px; margin-bottom: 30px; }
.stat-card { background: var(--bg-card); padding: 25px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 20px; border: 1px solid var(--border-light); }
.stat-card i { font-size: 2.2rem; color: var(--red-brand); background: rgba(221,3,0,0.1); width: 65px; height: 65px; display: grid; place-items: center; border-radius: 15px; }
.stat-info h3 { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 5px; }
.stat-info p { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }

.controls-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 15px; margin-bottom: 40px; background: var(--bg-card); padding: 15px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.tab-btn { padding: 12px 24px; border: 1px solid transparent; background: var(--bg-main); color: var(--text-muted); border-radius: var(--radius-pill); font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.tab-btn.active, .tab-btn:hover { background: var(--red-brand); color: white; box-shadow: 0 4px 15px rgba(221,3,0,0.2); }
.sort-select { padding: 0 20px; height: 46px; border-radius: var(--radius-pill); border: 1px solid var(--border-light); background: var(--bg-main); color: var(--text-dark); font-weight: 600; outline: none; cursor: pointer; }

/* --- LƯỚI SÁCH (Fix hoàn hảo Typography) --- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; margin-bottom: 60px; }
.book-card { background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; position: relative; transition: transform 0.3s, box-shadow 0.3s; }
.book-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: rgba(221, 3, 0, 0.4); }

.book-cover { height: 180px; background: linear-gradient(135deg, var(--red-brand), #990000); display: flex; align-items: flex-end; padding: 25px; position: relative; box-shadow: inset 0 -10px 20px rgba(0,0,0,0.1); }
.book-cover::after { content: ''; position: absolute; left: 15px; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,0.2); }

.contributor-badge { position: absolute; top: 15px; right: 15px; background: var(--yellow-brand); color: var(--red-brand); padding: 6px 15px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 800; display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 10; border: 2px solid white; }

.cover-title { color: white; font-size: 1.25rem; font-weight: 800; line-height: 1.4; text-shadow: 0 2px 4px rgba(0,0,0,0.4); text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding-left: 10px; z-index: 2; }

.book-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.book-content h3 { display: none; } /* Ẩn tên sách bên dưới cho đỡ rối */
.book-meta { flex-grow: 1; margin-bottom: 20px; font-size: 0.95rem; color: var(--text-muted); }
.book-meta p { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.book-meta i { color: var(--red-brand); margin-top: 4px; }
.book-meta strong { color: var(--text-dark); font-weight: 600; min-width: 65px; }

.tag-container { display: flex; gap: 8px; margin-top: 15px; flex-wrap: wrap; }
.tag { padding: 5px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.tag-cung { background: rgba(221,3,0,0.1); color: var(--red-brand); }
.tag-mem { background: rgba(16, 185, 129, 0.15); color: #059669; }

.btn-action { width: 100%; padding: 14px; border-radius: var(--radius-sm); font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 8px; border: none; cursor: pointer; font-size: 1rem; }
.btn-read { background: var(--bg-main); color: var(--text-dark); border: 1px solid var(--border-light); }
.btn-read:hover { background: #2563eb; color: white; border-color: #2563eb; }
.btn-borrow { background: var(--red-brand); color: white; }
.btn-borrow:hover { background: var(--red-hover); box-shadow: 0 4px 15px rgba(221,3,0,0.3); }

/* ==========================================================================
   FIX TRIỆT ĐỂ LỖI MODAL & FORM (Khung Đăng Ký)
   ========================================================================== */
.modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    z-index: 2000; align-items: center; justify-content: center;
    padding: 15px;
}

.modal-content {
    background: var(--bg-card);
    width: 100%; max-width: 500px;
    border-radius: var(--radius-md);
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Giới hạn chiều cao & thêm thanh cuộn cho màn hình nhỏ */
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px 30px;
}
@keyframes popIn { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.close-btn {
    position: absolute; top: 15px; right: 20px;
    font-size: 2rem; color: var(--text-muted);
    cursor: pointer; line-height: 1; z-index: 10;
    background: var(--bg-main); width: 40px; height: 40px;
    border-radius: 50%; display: grid; place-items: center;
}
.close-btn:hover { color: var(--red-brand); background: rgba(221,3,0,0.1); }

.modal-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.modal-icon { font-size: 2rem; color: var(--red-brand); background: rgba(221,3,0,0.1); width: 50px; height: 50px; display: grid; place-items: center; border-radius: 12px; }
.modal-header h2 { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); }

.modal-subtitle { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 25px; }

.highlight-text {
    background: rgba(255, 245, 0, 0.15);
    color: var(--text-dark);
    padding: 15px; border-radius: var(--radius-sm);
    border-left: 4px solid var(--yellow-brand);
    font-weight: 700; margin-bottom: 25px; line-height: 1.4;
}

/* KHÓA CỨNG Ô NHẬP LIỆU (Tránh lệch Icon) */
.custom-form { display: block; width: 100%; }
.form-group {
    position: relative; /* RẤT QUAN TRỌNG: Làm gốc tọa độ cho Icon */
    width: 100%;
    margin-bottom: 18px;
}
.form-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%); /* Canh giữa hoàn hảo theo chiều dọc */
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none; /* Không cản trở click vào input */
}
.custom-form input, .custom-form select {
    display: block;
    width: 100%;
    /* Padding left lớn để né cái Icon */
    padding: 16px 16px 16px 50px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: 0.3s;
}
.custom-form input:focus, .custom-form select:focus {
    border-color: var(--red-brand);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(221, 3, 0, 0.1);
}

/* NÚT SUBMIT - KHÔI PHỤC MÀU ĐỎ */
.btn-submit {
    width: 100%;
    background: var(--red-brand) !important; /* Ép màu đỏ */
    color: white !important;
    border: none;
    padding: 18px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: 10px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(221,3,0,0.3);
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
.btn-submit:hover { background: var(--red-hover) !important; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(221,3,0,0.4); }

/* --- LOADER & FOOTER --- */
.loader { text-align: center; padding: 60px 0; color: var(--red-brand); font-weight: 700; font-size: 1.1rem; display: flex; justify-content: center; align-items: center; gap: 15px; }
.spinner { width: 35px; height: 35px; border: 4px solid rgba(221,3,0,0.2); border-top-color: var(--red-brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { text-align: center; padding: 60px 20px 40px; margin-top: 60px; color: var(--text-muted); border-top: 1px solid var(--border-light); }
.footer-logo { height: 60px; margin-bottom: 20px; filter: grayscale(1); opacity: 0.5; transition: 0.3s; }
footer:hover .footer-logo { filter: grayscale(0); opacity: 1; }
footer strong { color: var(--text-dark); font-size: 1.1rem; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .hero { padding: 80px 0; }
    .hero h1 { font-size: 2rem; }
    .stats-container { grid-template-columns: 1fr; }
    .controls-bar { flex-direction: column; align-items: stretch; }
    .filter-tabs { justify-content: center; }
    .modal-content { padding: 25px 20px; }
}

/* ==========================================================================
   BỔ SUNG TÍNH NĂNG MỚI (VER 6.0) - DÁN VÀO CUỐI FILE STYLE.CSS
   ========================================================================== */
.btn-export-pdf { background: #b91c1c; color: white; border: none; padding: 12px 20px; border-radius: var(--radius-pill); font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 10px rgba(185, 28, 28, 0.3); transition: var(--trans-smooth); }
.btn-export-pdf:hover { background: #991b1b; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(185, 28, 28, 0.4); }
.book-card { cursor: pointer; } /* Biến thẻ sách thành nút bấm */

/* Sách nổi bật */
.trending-section { margin-bottom: 40px; }
.trending-header h2 { font-size: 1.4rem; color: var(--text-main); margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.trending-slider { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 15px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.trending-slider::-webkit-scrollbar { height: 6px; }
.trending-slider::-webkit-scrollbar-thumb { background: var(--red-glow); border-radius: 10px; }
.trending-card { min-width: 260px; scroll-snap-align: start; }

/* Modal Chi tiết sách */
.detail-modal-content { max-width: 850px; padding: 0; overflow: hidden; }
.detail-layout { display: flex; flex-wrap: wrap; }
.detail-left { width: 35%; background: var(--bg-main); padding: 30px; display: flex; flex-direction: column; align-items: center; border-right: 1px solid var(--border-color); }
.detail-right { width: 65%; padding: 30px; }
.detail-cover-large { width: 100%; aspect-ratio: 2/3; background: linear-gradient(135deg, var(--red-base), #990000); border-radius: var(--radius-sm); display: flex; align-items: flex-end; padding: 20px; box-shadow: var(--shadow-md); position: relative; margin-bottom: 25px; }
.detail-cover-large::after { content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,0.3); }
.qr-container { text-align: center; background: var(--bg-card); padding: 15px; border-radius: var(--radius-sm); box-shadow: var(--shadow-soft); width: 100%; border: 1px solid var(--border-color); }
.qr-container p { font-size: 0.8rem; font-weight: 700; color: var(--text-sub); margin-bottom: 10px; }
.qr-container img { width: 120px; height: 120px; object-fit: contain; }
.detail-right h2 { font-size: 1.6rem; font-weight: 800; color: var(--text-main); margin-bottom: 15px; line-height: 1.3; }
.detail-meta-info { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; color: var(--text-sub); font-size: 0.9rem; }
.detail-meta-info span { background: var(--bg-main); padding: 5px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-color); }
.detail-summary-box { background: rgba(255,245,0,0.1); padding: 20px; border-radius: var(--radius-sm); border-left: 4px solid var(--yellow-base); margin-bottom: 25px; }
.detail-summary-box h3 { font-size: 1rem; color: var(--text-main); margin-bottom: 10px; }
.detail-summary-box p { font-size: 0.95rem; line-height: 1.6; color: var(--text-main); text-align: justify; }
.related-books-section h3 { font-size: 1rem; margin-bottom: 15px; color: var(--text-main); }
.related-books-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.related-item { background: var(--bg-main); padding: 12px; border-radius: var(--radius-sm); min-width: 160px; cursor: pointer; border: 1px solid var(--border-color); transition: 0.3s; }
.related-item:hover { border-color: var(--red-base); transform: translateY(-2px); }
.related-item h4 { font-size: 0.85rem; line-height: 1.4; margin-bottom: 5px; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700;}
.detail-action-buttons { margin-top: 25px; display: flex; gap: 15px; }

@media (max-width: 768px) {
    .detail-left, .detail-right { width: 100%; border-right: none; }
    .detail-left { padding: 20px; } .detail-right { padding: 20px; }
    .btn-export { width: 100%; justify-content: center; margin-top: 15px; }
}

/* --- BẢN VÁ LỖI CẮT XÉN MÃ QR (VER 6.1) --- */
.detail-modal-content {
    overflow-y: auto !important; /* Kích hoạt lại thanh cuộn dọc thay vì cắt xén */
    overflow-x: hidden !important;
}

.detail-left {
    padding-bottom: 40px !important; /* Thêm không gian đệm ở đáy để QR không bị sát lề */
}

.qr-container {
    margin-bottom: 10px; /* Cân chỉnh lại khoảng cách cho thoáng mắt */
}

/* --- TÍNH NĂNG RADIO & SHARE (VER 6.2) --- */
.detail-action-buttons { flex-wrap: wrap; } /* Sửa lỗi tràn nút bấm trên điện thoại */

.floating-player {
    position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%);
    background: var(--bg-card); padding: 12px 25px;
    border-radius: var(--radius-pill); box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 20px; z-index: 3000;
    border: 2px solid var(--red-brand); width: 90%; max-width: 700px;
    animation: slideUp 0.4s var(--trans-bouncy);
}
.player-info { display: flex; align-items: center; gap: 15px; overflow: hidden; flex-grow: 1; }
.cd-spin i { font-size: 2.2rem; color: var(--red-brand); animation: spin 3s linear infinite; }
.player-text { display: flex; flex-direction: column; overflow: hidden; white-space: nowrap; }
.radio-badge { font-size: 0.75rem; font-weight: 800; color: var(--yellow-brand); background: var(--red-brand); padding: 3px 10px; border-radius: var(--radius-sm); align-self: flex-start; margin-bottom: 4px; letter-spacing: 0.5px; }
#playerTitle { font-size: 1rem; font-weight: 700; color: var(--text-main); text-overflow: ellipsis; overflow: hidden; }
audio { height: 40px; outline: none; flex-grow: 1; max-width: 250px; }
.close-player { background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.close-player:hover { color: var(--red-brand); }

.btn-audio { background: var(--text-main); color: var(--bg-card); }
.btn-audio:hover { background: #000; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transform: translateY(-2px); }
.btn-share { background: var(--bg-page); color: var(--text-dark); border: 1px solid var(--border-light); }
.btn-share:hover { background: #e2e8f0; transform: translateY(-2px); }

@media (max-width: 768px) {
    .floating-player { flex-direction: column; border-radius: var(--radius-md); padding: 15px; }
    audio { max-width: 100%; width: 100%; }
    .close-player { position: absolute; top: 10px; right: 15px; }
}

/* ==========================================================================
   NHÓM TÍNH NĂNG QUẢN LÝ THÔNG MINH (VER 7.0)
   ========================================================================== */
/* Nút Xem thêm */
.load-more-container { text-align: center; margin-bottom: 60px; }
.btn-load-more { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-light); padding: 14px 40px; border-radius: var(--radius-pill); font-weight: 800; font-size: 1rem; cursor: pointer; box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; gap: 10px; transition: var(--trans-smooth); margin: 0 auto; }
.btn-load-more:hover { border-color: var(--red-brand); color: var(--red-brand); transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Giỏ hàng nổi */
.floating-cart { position: fixed; right: 25px; bottom: 100px; background: var(--bg-card); color: var(--red-brand); width: 65px; height: 65px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: var(--shadow-lg); cursor: pointer; z-index: 3000; border: 2px solid var(--red-brand); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.floating-cart:hover { transform: scale(1.15) rotate(-5deg); background: var(--red-brand); color: white; }
.cart-badge { position: absolute; top: -5px; right: -5px; background: var(--yellow-brand); color: var(--red-brand); font-size: 0.85rem; font-weight: 900; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--bg-card); }
@media (max-width: 768px) { .floating-cart { bottom: 90px; right: 15px; width: 55px; height: 55px; font-size: 1.3rem; } }

/* ==========================================================================
   THANH TIẾN TRÌNH & FIX GIAO DIỆN NÚT THỂ LOẠI (VER 7.1)
   ========================================================================== */

/* 1. Giao diện Thanh tiến trình đọc */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999; /* Đảm bảo luôn nổi lên trên cùng, kể cả Navbar */
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--yellow-brand), var(--red-brand));
    box-shadow: 0 0 8px var(--red-brand);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    transition: width 0.1s ease-out; /* Chạy mượt mà bám theo con lăn chuột */
}


/* Khi nút Thể loại được chọn (Active) -> Đồng bộ nền Đỏ, chữ Trắng */
.tag-filter-btn.active {
    background: var(--red-brand) !important;
    color: white !important;
    border-color: var(--red-brand) !important;
    box-shadow: 0 4px 12px rgba(221,3,0,0.3);
}

/* Khi rê chuột qua nút Thể loại chưa chọn */
.tag-filter-btn:hover:not(.active) {
    border-color: var(--red-brand);
    color: var(--red-brand);
    transform: translateY(-2px);
}

/* ==========================================================================
   FIX GIAO DIỆN NÚT THỂ LOẠI (ĐỒNG BỘ 100% VỚI NÚT CHÍNH)
   ========================================================================== */

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: -15px; /* Kéo xích lên gần thanh filter chính một chút cho liền mạch */
    margin-bottom: 35px;
    justify-content: center; /* Canh giữa toàn bộ cụm nút */
}

.tag-filter-btn {
    padding: 12px 24px;
    border: 1px solid transparent;
    background: var(--bg-main);
    color: var(--text-muted);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

/* Hiệu ứng khi được chọn hoặc rê chuột vào -> Giống y hệt nút "Tất cả" */
.tag-filter-btn.active, .tag-filter-btn:hover {
    background: var(--red-brand) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 4px 15px rgba(221, 3, 0, 0.2) !important;
    transform: translateY(-2px);
}

/* Đảm bảo Thanh tiến trình đọc luôn nằm trên cùng */
.scroll-progress-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 4px; background: transparent; z-index: 9999;
}
.scroll-progress-bar {
    height: 100%; width: 0%; background: linear-gradient(to right, var(--yellow-brand), var(--red-brand)); box-shadow: 0 0 8px var(--red-brand); border-top-right-radius: 4px; border-bottom-right-radius: 4px; transition: width 0.1s ease-out;
}

/* ==========================================================================
   BẢNG VÀNG TRI ÂN NGƯỜI ĐÓNG GÓP (VER 7.2)
   ========================================================================== */
.honor-section { 
    margin-bottom: 40px; background: var(--bg-card); 
    padding: 25px; border-radius: var(--radius-md); 
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); 
}
.honor-header { text-align: center; margin-bottom: 20px; }
.honor-header h2 { font-size: 1.5rem; color: var(--text-main); margin-bottom: 5px; font-weight: 800;}
.honor-header p { font-size: 0.95rem; color: var(--text-muted); }

.honor-list { 
    display: flex; gap: 15px; overflow-x: auto; 
    padding-bottom: 10px; scrollbar-width: none; justify-content: center; 
}
.honor-list::-webkit-scrollbar { display: none; }

.honor-badge { 
    background: linear-gradient(135deg, #fef9c3, #fde047); 
    color: #b45309; padding: 10px 20px; 
    border-radius: var(--radius-pill); font-weight: 700; font-size: 0.95rem; 
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; 
    border: 1px solid #facc15; box-shadow: 0 4px 10px rgba(250, 204, 21, 0.2); 
    transition: var(--trans-smooth); 
}
[data-theme="dark"] .honor-badge { 
    background: linear-gradient(135deg, #422006, #78350f); 
    color: #fde047; border-color: #b45309; 
}
.honor-badge:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(250, 204, 21, 0.4); }

/* Số đếm lượng sách đóng góp */
.honor-badge span { 
    background: #b45309; color: white; 
    padding: 2px 8px; border-radius: 10px; 
    font-size: 0.75rem; margin-left: 5px; 
}
[data-theme="dark"] .honor-badge span { background: #fde047; color: #78350f; }

@media (max-width: 768px) {
    .honor-list { justify-content: flex-start; } /* Trên điện thoại thì cho cuộn ngang từ trái qua */
}

/* ==========================================================================
   GIAO DIỆN HỖ TRỢ, KẾT NỐI & FOOTER MỚI (VER 7.3)
   ========================================================================== */

/* 1. Footer Mới */
.footer-new-layout { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 30px; text-align: left; }
.footer-new-layout h3 { color: var(--text-dark); margin-bottom: 15px; font-size: 1.1rem; font-weight: 800; letter-spacing: 0.5px;}
.club-name { font-weight: 800; color: var(--red-brand); font-size: 1.1rem; margin-bottom: 5px; }
.footer-center p { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; }
.footer-center i { color: var(--red-brand); margin-top: 4px; }
.social-links { display: flex; gap: 15px; margin-bottom: 20px; }
.social-links a { display: grid; place-items: center; width: 42px; height: 42px; background: var(--bg-card); color: var(--text-dark); border-radius: 50%; font-size: 1.2rem; border: 1px solid var(--border-light); }
.social-links a:hover { background: var(--red-brand); color: white; transform: translateY(-3px); box-shadow: 0 4px 10px var(--red-glow); border-color: var(--red-brand); }
.copyright { font-size: 0.85rem; padding-top: 15px; border-top: 1px solid var(--border-light); }
[data-theme="dark"] .footer-new-layout h3, [data-theme="dark"] .club-name { color: white; }
@media (max-width: 768px) { .footer-new-layout { grid-template-columns: 1fr; text-align: center; } .footer-center p, .social-links { justify-content: center; } }

/* ==========================================================================
   ÉP KHÔI PHỤC LẠI HÌNH NỀN MÂY KHÓI BAN ĐẦU CHO TRANG CHỦ
   ========================================================================== */
.hero {
    background: url('https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?q=80&w=2000') center/cover no-repeat !important;
}
