/* ===== PHÒNG LUYỆN THI HSA - CHUẨN ĐẠI HỌC QUỐC GIA HÀ NỘI (SKYEDU) ===== */

/* 1. Modal chọn phòng luyện thi (TSA hoặc HSA) */
#modal-choose-room .modal-box {
    max-width: 580px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.choose-rooms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 20px;
}

.choose-room-card {
    border-radius: 16px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.choose-room-card.tsa-card {
    border: 2px solid #fecaca;
    background: #fff5f5;
}

.choose-room-card.tsa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(200, 21, 63, 0.15);
    border-color: #f87171;
}

.choose-room-card.hsa-card {
    border: 2px solid #bfdbfe;
    background: #f0f7ff;
}

.choose-room-card.hsa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(30, 91, 216, 0.18);
    border-color: #60a5fa;
}

.room-btn.hsa {
    background-color: #1e5bd8 !important;
    opacity: 1 !important;
    cursor: pointer !important;
    filter: none !important;
}

.room-btn.hsa:hover {
    background-color: #1646ad !important;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(30, 91, 216, 0.3) !important;
}

/* 2. Màn hình chờ bắt đầu thi HSA (Hình 2 - Đếm ngược 60s) */
#hsa-conf {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    font-family: var(--sky-font) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

#hsa-conf, #hsa-conf * {
    font-family: var(--sky-font) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#hsa-conf.on {
    display: flex !important;
}

.hsa-conf-topbar {
    height: 48px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    font-size: 14px;
    font-weight: 700;
}

.hsa-conf-top-title {
    color: #1e5bd8;
    letter-spacing: 0.3px;
}

.hsa-conf-top-user {
    color: #0f172a;
    font-weight: 600;
}

.hsa-conf-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    max-width: 760px;
    margin: 0 auto;
}

.hsa-conf-kicker {
    font-size: 14.5px;
    color: #475569;
    margin: 0 0 6px;
    font-weight: 600;
}

.hsa-conf-sec-name {
    font-size: 22px;
    font-weight: 800;
    color: #1e5bd8;
    text-transform: uppercase;
    margin: 0 0 24px;
    letter-spacing: 0.5px;
}

.hsa-conf-logo-wrap {
    margin-bottom: 20px;
}

.hsa-conf-logo {
    height: 60px;
    object-fit: contain;
}

.hsa-conf-title {
    font-size: 26px;
    font-weight: 800;
    color: #1e5bd8;
    text-transform: uppercase;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.hsa-conf-time {
    font-size: 15.5px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 6px;
}

.hsa-conf-desc {
    font-size: 14.5px;
    color: #64748b;
    margin: 0 0 24px;
}

.hsa-conf-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.hsa-badge-box {
    width: 44px;
    height: 44px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    border: 1.5px solid #bae6fd;
}

.hsa-badge-box:nth-child(2) {
    background: #1e5bd8;
    color: #ffffff;
    border-color: #1e5bd8;
}

.hsa-conf-notice {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px;
}

.hsa-conf-timer {
    font-size: 56px;
    font-weight: 900;
    color: #1e5bd8;
    line-height: 1;
    margin-bottom: 24px;
    font-variant-numeric: tabular-nums;
    animation: hsa-pulse 1s infinite alternate;
}

@keyframes hsa-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.hsa-btn-start {
    background: #1e5bd8;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    padding: 13px 48px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(30, 91, 216, 0.3);
}

.hsa-btn-start:hover {
    background: #1646ad;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 91, 216, 0.4);
}

/* 3. Giao diện phòng thi chính thức HSA (Hình 3) */
#hsa-exam {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 99990;
    display: none;
    flex-direction: column;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
}

#hsa-exam.on {
    display: flex !important;
}

.hsa-exam-header {
    height: 60px;
    background: #ffffff;
    border-bottom: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.hsa-hdr-left {
    flex: 0 0 240px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hsa-hdr-logo {
    height: 34px;
    object-fit: contain;
}

.hsa-hdr-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hsa-hdr-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    text-transform: uppercase;
    font-family: var(--sky-font);
}

.hsa-hdr-subtitle {
    font-size: 12.5px;
    font-weight: 600;
    color: #1e5bd8;
    margin-top: 2px;
    font-family: var(--sky-font);
}

.hsa-hdr-right {
    flex: 0 0 auto;
    min-width: 320px;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: nowrap !important;
}

.hsa-hdr-user {
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
    flex-shrink: 1;
    display: inline-block;
}

.hsa-hdr-clock {
    font-size: 17px;
    font-weight: 800;
    color: #1e5bd8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 5px 12px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
    font-family: monospace, var(--sky-font);
    letter-spacing: 0.5px;
    width: 86px;
    min-width: 86px;
    text-align: center;
    flex-shrink: 0 !important;
    box-sizing: border-box;
}

.hsa-hdr-clock.warning {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
    animation: hsa-pulse 1s infinite alternate;
}

.hsa-hdr-btn-submit {
    background: #438b38;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 22px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(67, 139, 56, 0.35);
    transition: all 0.2s ease;
    flex-shrink: 0 !important;
}

.hsa-hdr-btn-submit:hover {
    background: #36722d;
    transform: translateY(-1px);
}

.hsa-hdr-btn-exit {
    background: transparent;
    border: 1.5px solid #cbd5e1;
    font-family: 'Be Vietnam Pro', 'Lexend', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.hsa-hdr-btn-exit:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Thanh số thứ tự câu hỏi và ô đáp án 2 hàng ngang khớp thi thật HSA */
.hsa-nav-bar {
    height: 68px;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 16px;
    flex-shrink: 0;
    user-select: none;
}

.hsa-nav-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
    gap: 12px;
}

.hsa-nav-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 54px;
    padding: 2px 0;
    flex-shrink: 0;
}

.hsa-nav-lbl-row {
    font-family: 'Be Vietnam Pro', 'Lexend', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    height: 24px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.hsa-nav-track-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    padding-bottom: 2px;
}

.hsa-nav-grid-columns {
    display: flex;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
}

.hsa-nav-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
}

.hsa-nav-num {
    min-width: 28px;
    height: 25px;
    padding: 0 5px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #475569;
    font-family: 'Be Vietnam Pro', 'Lexend', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.hsa-nav-num:hover {
    border-color: #1e5bd8;
    color: #1e5bd8;
}

.hsa-nav-num.answered {
    background: #1e5bd8 !important;
    border-color: #1e5bd8 !important;
    color: #ffffff !important;
    font-weight: 700;
}

.hsa-nav-num.active {
    box-shadow: 0 0 0 2px #3b82f6;
    border-color: #2563eb;
}

.hsa-nav-ans-cell {
    min-width: 28px;
    height: 25px;
    padding: 0 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #64748b;
    font-family: 'Be Vietnam Pro', 'Lexend', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.15s ease;
}

.hsa-nav-ans-cell.answered {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
    font-weight: 800;
}

.hsa-nav-col:hover .hsa-nav-ans-cell {
    border-color: #93c5fd;
}

/* Thân trang: Main cuộn dọc toàn màn hình (không cần sidebar bên phải) */
.hsa-exam-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.hsa-questions-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 30px 48px 100px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
    transform: translateZ(0);
}

.hsa-questions-list {
    max-width: 960px;
    margin: 0 auto;
}

/* Khu vực nút NỘP BÀI ở cuối danh sách câu hỏi (sau câu 50) */
.hsa-exam-submit-bottom {
    text-align: center;
    padding: 48px 0 64px;
    margin-top: 32px;
    border-top: 1.5px dashed #cbd5e1;
}

.hsa-ftr-btn-submit {
    background: #2e7d32;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 68px;
    font-family: var(--sky-font);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.35);
    transition: all 0.2s ease;
}

.hsa-ftr-btn-submit:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(46, 125, 50, 0.45);
}

/* Modal Cảnh báo Anti-cheat HSA */
.hsa-anticheat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.hsa-anticheat-overlay.open {
    display: flex;
}

.hsa-anticheat-box {
    background: #ffffff;
    border-radius: 14px;
    padding: 32px 36px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    animation: hsa-pop 0.25s ease-out;
}

.hsa-ac-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.hsa-ac-title {
    font-family: 'Be Vietnam Pro', 'Lexend', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #dc2626;
    margin: 0 0 10px;
}

.hsa-ac-msg {
    font-family: 'Be Vietnam Pro', 'Lexend', sans-serif;
    font-size: 14px;
    color: #334155;
    line-height: 1.55;
    margin: 0 0 14px;
}

.hsa-ac-count {
    display: inline-block;
    padding: 6px 16px;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.hsa-ac-btn {
    width: 100%;
    padding: 12px;
    background: #1e5bd8;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Be Vietnam Pro', 'Lexend', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hsa-ac-btn:hover {
    background: #1746a2;
}

.hsa-aside-head {
    background: #1e5bd8;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 14px;
    text-align: center;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.hsa-aside-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.hsa-ans-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 18px;
    font-size: 13.5px;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
    transition: background 0.15s ease;
}

.hsa-ans-row:hover {
    background: #f1f5f9;
}

.hsa-ans-row.has-ans {
    background: #eff6ff;
}

.hsa-ans-num {
    font-weight: 700;
    color: #475569;
}

.hsa-ans-val {
    font-weight: 700;
    color: #94a3b8;
    min-width: 20px;
    text-align: right;
}

.hsa-ans-row.has-ans .hsa-ans-val {
    color: #1e5bd8;
}

/* Thiết kế từng câu hỏi HSA */
.hsa-q-item {
    margin-bottom: 34px;
    padding-bottom: 24px;
    border-bottom: 1.5px dashed #e2e8f0;
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: 160px;
}

.hsa-q-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.hsa-q-badge {
    background: #1e5bd8;
    color: #ffffff;
    font-weight: 800;
    font-size: 13.5px;
    padding: 3px 10px;
    border-radius: 5px;
    flex-shrink: 0;
}

.hsa-q-subhead {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
}

.hsa-q-stem {
    font-size: 15px;
    line-height: 1.65;
    color: #1e293b;
    margin-bottom: 14px;
}

/* Dạng 1: Trắc nghiệm tròn ABCD (Hình 4) */
.hsa-q-options-circle {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding-left: 4px;
}

.hsa-opt-circle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14.5px;
    color: #1e293b;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s ease;
    user-select: none;
}

.hsa-opt-circle:hover {
    background: #f8fafc;
}

.hsa-opt-circle input[type="radio"] {
    display: none;
}

.hsa-opt-letter {
    font-weight: 700;
    color: #0f172a;
    width: 26px;
}

.hsa-circle-dot {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    display: inline-block;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.hsa-opt-circle input[type="radio"]:checked + .hsa-opt-letter + .hsa-circle-dot,
.hsa-opt-circle.selected .hsa-circle-dot {
    border-color: #1e5bd8;
}

.hsa-opt-circle input[type="radio"]:checked + .hsa-opt-letter + .hsa-circle-dot::after,
.hsa-opt-circle.selected .hsa-circle-dot::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1e5bd8;
}

.hsa-opt-text {
    flex: 1;
}

/* Dạng 2: Câu trả lời ngắn / điền số (Hình 5) */
.hsa-q-diagram {
    margin: 18px 0;
    text-align: center;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
}

.hsa-q-shortans-box {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.hsa-shortans-label {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
}

.hsa-shortans-input {
    background: #e8f4f8;
    border: 1.5px solid #bce1f3;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 15px;
    font-weight: 700;
    color: #0369a1;
    width: 220px;
    outline: none;
    transition: all 0.2s ease;
}

.hsa-shortans-input:focus {
    background: #ffffff;
    border-color: #1e5bd8;
    box-shadow: 0 0 0 3px rgba(30, 91, 216, 0.15);
}

/* Dạng 3: Câu hỏi chùm (Hình 6) */
.hsa-cluster-wrap {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 28px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 38px;
    content-visibility: auto;
    contain-intrinsic-size: 380px;
}

.hsa-cluster-left {
    padding-right: 18px;
    border-right: 1.5px dashed #cbd5e1;
}

.hsa-cluster-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 14px;
    line-height: 1.5;
}

.hsa-cluster-context {
    font-size: 14.5px;
    color: #334155;
    line-height: 1.65;
}

.hsa-cluster-context p {
    margin: 0 0 12px;
}

.hsa-cluster-right {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hsa-q-item.cluster-child {
    margin-bottom: 0;
    padding-bottom: 18px;
}

.hsa-q-item.cluster-child:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Modal Kết quả thi HSA */
#hsa-res {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0f172a url('../images/bg-review-anime-hsa.jpg') center/cover no-repeat fixed;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

#hsa-res.on {
    display: flex !important;
}

#hsa-res::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
}

.hsa-res-box {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 14px;
    width: 92%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 34px 40px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    font-family: var(--sky-font) !important;
}

/* Typography chuẩn cho Modal Chọn Phòng Luyện, Cảnh báo nộp bài, Kết quả và Xem lại bài thi */
#modal-choose-room,
#modal-choose-room *,
#hsa-warn-overlay,
#hsa-warn-overlay,
#hsa-warn-overlay *:not(.katex):not(.katex *),
#hsa-res,
#hsa-res *:not(.katex):not(.katex *),
#hsa-review-view,
#hsa-review-view *:not(.katex):not(.katex *) {
    font-family: var(--sky-font);
    -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   BẢO VỆ BỘ FONT TOÁN HỌC KATEX CHUẨN MỰC CHO HSA (ĐỒNG BỘ 100% VỚI TSA)
   KaTeX tự quản lý font KaTeX_Size1/2/3/4 cho ngoặc hệ phương trình \begin{cases}
   ========================================================================= */
#hsa-exam .katex,
#hsa-review-view .katex,
#hsa-res .katex {
    text-rendering: auto;
}

/* Overlay cảnh báo chưa làm hết câu (Hình 2) */
#hsa-warn-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

#hsa-warn-overlay.on {
    display: flex !important;
}

/* Khung xem lại bài thi chi tiết của HSA (Xem lại bài thi ở một tab khác) */
#hsa-review-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0f172a url('../images/bg-review-anime-hsa.jpg') center/cover no-repeat fixed;
    z-index: 1000005; /* Bắt buộc lớn hơn hsa-res để nổi lên trên */
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#hsa-review-view.on {
    display: flex !important;
}

#hsa-review-view::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(248, 250, 252, 0.90);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 0;
    pointer-events: none;
}

#hsa-review-view header,
#hsa-review-view > div {
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .hsa-cluster-wrap {
        grid-template-columns: 1fr;
    }
    .hsa-cluster-left {
        border-right: none;
        border-bottom: 1.5px dashed #cbd5e1;
        padding-right: 0;
        padding-bottom: 20px;
    }
    .hsa-questions-scroll {
        padding: 20px;
    }
    .hsa-answers-sidebar {
        width: 140px;
    }
}

/* Lời giải chi tiết chuẩn dạng LaTeX đồng bộ 100% với TSA */
#hsa-review-view .rv-lg {
    margin-top: 22px;
    background: #fff7f7 !important;
    border: 1px solid #fecaca !important;
    border-radius: 12px;
    padding: 18px 22px;
    animation: sec-pane .35s ease both;
}

#hsa-review-view .rv-lg-t {
    color: #b91c1c !important;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    font-family: var(--sky-font);
    display: flex;
    align-items: center;
    gap: 8px;
}

#hsa-review-view .rv-lg-n {
    font-size: 17px;
    line-height: 1.7;
    color: #111;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#hsa-review-view .rv-lg-n .katex {
    font-size: 1.12em;
}

#hsa-review-view .rv-lg-trong {
    color: #6b7280;
    font-style: italic;
}

#hsa-review-view .rv-btn-lg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #fff;
    border: 1.5px solid #b91c1c;
    color: #b91c1c;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 14px;
    font-family: var(--sky-font);
}

#hsa-review-view .rv-btn-lg:hover {
    background: #fef2f2;
}
