/* ================= TỔNG THỂ ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    min-height: 100vh;
    background-color: #f9f9f9;
    color: #0f172a;
    overflow-x: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom;
}

input, textarea {
    user-select: auto;
}

/* ================= 1. HEADER ================= */
.yt-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
}

.yt-header-left,
.yt-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yt-header-left {
    gap: 12px;
}

.btn-sidebar-burger {
    background: none;
    border: none;
    color: #334155;
    font-size: 19px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sidebar-burger:hover {
    background-color: #f1f5f9;
}

.yt-brand-container {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.brand-text-wrapper {
    display: flex;
    align-items: baseline;
    font-style: italic;
    font-family: 'Arial Black', sans-serif;
}

.brand-text-wrapper .brand-text {
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.brand-text-wrapper .brand-domain {
    font-size: 13px;
    font-weight: 800;
    color: #0066ff;
    margin-left: 1px;
}

.yt-header-center {
    flex: 0 1 540px;
    margin: 0 16px;
    display: flex;
    align-items: center;
}

.yt-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    height: 38px;
}

.yt-search-box {
    flex: 1;
    height: 100%;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-right: none;
    border-radius: 20px 0 0 20px;
    padding: 0 14px;
    display: flex;
    align-items: center;
}

.yt-search-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: #0f172a;
}

.btn-submit-search {
    width: 54px;
    height: 100%;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 0 20px 20px 0;
    color: #475569;
    cursor: pointer;
}

.btn-submit-search:hover {
    background-color: #e2e8f0;
    color: #0066ff;
}

.btn-voice-search {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: none;
    outline: none;
    color: #0f172a;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.btn-voice-search:hover {
    background-color: #e2e8f0;
}

.btn-yt-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f1f5f9;
    color: #0f172a;
    padding: 0 14px;
    height: 34px;
    border-radius: 17px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 700;
}

.btn-yt-upload:hover {
    background-color: #e2e8f0;
}

.yt-btn-login {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #0066ff;
    color: #0066ff;
    padding: 0 12px;
    height: 34px;
    border-radius: 17px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.yt-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #0066ff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
}

.yt-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-mobile-search-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #0f172a;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-mobile-search-icon:active {
    background-color: #e2e8f0;
    transform: scale(0.92);
}

/* ================= 2. HỘP THOẠI GIỌNG NÓI VUÔNG (CHUẨN YOUTUBE) ================= */
.voice-search-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
    animation: voiceModalFade 0.2s ease-out;
}

@keyframes voiceModalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.voice-search-modal-box {
    background-color: #ffffff;
    width: 100%;
    max-width: 440px;
    min-height: 290px;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: voiceModalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes voiceModalScale {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.voice-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.voice-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.btn-voice-modal-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #64748b;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.btn-voice-modal-close:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.voice-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 14px;
}

.voice-live-text-box {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.voice-live-text {
    font-size: 18px;
    font-weight: 700;
    color: #0066ff;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
}

.voice-mic-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    margin-bottom: 12px;
}

.voice-modal-mic-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-color: #ef4444;
    color: #ffffff;
    border: none;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    transition: transform 0.15s ease;
}

.voice-modal-mic-btn:active {
    transform: scale(0.92);
}

.voice-modal-mic-btn.listening .voice-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2.5px solid #ef4444;
    animation: voiceRingExpand 1.6s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
    pointer-events: none;
}

.voice-modal-mic-btn.listening .voice-pulse-ring.delay {
    animation-delay: 0.8s;
}

@keyframes voiceRingExpand {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.voice-modal-hint {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* ================= 3. BỐ CỤC CHÍNH (TỐI ƯU GỌN GÀNG TOÀN TRANG) ================= */
.view-main-layout {
    display: flex;
    gap: 16px;
    margin-top: 56px;
    padding: 8px 14px 45px;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

.primary-viewer-col {
    flex: 1 1 calc(100% - 446px);
    min-width: 0;
}

.iframe-container-a4 {
    position: relative;
    width: 100%;
    height: 82vh;
    min-height: 680px;
    background-color: #000000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #cbd5e1;
}

.iframe-container-a4 iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#btn-toggle-fullscreen {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background-color 0.2s, transform 0.1s;
}

#btn-toggle-fullscreen:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: #ffffff;
    transform: scale(1.05);
}

.block-popout-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 48px;
    background: transparent;
    z-index: 10;
}

.view-doc-title {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.35;
    color: #0f172a;
    margin-top: 10px;
    margin-bottom: 6px;
    word-break: break-word;
}

/* ================= 4. CỤM TÁC GIẢ & NÚT THAO TÁC ================= */
.yt-author-action-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.author-left-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.author-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0066ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    flex-shrink: 0;
}

.author-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-meta-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.author-name-link {
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
    font-size: 14.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.author-name-link:hover {
    color: #0066ff;
}

.text-verified {
    color: #64748b;
    font-size: 12px;
}

.author-sub-count {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.author-subscribe-btn-box {
    margin-left: 6px;
}

.btn-yt-subscribe {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    padding: 0 16px;
    height: 36px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.btn-yt-subscribe:hover {
    background-color: #27272a;
}

.btn-yt-subscribe.subscribed {
    background-color: #f1f5f9;
    color: #0f172a;
}

.btn-yt-subscribe.subscribed:hover {
    background-color: #e2e8f0;
}

/* Modal xác nhận hủy đăng ký */
.yt-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    padding: 16px;
}

.yt-modal-backdrop.active {
    display: flex;
}

.yt-confirm-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 390px;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.yt-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.yt-modal-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: #475569;
}

.yt-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.btn-modal-cancel,
.btn-modal-confirm {
    border: none;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.15s;
}

.btn-modal-cancel {
    background: none;
    color: #0f172a;
}

.btn-modal-cancel:hover {
    background-color: #f1f5f9;
}

.btn-modal-confirm {
    background-color: #cc0000;
    color: #ffffff;
}

.btn-modal-confirm:hover {
    background-color: #b00000;
}

.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.action-buttons-group::-webkit-scrollbar {
    display: none;
}

.btn-yt-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background-color: #f1f5f9;
    color: #0f172a;
    border-radius: 18px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-yt-pill:hover {
    background-color: #e2e8f0;
}

.btn-heart.liked {
    color: #ef4444;
    background-color: #fee2e2;
}

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

.badge-count-likes {
    font-size: 12px;
    font-weight: 700;
}

.btn-more-options {
    padding: 0 12px;
}

.dropdown-action-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.dropdown-action-content {
    display: none;
    position: fixed;
    width: 190px;
    background-color: #ffffff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    z-index: 99999999;
    overflow: hidden;
    flex-direction: column;
}

.dropdown-action-content.show {
    display: flex;
}

.dropdown-item-btn {
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-item-btn:hover {
    background-color: #f1f5f9;
    color: #0066ff;
}

.dropdown-item-btn.item-danger {
    color: #ef4444;
}

.dropdown-item-btn.item-danger:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

/* ================= 5. KHUNG MÔ TẢ XÁM ================= */
.description-expand-box {
    background-color: #f1f5f9;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.description-expand-box:hover {
    background-color: #e9eef5;
}

.desc-stats-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.desc-stats-header .meta-dot {
    color: #94a3b8;
    font-size: 11px;
}

.desc-stats-header .font-bold {
    font-weight: 700;
}

.desc-stats-header .subject-txt {
    color: #059669;
}

.desc-stats-header .school-txt {
    color: #0284c7;
}

.desc-stats-header .category-pill-badge {
    background-color: #e2e8f0;
    color: #334155;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.desc-content-collapsed {
    font-size: 13.5px;
    line-height: 1.5;
    color: #334155;
    max-height: 38px;
    overflow: hidden;
    white-space: pre-line;
    word-break: break-word;
    transition: max-height 0.25s ease;
}

.desc-content-collapsed.expanded {
    max-height: 2000px;
}

.btn-toggle-desc {
    background: none;
    border: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    margin-top: 4px;
    padding: 0;
    display: inline-block;
}

.btn-toggle-desc:hover {
    text-decoration: underline;
}

/* ================= 6. BÌNH LUẬN & TRẢ LỜI (TỰ ĐỘNG GIÃN CHIỀU CAO) ================= */
.comments-section-wrapper {
    border-top: 1px solid #e2e8f0;
    padding-top: 14px;
}

.comments-mobile-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.comm-heading-title h3 {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-count-badge {
    font-size: 14px;
    color: #64748b;
}

.mobile-open-indicator {
    display: none;
    font-size: 13px;
    color: #0066ff;
    font-weight: 700;
    align-items: center;
    gap: 4px;
}

.comment-input-box {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #0066ff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-form-group {
    flex: 1;
}

.textarea-wrapper {
    position: relative;
    width: 100%;
}

.comment-form-group textarea,
.reply-form-inline textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    resize: none;
    overflow-y: hidden;
    min-height: 42px;
    max-height: 220px;
    line-height: 1.4;
}

.comment-form-group textarea:focus,
.reply-form-inline textarea:focus {
    border-color: #0066ff;
}

.char-counter {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
    margin-top: 2px;
}

.comment-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.btn-comment-cancel {
    padding: 6px 14px;
    background: none;
    border: none;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.btn-comment-submit {
    padding: 6px 16px;
    background-color: #0066ff;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-author-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.comment-author-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.comment-time {
    font-size: 11.5px;
    color: #64748b;
}

.comment-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.4;
    word-break: break-word;
}

.comment-tool-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.btn-reply-comment,
.btn-delete-comment {
    background: none;
    border: none;
    color: #0066ff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}

.btn-delete-comment {
    color: #ef4444;
}

.btn-reply-comment:hover,
.btn-delete-comment:hover {
    text-decoration: underline;
}

.replies-sub-list {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reply-item {
    margin-top: 4px;
}

.level-2 { margin-left: 0; }
.level-3 { margin-left: 4px; border-left-color: #cbd5e1; }
.level-4 { margin-left: 4px; border-left-color: #94a3b8; }
.level-5 { margin-left: 4px; border-left-color: #0066ff; }

.sub-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
}

.reply-form-inline {
    margin: 10px 0;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
}

.btn-cancel-reply {
    padding: 4px 10px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit-reply {
    padding: 5px 14px;
    background-color: #0066ff;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.no-comments-text {
    color: #64748b;
    font-size: 14px;
    font-style: italic;
    padding: 10px 0;
}

.btn-report-comment-link {
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    color: #94a3b8;
    transition: color 0.15s;
}

.btn-report-comment-link:hover {
    color: #f59e0b;
}

/* ================= 7. CỘT PHẢI: GỢI Ý (MỞ RỘNG 430px & KHỔ A4 ĐỨNG) ================= */
.secondary-related-col {
    flex: 0 0 430px;
    width: 430px;
}

.related-chips-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    margin-bottom: 10px;
    scrollbar-width: none;
}

.related-chips-bar::-webkit-scrollbar {
    display: none;
}

.rel-chip {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.rel-chip.active {
    background-color: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.related-docs-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-card-item {
    position: relative;
    display: flex;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.related-card-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.related-thumb-box {
    position: relative;
    width: 98px;
    aspect-ratio: 1 / 1.35;
    border-radius: 6px;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.related-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-cat-pill {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: #0066ff;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 2;
}

.related-info-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
    flex: 1;
    padding-right: 22px;
}

.related-title-link {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-title-link:hover {
    color: #0066ff;
}

.related-sub-text {
    font-size: 11.5px;
    color: #059669;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-school-text {
    font-size: 11px;
    color: #0284c7;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-meta-bottom {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #64748b;
    margin-top: auto;
}

.inline-dot {
    color: #cbd5e1;
}

.related-counters-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.related-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
}

.related-stat-pill.view-pill {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.related-stat-pill.dl-pill {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #b45309;
}

.related-stat-pill.dl-pill i {
    font-size: 9px;
    color: #d97706;
}

.related-stat-pill.like-pill {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.related-stat-pill.like-pill i {
    font-size: 9px;
    color: #ef4444;
}

.related-more-wrapper {
    position: absolute;
    top: 6px;
    right: 4px;
    display: inline-block;
    z-index: 5;
}

.btn-related-more {
    background: none;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background-color 0.15s, color 0.15s;
}

.btn-related-more:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.related-dropdown-menu {
    display: none;
    position: absolute;
    top: 30px;
    right: 0;
    width: 170px;
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    z-index: 100;
    overflow: hidden;
    flex-direction: column;
}

.related-dropdown-menu.show {
    display: flex;
}

.related-dropdown-menu .dropdown-item-btn {
    padding: 10px 14px;
    font-size: 13px;
    gap: 8px;
}

/* ================= 8. MODAL THANH TOÁN ================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    padding: 15px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 14px;
    padding: 24px 26px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.16);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
}

.pay-amount-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 14px 16px;
    border-radius: 10px;
    margin: 12px 0;
}

.pay-label {
    font-weight: 700;
    color: #92400e;
    font-size: 15px;
}

.pay-price-highlight {
    font-size: 20px;
    font-weight: 900;
    color: #d97706;
}

.pay-user-balance {
    font-size: 14px;
    color: #475569;
    margin-bottom: 12px;
}

.pay-tip-note {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    padding: 8px 18px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #475569;
    font-weight: 700;
    cursor: pointer;
}

.btn-confirm-pay {
    padding: 8px 20px;
    background-color: #f59e0b;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.btn-confirm-pay:hover {
    background-color: #d97706;
}

/* ================= 9. SIDEBAR 3 GẠCH ================= */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: none;
}

.sidebar-backdrop.active {
    display: block;
}

.sidebar-drawer-left {
    position: fixed;
    top: 0;
    left: -320px;
    width: 310px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 10001;
    transition: left 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
}

.sidebar-drawer-left.active {
    left: 0;
}

.drawer-header {
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
}

.drawer-user-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.drawer-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #0066ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    overflow: hidden;
}

.drawer-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-user-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
}

.drawer-coin-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 8px 12px;
    border-radius: 10px;
}

.coin-display {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #b45309;
    font-size: 14px;
    font-weight: 700;
}

.coin-display i {
    color: #f59e0b;
    font-size: 15px;
}

.btn-drawer-buy-coin {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #f59e0b;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
}

.drawer-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 12px 0;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    width: 100%;
}

.drawer-link:hover, 
.drawer-link.active {
    background-color: #f1f5f9;
}

.drawer-filter-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-label {
    font-size: 12px;
    color: #0f172a;
    font-weight: 700;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-field label {
    font-size: 12px;
    color: #475569;
    font-weight: 600;
}

.filter-field input {
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
}

.filter-actions-group {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.btn-submit-filter {
    flex: 1;
    height: 36px;
    background-color: #0066ff;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-reset-filter {
    height: 36px;
    padding: 0 12px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    font-size: 12.5px;
}

.drawer-bottom-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.about-us-toggle {
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 12px;
    width: 100%;
}

.about-us-toggle .arrow-icon {
    font-size: 11px;
    margin-left: auto;
    transition: transform 0.25s ease;
}

.about-us-toggle.active .arrow-icon {
    transform: rotate(180deg);
}

.about-us-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 0 24px;
    background-color: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.about-us-content.show {
    max-height: 200px;
    opacity: 1;
    padding: 10px 12px 10px 24px;
    margin: 4px 0;
}

.contact-info-item {
    font-size: 12.5px;
    color: #475569;
}

.social-icons-wrapper {
    display: flex;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px dashed #cbd5e1;
}

.social-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    color: #ffffff;
}

.social-icon-btn.facebook { background-color: #1877f2; }
.social-icon-btn.tiktok { background-color: #000000; }
.social-icon-btn.zalo { background-color: #0068ff; }
.social-icon-btn.mail { background-color: #ea4335; }
.social-icon-btn.zalo .zalo-text { font-size: 8px; font-weight: 900; }

.btn-drawer-logout-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 0;
    width: 100%;
    background-color: #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 8px;
}

/* ================= 10. KHUNG VIDEO YOUTUBE NHÚNG ================= */
.youtube-viewer-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.yt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.btn-close-yt-box {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 4px;
}

.btn-close-yt-box:hover {
    color: #ef4444;
}

.yt-video-frame-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000000;
    border-radius: 8px;
    overflow: hidden;
}

.yt-video-frame-box iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ================= 11. MÀN HÌNH TÌM KIẾM TOÀN MÀN HÌNH ================= */
.search-mobile-fullscreen {
    position: fixed;
    inset: 0;
    background-color: #ffffff;
    z-index: 999999;
    display: none;
    flex-direction: column;
}

.search-mobile-fullscreen.active {
    display: flex;
}

.search-mobile-bar {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.btn-back-screen {
    background: none;
    border: none;
    width: 38px;
    height: 38px;
    font-size: 18px;
    color: #0f172a;
    cursor: pointer;
}

.mobile-search-form {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #f1f5f9;
    border-radius: 20px;
    padding: 0 14px;
    height: 38px;
}

.mobile-search-form input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14.5px;
    color: #0f172a;
}

#btn-clear-view-mobile {
    background: none;
    border: none;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
}

.search-suggestions-container {
    flex: 1;
    overflow-y: auto;
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.search-history-header button {
    background: none;
    border: none;
    color: #0066ff;
    cursor: pointer;
}

.search-suggest-list {
    list-style: none;
}

.search-suggest-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14.5px;
    color: #0f172a;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
}

/* ================= 12. TOÀN MÀN HÌNH ================= */
.iframe-container-a4.is-mobile-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483647 !important;
    border-radius: 0 !important;
    border: none !important;
    background: #000000 !important;
}

.iframe-container-a4.is-mobile-fullscreen iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
}

.iframe-container-a4.is-mobile-fullscreen #btn-toggle-fullscreen {
    position: fixed !important;
    top: max(14px, env(safe-area-inset-top, 14px)) !important;
    right: max(14px, env(safe-area-inset-right, 14px)) !important;
    z-index: 2147483647 !important;
    background: rgba(15, 23, 42, 0.85) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
}

body.viewer-locked-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

body.viewer-locked-scroll .yt-header,
body.viewer-locked-scroll .yt-mobile-bottom-bar {
    display: none !important;
}

/* ================= 13. QUẢNG CÁO PRE-ROLL ================= */
.doc-ad-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #0b0f19 100%);
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

.doc-ad-overlay.ad-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ad-badge-label {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.75);
    color: #f59e0b;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    z-index: 25;
}

.btn-toggle-sound {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    z-index: 25;
    backdrop-filter: blur(6px);
    transition: background-color 0.2s, transform 0.1s;
}

.btn-toggle-sound:hover {
    background-color: #0066ff;
    border-color: #0066ff;
    transform: scale(1.04);
}

.ad-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    overflow: hidden;
}

.ad-skip-action-box {
    position: absolute;
    bottom: 52px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 25;
}

.ad-timer-countdown {
    background: rgba(15, 23, 42, 0.85);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    user-select: none;
    display: inline-block;
}

.ad-timer-countdown b {
    color: #f59e0b;
    font-size: 14px;
    font-weight: 800;
}

.btn-skip-doc-ad {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    padding: 9px 18px;
    border-radius: 24px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.btn-skip-doc-ad:hover {
    background-color: #0066ff;
    border-color: #0066ff;
    transform: scale(1.04);
}

.btn-skip-doc-ad.active {
    display: inline-flex;
}

/* ================= 14. QUẢNG CÁO TẢI XUỐNG DẠNG THEATER ================= */
.dl-ad-overlay-backdrop {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    padding: 16px;
}

.dl-theater-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
}

.dl-theater-screen {
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-theater-topbar {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 30;
    pointer-events: none;
}

.dl-theater-badge {
    background: rgba(0, 0, 0, 0.7);
    color: #f59e0b;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.dl-theater-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.btn-theater-sound,
.btn-theater-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.btn-theater-sound:hover {
    background-color: #0066ff;
    border-color: #0066ff;
    transform: scale(1.08);
}

.btn-theater-close:hover {
    background-color: #ef4444;
    border-color: #ef4444;
    transform: scale(1.08);
}

.dl-theater-bottombar {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 30;
}

.dl-confirm-card {
    max-width: 480px;
}

/* ================= 15. RESPONSIVE DI ĐỘNG ================= */
@media (max-width: 1024px) {
    .view-main-layout {
        flex-direction: column;
        padding: 4px 8px 45px;
    }

    .iframe-container-a4 {
        height: 72vh;
        min-height: 520px;
    }

    .view-doc-title {
        font-size: 16px;
        line-height: 1.35;
        margin-top: 10px;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .secondary-related-col {
        width: 100%;
        flex: auto;
    }

    .yt-header-center, 
    .desktop-only {
        display: none !important;
    }

    .btn-mobile-search-icon {
        display: inline-flex;
    }

    .comments-mobile-preview-bar {
        background-color: #f1f5f9;
        padding: 12px 16px;
        border-radius: 10px;
        cursor: pointer;
    }

    .mobile-open-indicator {
        display: inline-flex;
    }

    .comments-collapsible-body {
        display: none;
        margin-top: 14px;
    }

    .comments-collapsible-body.open {
        display: block;
    }
}

@media (max-width: 768px) {
    .yt-header {
        height: 48px;
        padding: 0 10px;
    }

    .yt-header-left {
        gap: 8px;
    }

    .btn-sidebar-burger {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .yt-brand-container {
        gap: 6px;
    }

    .brand-text-wrapper .brand-text {
        font-size: 19px;
    }

    .brand-text-wrapper .brand-domain {
        font-size: 11px;
    }

    .btn-mobile-search-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .yt-header-right {
        gap: 6px;
    }

    .yt-user-avatar, 
    .yt-btn-login {
        width: 32px;
        height: 32px;
        min-width: 32px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 17px;
    }

    .view-main-layout {
        margin-top: 48px;
        padding: 6px 10px 75px;
    }

    .yt-author-action-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .author-left-group {
        width: 100%;
        justify-content: space-between;
    }

    .author-subscribe-btn-box {
        margin-left: auto;
    }

    .action-buttons-group {
        width: 100%;
        padding-bottom: 4px;
    }

    .btn-yt-pill {
        height: 34px;
        padding: 0 12px;
        font-size: 12.5px;
    }

    .yt-mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 52px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        background-color: #ffffff;
        border-top: 1px solid #e2e8f0;
        z-index: 9999;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        padding: 0 4px;
    }

    .mobile-bottom-item {
        flex: 1;
        max-width: 68px;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 4px 0;
        gap: 2px;
        color: #334155;
        text-decoration: none;
    }

    .mobile-bottom-item i {
        font-size: 18px;
    }

    .mobile-bottom-item span {
        font-size: 9.5px;
        font-weight: 600;
        white-space: nowrap;
    }

    .mobile-bottom-item:hover, 
    .mobile-bottom-item.active {
        color: #0066ff;
    }

    .bottom-icon-wrapper {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
    }

    .btn-bottom-plus .bottom-plus-circle {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background-color: #0066ff;
        color: #ffffff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        box-shadow: 0 2px 6px rgba(0, 102, 255, 0.35);
    }
}

@media (min-width: 769px) {
    .yt-mobile-bottom-bar {
        display: none;
    }
}

/* ================= 16. KHUNG TÀI LIỆU KẾT HỢP (BANNER CARD & A4 STANDING) ================= */
.combo-preview-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}

.combo-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.combo-badge-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
}

.combo-badge-title i {
    color: #0066ff;
    font-size: 16px;
}

/* ẨN CHỮ ĐÃ KẾT HỢP VÀ NÚT LIÊN KẾT THÊM TRÊN VIEW */
.combo-tag-status,
.btn-link-more-files {
    display: none !important;
}

/* Thẻ Banner lớn hiển thị trước 1 tệp bên ngoài */
.combo-single-lead {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    border-radius: 12px;
    transition: border-color 0.2s;
}

.combo-single-lead:hover {
    border-color: #cbd5e1;
}

/* THUMBNAIL DẠNG TỜ A4 ĐỨNG CHO THẺ LEAD */
.lead-thumb-box {
    position: relative;
    width: 105px;
    aspect-ratio: 1 / 1.35;
    border-radius: 6px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    overflow: visible;
}

.lead-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.lead-thumb-box::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 5px;
    right: 5px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 4px 4px 0 0;
    z-index: -1;
}

.lead-thumb-box::after {
    content: "";
    position: absolute;
    top: -7px;
    left: 10px;
    right: 10px;
    height: 4px;
    background: #94a3b8;
    border-radius: 4px 4px 0 0;
    z-index: -2;
}

.lead-thumb-overlay-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(2px);
    z-index: 2;
}

.lead-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lead-file-name {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lead-file-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.lead-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

.lead-meta-pill.subject-pill {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.lead-meta-pill.school-pill {
    background-color: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.lead-file-author-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
}

.lead-author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0066ff;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.lead-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lead-author-name {
    font-weight: 700;
    color: #334155;
}

.lead-doc-stats {
    color: #64748b;
}

.lead-action-box {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-expand-combo {
    background: #0066ff;
    color: #ffffff;
    border: none;
    padding: 7px 15px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-expand-combo:hover {
    background-color: #0052cc;
}

.btn-expand-combo i {
    transition: transform 0.25s ease;
}

.btn-expand-combo.active i {
    transform: rotate(180deg);
}

/* ================= HỘP THOẠI MENU 3 CHẤM (DROPDOWN) DÙNG CHUNG ================= */
.combo-more-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.btn-combo-child-more,
.btn-combo-item-more {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s;
}

.btn-combo-child-more:hover,
.btn-combo-item-more:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.combo-more-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 175px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
    z-index: 99999;
    overflow: hidden;
    flex-direction: column;
}

.combo-more-dropdown.show {
    display: flex;
}

.combo-dropdown-item {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.combo-dropdown-item:hover {
    background-color: #f1f5f9;
    color: #0066ff;
}

.combo-dropdown-item.item-danger {
    color: #ef4444;
}

.combo-dropdown-item.item-danger:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

/* ================= TỪNG THẺ TỆP CON BÊN TRONG KHAY (CARD KHỔ A4 ĐỨNG) ================= */
.combo-tray-drawer {
    display: none;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.combo-tray-drawer.show {
    display: block;
}

.combo-tray-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
}

.combo-scroll-container {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.combo-scroll-container::-webkit-scrollbar {
    width: 5px;
}
.combo-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.combo-items-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.combo-child-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    transition: all 0.15s ease;
    position: relative;
}

.combo-child-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.combo-child-card.current-viewing {
    background: #eff6ff;
    border-color: #93c5fd;
}

.combo-child-card.is-disabled-click {
    cursor: default;
}

.current-title-text {
    font-size: 13.5px;
    font-weight: 800;
    color: #0066ff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* THUMBNAIL TỆP CON KHỔ A4 ĐỨNG */
.child-card-thumb-wrap {
    position: relative;
    width: 72px;
    aspect-ratio: 1 / 1.35;
    border-radius: 5px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    text-decoration: none;
    display: block;
}

.child-card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.child-card-idx-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    backdrop-filter: blur(2px);
}

.child-card-idx-badge.badge-now-playing {
    background: #0066ff;
    color: #ffffff;
}

.child-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.child-card-title-row {
    display: flex;
    align-items: center;
}

.child-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.child-card-title:hover {
    color: #0066ff;
}

.child-card-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.child-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

.child-meta-pill.subject-pill {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.child-meta-pill.school-pill {
    background-color: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.child-card-author-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #64748b;
    margin-top: 1px;
}

.child-author-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0066ff;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.child-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.child-author-name {
    font-weight: 700;
    color: #475569;
}

.child-stats {
    color: #64748b;
}

.child-card-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.combo-scroll-sentinel {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

/* ================= 17. THẺ BỘ TÀI LIỆU XEN KẼ CỘT PHẢI (KHỔ A4 XẾP TẦNG) ================= */
.combo-playlist-interleaved-card {
    background: linear-gradient(to right, #ffffff, #f8fafc);
    border: 1.5px solid #cbd5e1 !important;
    cursor: pointer;
}

.combo-playlist-interleaved-card:hover {
    border-color: #0066ff !important;
}

.combo-stacked-thumb {
    position: relative;
    width: 98px;
    aspect-ratio: 1 / 1.35;
    border-radius: 6px;
    overflow: visible !important;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.combo-stacked-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.combo-stacked-thumb::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 4px;
    right: 4px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 4px 4px 0 0;
    z-index: 1;
}

.combo-stacked-thumb::after {
    content: "";
    position: absolute;
    top: -7px;
    left: 8px;
    right: 8px;
    height: 4px;
    background: #94a3b8;
    border-radius: 4px 4px 0 0;
    z-index: 0;
}

.playlist-overlay-strip {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 0 0 5px 5px;
    z-index: 2;
}

.combo-card-badge-label {
    font-size: 11px;
    font-weight: 800;
    color: #0066ff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

/* ================= 18. DẢI PHÁT KẾT HỢP CHUẨN YOUTUBE CỘT PHẢI ================= */
.yt-playlist-tray-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    animation: traySlideDown 0.25s ease-out;
}

@keyframes traySlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.yt-playlist-tray-header {
    background: #ffffff;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.tray-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tray-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-close-tray {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #64748b;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s, color 0.15s;
}

.btn-close-tray:hover {
    background-color: #fee2e2;
    color: #ef4444;
}

.tray-subtitle {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
}

.yt-playlist-tray-body {
    max-height: 420px;
    overflow-y: auto;
    padding: 6px;
}

.yt-playlist-tray-body::-webkit-scrollbar {
    width: 5px;
}
.yt-playlist-tray-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.yt-playlist-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yt-playlist-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.yt-playlist-item-row:hover {
    background: #f1f5f9;
}

.yt-playlist-item-row.is-active-playing {
    background: #eff6ff;
    border-color: #93c5fd;
}

.tray-item-indicator {
    width: 18px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    flex-shrink: 0;
}

.tray-play-icon {
    color: #0066ff;
    font-size: 11px;
}

.tray-item-thumb {
    width: 48px;
    aspect-ratio: 1 / 1.35;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    text-decoration: none;
    display: block;
}

.tray-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tray-item-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tray-item-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-playlist-item-row.is-active-playing .tray-item-name {
    color: #0066ff;
}

.tray-item-sub {
    font-size: 11px;
    color: #64748b;
}

.tray-item-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.tray-scroll-sentinel {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 4px;
}
/* ================= 19. RESPONSIVE BỔ SUNG CHO MOBILE (ĐÃ CẬP NHẬT) ================= */
@media (max-width: 768px) {
    /* Khung thẻ lead thu gọn chỉ tốn 1 hàng duy nhất trên di động */
    .combo-single-lead {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
    }

    /* Ẩn các thành phần rườm rà và tên danh sách thô, chỉ giữ lại tên tệp + nút mở cố định */
    .combo-preview-header,
    .lead-thumb-box,
    .lead-file-meta-row,
    .lead-file-author-row,
    .combo-single-lead .combo-more-dropdown-wrap {
        display: none !important;
    }

    .lead-file-info {
        flex: 1;
        min-width: 0;
    }

    .lead-file-name {
        font-size: 13px;
        font-weight: 700;
        color: #0f172a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        margin: 0;
    }

    .lead-action-box {
        flex-shrink: 0;
    }

    .btn-expand-combo {
        padding: 6px 14px;
        font-size: 11.5px;
        border-radius: 16px;
        white-space: nowrap;
    }

    /* Ẩn hoàn toàn các dòng chữ thống kê rườm rà ("đã hiển thị toàn bộ...", số lượng đếm...) */
    .combo-tray-stats,
    .combo-scroll-sentinel {
        display: none !important;
    }

    /* Khi mở khay: ẩn thẻ lead ngoài để tránh trùng lặp, hiển thị danh sách tab con tối ưu */
    .combo-preview-card.drawer-opened .combo-single-lead {
        display: none !important;
    }

    .combo-tray-drawer.show {
        display: block !important;
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    .combo-child-card {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 6px 8px;
    }

    .child-card-thumb-wrap {
        width: 46px;
    }

    .child-card-title {
        font-size: 12.5px;
    }
}
/* ================= TRÌNH ĐỌC PDF.JS PHONG CÁCH GOOGLE DRIVE ================= */
#gdrive-pdf-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #242526;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* Thanh công cụ Floating Toolbar bán trong suốt giữa đỉnh */
.gdrive-pdf-toolbar {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 4px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 25;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    color: #ffffff;
    transition: opacity 0.25s ease;
}

.gdrive-tb-pages {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
}

.gdrive-tb-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.gdrive-tb-zoom-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gdrive-tb-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background-color 0.15s, color 0.15s;
}

.gdrive-tb-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.gdrive-zoom-val {
    font-size: 12.5px;
    font-weight: 700;
    min-width: 42px;
    text-align: center;
    color: #f1f5f9;
}

/* Vùng cuộn dọc tài liệu */
.gdrive-pdf-viewport {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: auto;
    padding: 60px 16px 40px;
    display: flex;
    justify-content: center;
    scroll-behavior: smooth;
}

.gdrive-pdf-pages-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

/* Container từng trang PDF */
.gdrive-page-box {
    position: relative;
    background-color: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gdrive-page-box canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Spinner quay dạng Google Drive */
.gdrive-pdf-spinner {
    position: absolute;
    inset: 0;
    background: #242526;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.gdrive-spinner-circle {
    width: 40px;
    height: 40px;
    border: 3.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: #0066ff;
    border-radius: 50%;
    animation: gdriveSpin 0.8s linear infinite;
}

@keyframes gdriveSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .gdrive-pdf-toolbar {
        top: 8px;
        padding: 3px 10px;
        gap: 8px;
    }
    .gdrive-zoom-val {
        min-width: 34px;
        font-size: 11px;
    }
    .gdrive-pdf-viewport {
        padding: 50px 8px 30px;
    }
}
/* ================= PROGRESS MODAL CHUẨN BỊ TẢI XUỐNG ================= */
.dl-progress-overlay-backdrop {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    z-index: 100000;
}

.dl-progress-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: voiceModalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dl-progress-icon-box {
    width: 60px;
    height: 60px;
    background-color: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #0066ff;
    font-size: 26px;
}

.dl-progress-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.dl-progress-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.45;
}

.dl-progress-track {
    width: 100%;
    height: 8px;
    background-color: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.dl-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0066ff, #00c6ff);
    border-radius: 10px;
    transition: width 0.2s ease-out;
}

.dl-progress-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}