*, *::before, *::after {
            box-sizing: border-box;
        }
        body {
            /* Thay thế dòng font-family cũ bằng dòng này */
            font-family: "PingFang SC", "Work Sans", "Microsoft YaHei", "Heiti SC", "Malgun Gothic", sans-serif;
            line-height: 2; /* Giữ nguyên */
            padding: 20px; /* Giữ nguyên */
            background-color: #f4f7f6; /* Giữ nguyên[cite: 1] */
            color: #2c3e50; /* Giữ nguyên[cite: 1] */
            max-width: 950px; /* Giữ nguyên[cite: 1] */
            margin: 0 auto; /* Giữ nguyên[cite: 1] */
        }

        /* MENU LỚN - CẤP 1 (CHỌN BÀI 1 / BÀI 2) */
        /* MENU LỚN - CẤP 1 (SẮP XẾP TỪ TRÁI SANG PHẢI, TỪ TRÊN XUỐNG DƯỚI) */
        .main-menu {
            display: grid;
            grid-template-columns: repeat(8, 1fr); /* Ép cố định đúng 8 cột trên một dòng */
            grid-auto-flow: row; /* Chữ chạy từ trái sang phải, hết 8 cột tự động xuống dòng 2 */
            gap: 6px; /* Khoảng cách vừa phải giữa các nút */
            margin-bottom: 25px;
            background-color: #2c3e50;
            border-radius: 8px;
            padding: 8px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        }
        
        .main-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 10px 4px; /* Thu gọn padding để nút cân đối */
            cursor: pointer;
            font-weight: bold;
            font-size: 11px; /* Cỡ chữ nhỏ gọn giúp tối ưu không gian */
            color: #bdc3c7;
            border-radius: 4px;
            line-height: 1.3;
            transition: all 0.3s ease;
            white-space: normal; /* Tên bài quá dài sẽ tự ngắt dòng bên trong nút chứ không tràn ra ngoài */
        }
        
        .main-btn:hover {
            background-color: #34495e;
            color: #fff;
        }
        
        .main-btn.active {
            background-color: #1abc9c;
            color: white;
        }

        /* ĐIỆN THOẠI: BIẾN THÀNH THANH CUỘN NGANG ĐỂ TRÁNH NÁT CHỮ */
        @media (max-width: 900px) {
            .main-menu {
                display: flex;
                flex-wrap: nowrap;
                overflow-x: auto; /* Vuốt ngang mượt mà trên smartphone */
                padding: 10px;
            }
            .main-btn {
                flex: 0 0 auto;
                font-size: 13px;
                padding: 10px 16px;
            }
        }

        /* KHUNG CHỨA BÀI HỌC CHÍNH */
        .main-content {
            display: none;
        }
        .main-content.active {
            display: block;
        }

        /* MENU NHỎ - CẤP 2 (TAB ĐOẠN TRONG TỪNG BÀI) */
        .sub-menu {
            display: table;
            width: 100%;
            margin-bottom: 20px;
            background-color: #fff;
            border-radius: 6px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
            overflow: hidden;
            border: 1px solid #e2e8f0;
        }
        .sub-btn {
            display: table-cell;
            text-align: center;
            padding: 12px 10px;
            cursor: pointer;
            font-weight: bold;
            font-size: 15px;
            color: #7f8c8d;
            border-bottom: 3px solid transparent;
            transition: all 0.3s ease;
        }
        .sub-btn:hover {
            background-color: #f8fafc;
            color: #2c3e50;
        }
        /* Màu active cho Tab của Bài 1 (Xanh Dương) */
        #bai1 .sub-btn.active {
            color: #2980b9;
            border-bottom-color: #2980b9;
            background-color: #f0f7fc;
        }
        /* Màu active cho Tab của Bài 2 (Cam Sẫm) */
        #bai2 .sub-btn.active {
            color: #d35400;
            border-bottom-color: #d35400;
            background-color: #fdf5ef;
        }

        /* KHUNG ĐOẠN NHỎ (TAB NỘI DUNG) */
        .sub-content {
            display: none;
        }
        .sub-content.active {
            display: block;
        }

        /* KHU VỰC TIÊU ĐỀ VÀ NÚT BẤM */
        h2 {
            font-size: 18px;
            margin-top: 20px;
            padding-bottom: 8px;
        }
        #bai1 h2 { color: #2980b9; border-bottom: 2px solid #2980b9; }
        #bai2 h2 { color: #d35400; border-bottom: 2px solid #d35400; }

        .btn-container {
            margin-bottom: 15px;
        }
        .toggle-btn {
            color: white;
            border: none;
            padding: 10px 20px;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            border-radius: 20px;
            box-shadow: 0 3px 6px rgba(197, 5, 5, 0.1);
            background-color: #d35400;
            transition: transform 0.2s;
        }
        .toggle-btn:hover {
            transform: translateY(-1px);
        }
        #bai1 .toggle-btn { background-color: #2980b9; }
        #bai2 .toggle-btn { background-color: #d35400; }
        #bai3 .toggle-btn { background-color: #27ae60; }
        #bai4 .toggle-btn { background-color: #8e44ad; }
        #bai5 .toggle-btn { background-color: #e74c3c; }
        #bai6 .toggle-btn { background-color: #f39c12; }
        #bai7 .toggle-btn { background-color: #16a085; }

        /* KHUNG HIỂN THỊ CHỮ HÁN & RUBY PINYIN */
        .chinese-text {
            font-size: 22px;
            background: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            margin-bottom: 25px;
            letter-spacing: 1px;
            text-align: justify;
            
            /* THÊM 2 DÒNG NÀY VÀO LÀ CÂN MỌI LOẠI THẺ RUBY KHÔNG LO BỊ TRÀN DÒNG */
            display: inline-block;
            word-break: break-all; 
        }
        .indent { display: inline-block; width: 2em; }
        .block { display: block; margin-bottom: 15px; }
        .align-right { text-align: right; display: block; margin-top: 15px; }

        ruby { ruby-position: over; }
        rt {
            font-size: 13px;
            color: #3498db; /* Đổi thành màu xanh lam (Blue) */
            padding-bottom: 3px;
            user-select: none; /* */
        }
        /* Lớp ẩn Pinyin mà không làm lệch hoặc nhảy dòng chữ Hán */
        .hide-pinyin rt { visibility: hidden; }

        /* KHUNG BẢN DỊCH TIẾNG VIỆT */
        .translation-container {
            background-color: #eef2f5;
            padding: 25px;
            border-radius: 0 12px 12px 0;
            font-size: 16px;
            line-height: 1.6;
        }
        #bai1 .translation-container { border-left: 5px solid #2980b9; }
        #bai2 .translation-container { border-left: 5px solid #d35400; }
        #bai3 .translation-container { border-left: 5px solid #27ae60; }
        #bai4 .translation-container { border-left: 5px solid #8e44ad; }
        #bai5 .translation-container { border-left: 5px solid #e74c3c; }
        #bai6 .translation-container { border-left: 5px solid #f39c12; }
        #bai7 .translation-container { border-left: 5px solid #16a085; }
        .translation-line { margin-bottom: 12px; text-align: justify; }

        /* NÚT FLOAT ĐỂ ẨN HIỆN PINYIN CỐ ĐỊNH GÓC PHẢI */
        .float-pinyin-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            z-index: 9999;
            background-color: #e67e22; /* Màu cam nổi bật dễ thấy */
            color: white;
            border: none;
            padding: 15px 25px;
            font-size: 15px;
            font-weight: bold;
            border-radius: 50px; /* Bo tròn viền dạng viên thuốc */
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Tạo hiệu ứng đổ bóng nổi lên */
            transition: all 0.3s ease;
        }
        .float-pinyin-btn:hover {
            background-color: #d35400;
            transform: scale(1.05); /* Phóng to nhẹ khi rê chuột vào */
        }
        /* Giao diện mượt mà trên điện thoại */
        @media (max-width: 600px) {
            .float-pinyin-btn {
                bottom: 20px;
                right: 20px;
                padding: 12px 18px;
                font-size: 13px;
            }
        }

    .vocab-section {
            margin-top: 20px;
            width: 100%;
        }
        .vocab-table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            margin-bottom: 30px;
        }
        .vocab-table th {
            background-color: #2980b9; /* Đồng bộ màu xanh dương bài 1 */
            color: white;
            text-align: left;
            padding: 12px 15px;
            font-size: 15px;
        }
        .vocab-table td {
            padding: 14px 15px;
            border-bottom: 1px solid #e2e8f0;
            font-size: 16px;
            vertical-align: middle; /* Đổi sang căn giữa dọc để cân đối với chữ Hán to */
        }
        .vocab-table tr:hover {
            background-color: #f8fafc;
        }
        
        /* CHỮ HÁN SIÊU TO (TĂNG THÊM 50%) */
        .vocab-hz {
            font-size: 26px !important; /* Tăng từ 26px lên 39px */
            font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
            font-weight: bold;
            color: #2c3e50;
            line-height: 1.2;
        }
        
        .vocab-py {
            color: #3498db;
            font-weight: 500;
            font-size: 16px;
        }
        .vocab-type {
            color: #7f8c8d;
            font-style: italic;
            font-size: 14px;
        }
        .vocab-mean {
            color: #2c3e50;
            line-height: 1.6;
        }
        .vocab-example {
            display: block;
            font-size: 14px;
            color: #7f8c8d;
            margin-top: 6px;
            line-height: 1.6;
            font-family: "PingFang SC", sans-serif;
        }
        
        /* Responsive mượt mà trên Mobile (TĂNG THÊM 50%) */
        @media (max-width: 768px) {
            .vocab-table th, .vocab-table td {
                padding: 10px 8px;
                font-size: 14px;
            }
            .vocab-hz { 
                font-size: 22px !important; /* Tăng từ 22px lên 33px trên điện thoại */
            }
        }