/* ==========================================================
   CSS CHO MEDIDOCX AI (v3.3)
   Hỗ trợ đa thiết bị: Điện thoại Mobile & Laptop / Máy tính PC
   Hỗ trợ 2 giao diện: TỐI (Dark) & SÁNG (Light)
   Phóng to chữ thực chất (120% / 140%) qua Root Rem Scaling
   ========================================================== */

/* 1. QUY TẮC PHÒNG VỆ HIỂN THỊ */
.hidden {
    display: none !important;
}

.hidden-input {
    display: none !important;
}

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700;800;900&display=swap');

@font-face {
    font-family: 'OpenDyslexic';
    src: url('fonts/OpenDyslexic-Regular.otf?v=7') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('fonts/OpenDyslexic-Regular.otf?v=7') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}



/* PHÔNG CHỮ LEXEND DỰ PHÒNG NGOẠI TUYẾN */
@font-face {
    font-family: 'Lexend';
    src: url('fonts/Lexend-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


/* QUY ĐỊNH GỐC CỠ CHỮ TOÀN TRANG (ROOT SCALING) */
html {
    font-size: 16px;
    transition: font-size 0.2s ease;
}

/* PHÓNG TO 120% CHO NGƯỜI CAO TUỔI */
html.font-large {
    font-size: 19.5px !important; /* Tăng 122% toàn bộ font chữ và giao diện */
}

/* PHÓNG TO 145% CHO NGƯỜI MẮT RẤT KÉM */
html.font-xlarge {
    font-size: 23px !important;  /* Tăng 144% toàn bộ font chữ và giao diện */
}

/* BIẾN MÀU MẶC ĐỊNH: CHẾ ĐỘ TỐI (DARK MODE) */
:root {
    --bg-page: #0B1120;
    --card-bg: #1E293B;
    --card-inner: #243248;
    --border-color: #334155;
    
    --text-main: #FFFFFF;
    --text-muted: #94A3B8;
    --text-sub: #CBD5E1;
    
    --color-title: #38BDF8;
    --color-dosage-bg: #1E3A8A26;
    --color-dosage-border: #38BDF8;
    --color-dosage-label: #7DD3FC;
    --color-dosage-val: #F0F9FF;
    
    --color-warning-bg: #78350F28;
    --color-warning-border: #F59E0B;
    --color-warning-label: #FCD34D;
    --color-warning-val: #FEF08A;
    
    --color-hero-thuoc: linear-gradient(135deg, #1D4ED8 0%, #2563EB 50%, #1E40AF 100%);
    --color-hero-vanban: linear-gradient(135deg, #0D9488 0%, #059669 50%, #047857 100%);
    --color-audio-main: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
}

/* CHẾ ĐỘ SÁNG (LIGHT MODE) - TƯƠNG PHẢN CAO, ĐẬM NÉT, RÕ CHỮ */
body.light-theme {
    --bg-page: #F8FAFC;
    --card-bg: #FFFFFF;
    --card-inner: #F1F5F9;
    --border-color: #CBD5E1;
    
    --text-main: #0F172A;              /* Đen tuyền tương phản cao */
    --text-muted: #475569;             /* Xám đậm dễ đọc */
    --text-sub: #334155;
    
    --color-title: #0284C7;
    --color-dosage-bg: #EFF6FF;
    --color-dosage-border: #3B82F6;
    --color-dosage-label: #1D4ED8;
    --color-dosage-val: #0F172A;       /* Chữ đen đậm rõ nét */
    
    --color-warning-bg: #FFFBEB;
    --color-warning-border: #D97706;
    --color-warning-label: #B45309;
    --color-warning-val: #78350F;       /* Nâu hổ phách đậm rất dễ đọc */
}

/* CÁC QUY TẮC BỔ TRỢ RIÊNG CHO LIGHT MODE */
body.light-theme .header {
    background: #FFFFFF;
    border-color: #CBD5E1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

body.light-theme .header-title h1 {
    color: #0F172A;
}

body.light-theme .btn-header-icon {
    background: #F1F5F9;
    color: #0F172A;
    border-color: #CBD5E1;
}

body.light-theme .mode-selector {
    background: #E2E8F0;
    border-color: #CBD5E1;
}

body.light-theme .mode-tab {
    color: #334155;
}

body.light-theme .med-search-card {
    background: #FFFFFF;
    border-color: #CBD5E1;
}

body.light-theme .search-input-group input {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #0F172A;
}

body.light-theme .med-chip {
    background: #E2E8F0;
    color: #1E293B;
    border-color: #CBD5E1;
}

body.light-theme .card-medicine-title {
    background: #F0F9FF;
    border-color: #0284C7;
}

body.light-theme .audio-control-bar {
    background: #F8FAFC;
    border-color: #818CF8;
}

body.light-theme .audio-header-speed {
    color: #1E293B;
}

body.light-theme .speed-badge {
    background: #E2E8F0;
    color: #0369A1;
}

body.light-theme .btn-text-back {
    color: #0284C7;
}

body.light-theme .modal-content {
    background: #FFFFFF;
    color: #0F172A;
    border-color: #CBD5E1;
}

body.light-theme .modal-header h3 {
    color: #0F172A;
}

body.light-theme .network-info-box {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #334155;
}

body.light-theme .ocr-details {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #334155;
}

body.light-theme .raw-ocr-text {
    color: #0F172A;
}

/* PHÔNG CHỮ TRỢ NĂNG */
/* PHÔNG CHỮ TRỢ NĂNG OPENDYSLEXIC (ĐÁY ĐẬM CHỐNG LẬT CHỮ - ĐÃ TỐI ƯU TOÀN DIỆN CHO LAPTOP & PC) */
body.font-opendyslexic {
    font-family: 'OpenDyslexic', 'Comic Sans MS', sans-serif !important;
    line-height: 1.7 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.font-opendyslexic *,
body.font-opendyslexic button,
body.font-opendyslexic input,
body.font-opendyslexic textarea,
body.font-opendyslexic select {
    font-family: 'OpenDyslexic', 'Comic Sans MS', sans-serif !important;
}

/* ÁP DỤNG GIÃN CÁCH TỰ NHIÊN CHO NỘI DUNG VĂN BẢN (KHÔNG ÉP LÊN NÚT BẤM / ICON ĐỂ TRÁNH VỠ KHUNG PC) */
body.font-opendyslexic p,
body.font-opendyslexic span:not(.hero-icon):not(.logo):not(.btn-icon):not(.badge):not(.speed-badge),
body.font-opendyslexic div.info-block-value,
body.font-opendyslexic .raw-ocr-text,
body.font-opendyslexic .text-extracted-content,
body.font-opendyslexic .summary-text,
body.font-opendyslexic .medicine-val,
body.font-opendyslexic #lblCacYChinh,
body.font-opendyslexic .section-body,
body.font-opendyslexic .card-medicine-title,
body.font-opendyslexic .info-sub-text,
body.font-opendyslexic .dosage-sub-row,
body.font-opendyslexic .doc-readable-text,
body.font-opendyslexic li {
    letter-spacing: 0.025em !important;
    word-spacing: 0.06em !important;
    line-height: 1.75 !important;
    word-break: break-word;
    overflow-wrap: break-word;
}


/* BẢO VỆ NÚT BẤM, THANH TIÊU ĐỀ & ICON TRÊN PC KHÔNG BỊ TRÔI LỆCH / RỚT HÀNG */
body.font-opendyslexic button,
body.font-opendyslexic .btn-back-prominent,
body.font-opendyslexic .btn-hero-capture-compact,
body.font-opendyslexic .btn-switch-tab,
body.font-opendyslexic .btn-mini-audio,
body.font-opendyslexic .mode-tab,
body.font-opendyslexic .badge,
body.font-opendyslexic .speed-badge,
body.font-opendyslexic .header-actions {
    letter-spacing: 0 !important;
    word-spacing: normal !important;
    line-height: 1.35 !important;
    vertical-align: middle !important;
}

body.font-opendyslexic .btn-mini-audio {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

body.font-opendyslexic .btn-back-prominent,
body.font-opendyslexic .btn-hero-capture-compact {
    white-space: normal !important;
    line-height: 1.3 !important;
}

body.font-opendyslexic .badge {
    white-space: normal !important;
    line-height: 1.4 !important;
}

body.font-opendyslexic h1,
body.font-opendyslexic h2,
body.font-opendyslexic h3,
body.font-opendyslexic .hero-title,
body.font-opendyslexic .title-value {
    letter-spacing: 0.015em !important;
    line-height: 1.35 !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

body.font-lexend,
body.font-lexend *,
body.font-lexend button,
body.font-lexend input,
body.font-lexend textarea,
body.font-lexend select {
    font-family: 'Lexend', 'Segoe UI', sans-serif !important;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Lexend', 'Segoe UI', Tahoma, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    letter-spacing: 0.01em;
    min-height: 100vh;
    padding: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* ==========================================================
   2. KHUNG CHỨA ĐA THIẾT BỊ (MOBILE VS LAPTOP / DESKTOP)
   ========================================================== */
.app-container {
    width: 100%;
    max-width: 600px; /* Mặc định cho điện thoại */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* TỐI ƯU CHO LAPTOP & MÀN HÌNH MÁY TÍNH RỘNG */
@media (min-width: 769px) {
    body {
        padding: 20px;
    }
    .app-container {
        max-width: 980px; /* Rộng rãi, không bị bé tí trên laptop */
        gap: 14px;
    }
    .header {
        padding: 14px 20px !important;
    }
    .header-title h1 {
        font-size: 1.45rem !important;
    }
    .header-subtitle {
        font-size: 0.9rem !important;
    }
    .btn-hero-capture {
        padding: 32px 24px !important;
    }
    .hero-icon {
        font-size: 3.5rem !important;
    }
    .hero-title {
        font-size: 1.55rem !important;
    }
    .mode-tab {
        padding: 14px !important;
        font-size: 1.15rem !important;
    }
    /* Chia 2 cột cho kết quả trên laptop để tận dụng không gian */
    .desktop-two-col {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px;
    }
    .desktop-two-col.hidden,
    #med-details-container.hidden,
    #med-details-container[style*="display: none"] {
        display: none !important;
    }
    .desktop-two-col > * {
        min-width: 0;
    }
}

/* ==========================================================
   3. THANH TIÊU ĐỀ (HEADER)
   ========================================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo {
    font-size: 1.6rem;
    line-height: 1;
}

.header-title h1 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-header-icon {
    background: #334155;
    color: #F8FAFC;
    border: 1px solid #475569;
    border-radius: 10px;
    padding: 7px 11px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-header-icon:active {
    transform: scale(0.92);
}

/* ==========================================================
   4. THANH CHUYỂN CHẾ ĐỘ (TAB BAR)
   ========================================================== */
.mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #0F172A;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #1E293B;
}

.mode-tab {
    padding: 10px 6px;
    font-size: 0.98rem;
    font-weight: 700;
    border: 1.5px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mode-tab.active.mode-tab-thuoc {
    background: #166534;
    color: #FFFFFF;
    border-color: #4ADE80;
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.4);
}

.mode-tab.active.mode-tab-vanban {
    background: #1E3A8A;
    color: #FFFFFF;
    border-color: #60A5FA;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.4);
}

/* ==========================================================
   5. MÀN HÌNH CHÍNH (ACTION SCREEN)
   ========================================================== */
.action-screen {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* NÚT CHỤP ẢNH KHỔNG LỒ */
.btn-hero-capture {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
    border-radius: 18px;
    cursor: pointer;
    transition: transform 0.15s ease;
    border: 2.5px solid;
    width: 100%;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.btn-hero-capture:active {
    transform: scale(0.97);
}

.btn-hero-thuoc {
    background: var(--color-hero-thuoc);
    border-color: #93C5FD;
    color: #FFFFFF;
}

.btn-hero-vanban {
    background: var(--color-hero-vanban);
    border-color: #6EE7B7;
    color: #FFFFFF;
}

.hero-icon {
    font-size: 2.8rem;
    margin-bottom: 4px;
    line-height: 1;
}

.hero-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.25;
}

.hero-sub {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 3px;
    font-weight: 500;
}

/* LIÊN KẾT CHỌN ẢNH TỪ THƯ VIỆN */
.btn-choose-file-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    margin-top: 6px;
    color: var(--text-sub);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.btn-choose-file-link:hover {
    color: #38BDF8;
}

/* INPUT ẨN AN TOÀN CHO TRÌNH DUYỆT DI ĐỘNG (KHÔNG DÙNG DISPLAY:NONE) */
.visually-hidden-input {
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    z-index: -999 !important;
}

/* NÚT CHỤP TIẾP THUỐC MỚI TRÊN KẾT QUẢ */
.btn-hero-capture-compact {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: #FFFFFF;
    border: 2px solid #93C5FD;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 1.08rem;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease;
}

.btn-hero-capture-compact:active {
    transform: scale(0.97);
}

.result-top-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.btn-back-prominent {
    width: 100%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #FFFFFF;
    border: 2.5px solid #F59E0B; /* Viền vàng hổ phách nổi bật, không trùng màu xanh/tím */
    border-radius: 14px;
    font-size: 1.12rem;
    font-weight: 800;
    cursor: pointer;
    padding: 13px 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-back-prominent .back-arrow-icon {
    font-size: 1.35rem;
    color: #FBBF24;
}

.btn-back-prominent:hover {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border-color: #FBBF24;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-back-prominent:active {
    transform: scale(0.98);
}

body.light-theme .btn-back-prominent {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #FFFFFF;
    border: 2.5px solid #D97706;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
}

.btn-text-back {
    display: none;
}

/* THANH CÔNG CỤ ĐỌC VĂN BẢN (DYSLEXIA READER) */
.doc-toolbar {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
}

.btn-doc-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 12px;
    font-size: 0.98rem;
    font-weight: 700;
    border-radius: 10px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-doc-toggle {
    background: #F59E0B;
    color: #1E293B;
    border-color: #D97706;
    padding: 12px 14px;
    font-size: 1.05rem;
    font-weight: 800;
}

.btn-doc-toggle:hover {
    background: #D97706;
    color: #FFFFFF;
}

.btn-doc-listen {
    background: #10B981;
    color: #FFFFFF;
    border-color: #059669;
}

.btn-doc-listen:hover {
    background: #059669;
}

.btn-doc-action:active {
    transform: scale(0.97);
}

/* KHUNG CHỨA VĂN BẢN THOÁNG ĐÃNG CHO NGƯỜI DYSLEXIA */
.doc-readable-container {
    background: rgba(30, 41, 59, 0.7);
    border: 1.5px solid #334155;
    border-radius: 14px;
    padding: 16px 18px;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

body.light-theme .doc-readable-container {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.doc-readable-text {
    font-size: 1.15rem;
    line-height: 1.75;
    letter-spacing: 0.35px;
    word-spacing: 1.5px;
    color: #F1F5F9;
    white-space: pre-line;
    user-select: text;
}

body.light-theme .doc-readable-text {
    color: #0F172A;
}

/* Ô TÌM THUỐC NHANH - KHẮC PHỤC TRIỆT ĐỂ LỖI TRÀN MÀN HÌNH */
.med-search-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    overflow: hidden;
}

.search-input-group {
    display: flex;
    gap: 6px;
    width: 100%;
}

.search-input-group input {
    flex: 1 1 0%;
    min-width: 0; /* BẮT BUỘC ĐỂ KHÔNG BỊ TRÀN FLEXBOX TRÊN ĐIỆN THOẠI */
    background: #0F172A;
    border: 1.5px solid #334155;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    font-family: inherit;
}

.search-input-group input:focus {
    outline: none;
    border-color: #38BDF8;
}

.btn-search {
    flex: 0 0 auto;
    background: #0284C7;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.chips-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 100%;
}

.med-chip {
    background: #334155;
    color: #E2E8F0;
    border: 1px solid #475569;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.med-chip:hover {
    background: #0284C7;
    color: #FFFFFF;
}

/* VÙNG KÉO THẢ (PC) */
.drop-zone {
    background: rgba(30, 41, 59, 0.4);
    border: 1.5px dashed #475569;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

@media (max-width: 768px), (pointer: coarse) {
    .pc-only {
        display: none !important;
    }
}

/* ==========================================================
   6. MÀN HÌNH ĐANG XỬ LÝ (LOADING OVERLAY)
   ========================================================== */
.loading-card {
    background: var(--card-bg);
    border: 2px solid #38BDF8;
    border-radius: 18px;
    padding: 28px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.25s ease;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #334155;
    border-top: 5px solid #38BDF8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text-box h4 {
    font-size: 1.2rem;
    color: #38BDF8;
    font-weight: 800;
    margin-bottom: 4px;
}

.loading-text-box p {
    font-size: 0.9rem;
    color: var(--text-sub);
}

/* ==========================================================
   7. MÀN HÌNH KẾT QUẢ RÕ RÀNG (RESULT VIEW)
   ========================================================== */
.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HUY HIỆU NGUỒN DỮ LIỆU */
.badge {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.badge-db {
    background: #14532D;
    color: #86EFAC;
    border: 1px solid #22C55E;
}

.badge-ai {
    background: #78350F;
    color: #FDE68A;
    border: 1px solid #F59E0B;
}

.badge-not-db {
    background: #78350F;
    color: #FEF3C7;
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.badge-danger {
    background: #7F1D1D;
    color: #FECACA;
    border: 2px solid #EF4444;
}

/* CẢNH BÁO CHỤP NHẦM TÀI LIỆU */
.notice-box {
    background: #422006;
    border: 2px solid #EAB308;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #FEF08A;
}

.notice-box h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #FDE047;
}

.btn-switch-tab {
    background: #EAB308;
    color: #1E293B;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

/* THẺ TÊN THUỐC SIÊU TO */
.card-medicine-title {
    background: #0F172A;
    border: 2px solid var(--color-title);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
}

.card-medicine-title .title-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.card-medicine-title .title-value {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--color-title);
    margin-top: 2px;
    word-break: break-word;
    line-height: 1.35;
}

/* CÁC KHỐI THÔNG TIN */
.info-content-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-block {
    background: var(--card-inner);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

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

.info-block-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-muted);
}

.info-block-value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.55;
    padding: 2px 0;
}

/* Giá trị thông thường */
.info-block-value.val-normal {
    color: var(--text-main);
}

/* Khối cách dùng nổi bật */
.block-dosage {
    border: 2px solid var(--color-dosage-border);
    background: var(--color-dosage-bg);
}

.block-dosage .info-block-label {
    color: var(--color-dosage-label);
}

.block-dosage .info-block-value {
    color: var(--color-dosage-val);
}

/* Khối công dụng & hoạt chất bo góc xanh nổi bật */
.block-indication {
    border: 2px solid var(--color-dosage-border);
    background: var(--color-dosage-bg);
}

.block-indication .info-block-label {
    color: var(--color-dosage-label);
}

.block-indication .info-block-value {
    color: var(--color-dosage-val);
}

.dosage-sub-row {
    font-size: 0.92rem;
    color: var(--text-sub);
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Khối lưu ý cảnh báo */
.block-warning {
    border: 2px solid var(--color-warning-border);
    background: var(--color-warning-bg);
}

.block-warning .info-block-label {
    color: var(--color-warning-label);
}

.block-warning .info-block-value {
    color: var(--color-warning-val);
}

.info-sub-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Nút nghe nhỏ cho từng mục */
.btn-mini-audio {
    background: #334155;
    color: #38BDF8;
    border: 1px solid #0284C7;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

body.light-theme .btn-mini-audio {
    background: #E2E8F0;
    color: #0284C7;
    border-color: #38BDF8;
}

/* NÚT PHÂN TÍCH AI (KHI CHƯA CÓ TRONG CSDL) */
.btn-ai-active {
    background: linear-gradient(135deg, #EA580C 0%, #F97316 100%) !important;
    color: #FFFFFF !important;
    border: 2.5px solid #FFEDD5 !important;
    border-radius: 14px;
    padding: 14px 10px;
    font-size: 1.15rem;
    font-weight: 900;
    cursor: pointer;
    width: 100%;
    margin: 4px 0 8px 0;
    font-family: inherit;
    animation: pulse-orange 1.6s infinite ease-in-out;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.4);
    text-align: center;
    transition: all 0.2s ease;
}

.btn-ai-active:disabled,
.btn-ai-active.loading {
    opacity: 0.9 !important;
    cursor: wait !important;
    animation: pulse-orange-fast 0.8s infinite ease-in-out !important;
    filter: brightness(0.95);
    pointer-events: none;
}

@keyframes pulse-orange-fast {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.9);
        transform: scale(0.98);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(234, 88, 12, 0);
        transform: scale(1.01);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(234, 88, 12, 0);
        transform: scale(0.98);
    }
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(234, 88, 12, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(234, 88, 12, 0);
        transform: scale(1);
    }
}

/* ==========================================================
   8. BẢNG ĐIỀU KHIỂN ÂM THANH
   ========================================================== */
.audio-control-bar {
    background: #0F172A;
    border: 2px solid #6366F1;
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audio-header-speed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-sub);
}

@media (min-width: 640px) {
    .audio-header-speed {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.audio-header-title {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap !important;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 4px;
}

.speed-selector-row {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap !important;
    flex-wrap: wrap;
}

.speed-label-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-sub);
    white-space: nowrap !important;
    flex-shrink: 0;
}

.speed-pill-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.btn-speed-pill {
    padding: 5px 9px;
    border-radius: 9999px;
    border: 1.5px solid var(--border-color);
    background: var(--card-inner);
    color: var(--text-sub);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    white-space: nowrap !important;
    line-height: 1.2;
    touch-action: manipulation;
}

.btn-speed-pill:hover {
    border-color: #38BDF8;
    color: var(--text-main);
}

.btn-speed-pill.active {
    background: #0284C7;
    border-color: #38BDF8;
    color: #FFFFFF;
    font-weight: 800;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

body.light-theme .btn-speed-pill {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #334155;
}

body.light-theme .btn-speed-pill:hover {
    border-color: #0284C7;
    color: #0F172A;
}

body.light-theme .btn-speed-pill.active {
    background: #0284C7;
    border-color: #0284C7;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}


/* NÚT NGHE LẠI TO */
.btn-sound-main {
    background: var(--color-audio-main);
    color: #FFFFFF;
    border: 1.5px solid #C4B5FD;
    border-radius: 12px;
    padding: 14px 10px;
    min-height: 56px;
    font-size: 1.15rem;
    font-weight: 900;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
    transition: transform 0.15s ease;
}

.btn-sound-main:active {
    transform: scale(0.98);
}

.audio-secondary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.audio-secondary-row.single-btn {
    grid-template-columns: 1fr !important;
}

/* NÚT PHỤ: NGHE LẠI LƯU Ý & DỪNG ĐỌC (CHIỀU CAO VÀ RỘNG NGANG NHAU) */
.btn-sound-sub {
    padding: 14px 10px;
    min-height: 56px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.15s ease;
}

.btn-sound-sub:active {
    transform: scale(0.98);
}

/* ICON TO RÕ NÉT */
.btn-icon {
    font-size: 1.45rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.btn-sound-main .btn-icon {
    font-size: 1.65rem;
}

.btn-sound-sub .btn-icon {
    font-size: 1.5rem;
}

.btn-doc-toggle .btn-icon {
    font-size: 1.45rem;
}

.btn-sound-yellow {
    background: #334155;
    color: #94A3B8;
    border: 1px solid #475569;
}

.btn-sound-yellow.active-glow {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%) !important;
    color: #0F172A !important;
    border: 1.5px solid #FEF3C7 !important;
    font-weight: 800;
    animation: pulse-amber 1.5s infinite ease-in-out;
}

@keyframes pulse-amber {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
        transform: scale(1);
    }
}

.btn-sound-red {
    background: #DC2626;
    color: #FFFFFF;
}

/* ==========================================================
   9. MODAL CÀI ĐẶT (ĐẢM BẢO ACTIVE STATE RÕ RÀNG Ở CẢ 2 CHẾ ĐỘ)
   ========================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    z-index: 999;
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 18px;
    max-width: 440px;
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.modal-header h3 {
    font-size: 1.15rem;
    color: var(--text-main);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-group-row {
    display: flex;
    gap: 6px;
}

/* NÚT LỰA CHỌN TRONG CÀI ĐẶT */
.btn-setting-option {
    flex: 1;
    background: #334155;
    color: #FFFFFF;
    border: 1.5px solid #475569;
    border-radius: 8px;
    padding: 9px 4px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: all 0.15s ease;
}

/* Ở CHẾ ĐỘ SÁNG */
body.light-theme .btn-setting-option {
    background: #F1F5F9;
    color: #334155;
    border-color: #CBD5E1;
}

/* TRẠNG THÁI ACTIVE: NỔI BẬT RỰC RỠ TRÊN CẢ CHẾ ĐỘ SÁNG VÀ TỐI */
.btn-setting-option.active,
body.light-theme .btn-setting-option.active {
    background: #0284C7 !important;
    color: #FFFFFF !important;
    border-color: #0369A1 !important;
    box-shadow: 0 0 0 2.5px #38BDF8, 0 2px 8px rgba(2, 132, 199, 0.45) !important;
    font-weight: 900 !important;
}

/* KHUNG CHỮ QUÉT GỐC TRONG CÀI ĐẶT */
.raw-ocr-box {
    background: var(--card-inner);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    max-height: 160px;
    overflow-y: auto;
}

body.light-theme .raw-ocr-box {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.raw-ocr-text {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.6;
}


/* ==========================================================
   CHAT PANEL — Trò chuyện 2 chiều về thuốc
   ========================================================== */

/* Nút "Hỏi thêm" trong thanh audio */
.btn-sound-chat {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #fff !important;
    border: none !important;
}
.btn-sound-chat:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* Panel chat — hiện đè lên result-card như một drawer */
.chat-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--card-bg);
    border-top: 2px solid #6366f1;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    max-height: 80dvh;
    min-height: 300px;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.35);
    animation: slideUpChat 0.28s cubic-bezier(.4,0,.2,1);
}

@keyframes slideUpChat {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Header */
.chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: #818cf8;
}

/* Vùng tin nhắn */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

/* Màn hình chào ban đầu */
.chat-welcome {
    text-align: center;
    padding: 10px 0 6px;
    color: var(--text-muted);
}
.chat-welcome-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 6px;
}
.chat-welcome p {
    font-size: 0.9rem;
    margin: 0 0 12px;
}

/* Câu hỏi nhanh */
.chat-quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
}
.chat-quick-btn {
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 20px;
    color: #a5b4fc;
    font-size: 0.8rem;
    padding: 5px 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-quick-btn:hover, .chat-quick-btn:active {
    background: rgba(99,102,241,0.25);
}

/* Bubble tin nhắn */
.chat-bubble {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    max-width: 92%;
}
.chat-bubble.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-bubble.assistant {
    align-self: flex-start;
}

.chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.chat-bubble.user .chat-avatar {
    background: #3b82f6;
}
.chat-bubble.assistant .chat-avatar {
    background: #6366f1;
}

.chat-text {
    background: var(--card-inner);
    border-radius: 14px;
    padding: 9px 13px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-main);
    word-break: break-word;
    white-space: pre-wrap;
}
.chat-bubble.user .chat-text {
    background: #2563eb;
    color: #fff;
    border-radius: 14px 2px 14px 14px;
}
.chat-bubble.assistant .chat-text {
    border-radius: 2px 14px 14px 14px;
}

/* Con trỏ nhấp nháy khi đang stream */
.chat-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--text-main);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.7s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Typing indicator (3 chấm nhảy) */
.chat-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 10px 14px;
}
.chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6366f1;
    animation: typingBounce 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40%            { transform: translateY(-6px); opacity: 1; }
}

/* Thanh nhập tin nhắn */
.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px 14px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    min-height: 40px;
    max-height: 100px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--card-inner);
    color: var(--text-main);
    padding: 9px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    outline: none;
    overflow-y: auto;
    line-height: 1.4;
    transition: border-color 0.2s;
}
.chat-input:focus {
    border-color: #6366f1;
}

.btn-chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, opacity 0.15s;
}
.btn-chat-send:active { transform: scale(0.9); }
.btn-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* Nút nói (micro) — to, rõ cho người lớn tuổi */
.btn-chat-voice {
    min-width: 64px;
    height: 52px;
    border-radius: 26px;
    border: none;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    flex-shrink: 0;
    transition: transform 0.15s, background 0.2s;
}
.btn-chat-voice .voice-icon { font-size: 1.4rem; }
.btn-chat-voice .voice-label { font-size: 0.75rem; font-weight: 700; }
.btn-chat-voice:active { transform: scale(0.94); }
/* Vòng sáng to/nhỏ theo giọng nói (--voice-level 0..1 do voice_input.js cập nhật):
   nói mà vòng không phồng lên = micro không thu được tiếng */
.btn-chat-voice.listening {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 0 calc(3px + var(--voice-level, 0) * 18px) rgba(239, 68, 68, 0.45);
    transition: box-shadow 0.08s linear;
}
.btn-chat-voice.processing {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    cursor: wait;
}

/* Light theme overrides */
body.light-theme .chat-panel {
    border-top-color: #6366f1;
}
body.light-theme .chat-text {
    background: #f1f5f9;
    color: #1e293b;
}
body.light-theme .chat-quick-btn {
    color: #4f46e5;
    border-color: rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.08);
}
body.light-theme .chat-cursor {
    background: #1e293b;
}

/* Desktop: chat panel không che toàn màn hình */
@media (min-width: 768px) {
    .chat-panel {
        max-width: 480px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
    }
}


/* ==========================================================
   KARAOKE TEXT HIGHLIGHTER (TÔ VÀNG CHẠY THEO GIỌNG ĐỌC)
   ========================================================== */

/* 1. KHỐI ĐANG ĐƯỢC ĐỌC (BLOCK FOCUS HIGHLIGHTING) */
.karaoke-active-block {
    border-color: #F59E0B !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45), 0 4px 20px rgba(245, 158, 11, 0.3) !important;
    transform: translateY(-1.5px);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

body.light-theme .karaoke-active-block {
    border-color: #D97706 !important;
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.38), 0 4px 18px rgba(217, 119, 6, 0.22) !important;
}

/* Huy hiệu AI khi đang đọc phần khuyến cáo mở đầu */
#result-badge.karaoke-active-block {
    border: 2px solid #F59E0B !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.5) !important;
}

/* 2. CÂU ĐANG ĐƯỢC ĐỌC (SENTENCE KARAOKE HIGHLIGHT)
   Giữ display: inline để câu dài vẫn xuống dòng tự nhiên; box-decoration-break cho nền vàng
   bọc gọn từng dòng của câu (không dùng inline-block/scale vì sẽ làm vỡ bố cục câu nhiều dòng). */
.karaoke-sentence {
    display: inline;
    border-radius: 6px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

/* Chế độ nền tối (Dark mode) - Vàng Gold nổi bật */
.karaoke-sentence.active {
    background-color: #FACC15 !important;
    color: #0F172A !important;
    padding: 2px 4px !important;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.6) !important;
    text-shadow: none !important;
}

/* Chế độ nền sáng (Light mode) - Vàng Chanh tương phản cao */
body.light-theme .karaoke-sentence.active {
    background-color: #FDE047 !important;
    color: #78350F !important;
    box-shadow: 0 0 8px rgba(253, 224, 71, 0.7) !important;
}

/* Câu đã đọc qua: mờ nhẹ để mắt tập trung vào câu đang đọc, nhưng vẫn đọc rõ */
.karaoke-sentence.past {
    opacity: 0.7;
}
