/* ==========================================================================
   SIM PHONG THỦY LỤC HÀO - EXACT DEVTOOLS CSS MATCH FROM ORIGINAL WEBSITE
   - Nút Đóng X Trên Tất Cả Modal Z-Index 100100 Hoạt Động 100% 1-Tap
   - Chống 100% Thanh Cuộn Ngang (Horizontal Scrollbar) Khi Rê Chuột Vào Popup
   - Đồng Bộ Font Chữ Inter Toàn Bộ Web Không Lỗi Font
   ========================================================================== */

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

:root {
    --bg-dark: #0c1222;
    --bg-card: #151d30;
    --bg-card-hover: #1a2438;
    --primary-red: #881b1b;
    --gold-primary: #f3c669;
    --gold-glow: #ffd700;
    --gold-dark: #d97706;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #232f48;
    --border-gold: rgba(243, 198, 105, 0.4);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

body {
    background-color: #0c1222;
    color: var(--text-light);
    line-height: 1.5;
    min-height: 100vh;
    padding-top: 15px;
    padding-bottom: 60px;
}

/* ĐỒNG BỘ FONT INTER CHO TẤT CẢ NÚT BẤM, INPUT & THẺ CHỮ */
button, input, select, textarea, label, table, th, td {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Main Container */
.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   TOP USER NAVIGATION BAR
   ========================================================================== */
.top-user-bar {
    background: #151d30;
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 10px 18px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    gap: 12px;
    flex-wrap: wrap;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.user-nav-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* TỐI ƯU CẢM ỨNG CỰC NHẠY 1-TAP CHO TẤT CẢ NÚT TRÊN HEADER */
.btn-auth-trigger,
.coin-badge,
.btn-earn-coins,
.ref-badge,
.btn-zalo-admin,
.admin-link-btn,
.btn-logout {
    min-height: 38px !important;
    padding: 7px 14px !important;
    border-radius: 8px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
}

.btn-zalo-admin {
    background: linear-gradient(135deg, #0088FF 0%, #0055FF 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(0, 136, 255, 0.4) !important;
    transition: all 0.2s ease !important;
}

.btn-zalo-admin:hover {
    background: linear-gradient(135deg, #3399FF 0%, #0066FF 100%) !important;
    transform: translateY(-1px) !important;
}

.btn-auth-trigger {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.coin-badge {
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid #ffd700;
    color: #ffd700;
    font-weight: 800 !important;
    border-radius: 20px !important;
}

.btn-earn-coins {
    background: #059669;
    color: #ffffff;
    border: none;
}

.ref-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(243, 198, 105, 0.3);
    color: #cbd5e1;
}

.admin-link-btn {
    background: rgba(217, 119, 6, 0.2);
    border: 1px solid var(--gold-dark);
    color: var(--gold-primary);
    text-decoration: none;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

/* CHỈ ÁP DỤNG HOVER KHI DÙNG CHUỘT TRÊN MÁY TÍNH */
@media (hover: hover) and (pointer: fine) {
    .btn-auth-trigger:hover { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
    .coin-badge:hover { background: rgba(217, 119, 6, 0.3); }
    .btn-earn-coins:hover { background: #10b981; }
    .ref-badge:hover { background: rgba(243, 198, 105, 0.15); color: #ffffff; }
    .admin-link-btn:hover { background: var(--gold-dark); color: #ffffff; }
    .btn-logout:hover { background: #ef4444; color: #ffffff; }
}

/* PHẢN HỒI CHẠM NHẠY TỨC THÌ TRÊN ĐIỆN THOẠI */
.btn-auth-trigger:active,
.coin-badge:active,
.btn-earn-coins:active,
.ref-badge:active,
.admin-link-btn:active,
.btn-logout:active,
.btn-action:active,
.btn-submit:active {
    transform: scale(0.95) !important;
    opacity: 0.85 !important;
}

/* ==========================================================================
   FORM NHẬP THÔNG TIN (DEVTOOLS ACCURATE MATCH)
   ========================================================================== */
.form-card {
    background: #151d30;
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: #F3C669;
    margin: 0px 0px 18px 0px;
    padding: 0px 0px 8px 0px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--gold-dark);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgb(17, 18, 34);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.95rem;
    border-radius: 8px;
    outline: none;
    transition: 0.3s;
}

.form-control:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

/* ĐÁNH GIÁ SIM ĐANG DÙNG */
.current-sim-group {
    background: rgba(9, 13, 22, 0.5);
    border: 1px dashed var(--gold-dark);
    padding: 14px;
    border-radius: 10px;
}

.current-sim-group label {
    color: #F3C669 !important;
    font-size: 0.9rem !important;
}

.current-sim-input-wrapper {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.btn-eval-current {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    touch-action: manipulation;
}

.btn-eval-current:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* ==========================================================================
   DIGIT SELECTOR (KHUNG ĐỎ ĐÔ ĐẶC TRƯNG VỚI 10 Ô VUÔNG NỀN TRẮNG CHỮ ĐỎ)
   ========================================================================== */
.digit-section {
    background: #881b1b;
    border: 1px solid #b91c1c;
    border-radius: 12px;
    padding: 20px 16px 16px 16px;
    margin-bottom: 18px;
    text-align: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.digit-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 0.3px;
}

.prefix-selector-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.prefix-selector-group label {
    font-size: 0.88rem;
    color: #ffd700;
    font-weight: 700;
}

.prefix-select {
    padding: 5px 10px;
    background: rgb(17, 18, 34);
    border: 1px solid var(--gold-dark);
    color: #ffffff;
    border-radius: 6px;
    outline: none;
    font-weight: 700;
    font-size: 0.88rem;
}

.digit-boxes-container {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
    width: 100%;
}

.digit-box {
    width: 42px;
    height: 46px;
    background: #ffffff !important;
    border: 1px solid #d97706 !important;
    color: #991b1b !important;
    font-size: 1.3rem;
    font-weight: 900;
    text-align: center;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    font-family: monospace, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.digit-box:focus {
    border-color: #ffd700 !important;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.digit-box.fixed-zero {
    background: #ffffff !important;
    color: #991b1b !important;
    border-color: #d97706 !important;
}

.digit-help-text {
    font-size: 0.82rem;
    color: #f1f5f9;
    line-height: 1.4;
    max-width: 680px;
    margin: 0 auto;
}

/* NÚT SUBMIT CHÍNH AMBER ORANGE */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 1.05rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    touch-action: manipulation;
}

/* ==========================================================================
   DANH SÁCH SIM KẾT QUẢ & THẺ SIM
   ========================================================================== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

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

.sim-card {
    background: #151d30;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.sim-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-1px);
}

.sim-number-display {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.sim-number-display .highlight {
    color: #ffd700;
}

.sim-badge-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
}

.badge-score {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid #16a34a;
}

.badge-hex {
    background: rgba(217, 119, 6, 0.2);
    color: #f3c669;
    border: 1px solid var(--gold-dark);
}

.sim-reasons-list {
    list-style: none;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.sim-reasons-list li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 3px;
    line-height: 1.4;
}

.sim-reasons-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: #f3c669;
}

.sim-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-action {
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    touch-action: manipulation;
}

.btn-view-hex {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
}

.btn-copy-info {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   MODALS POPUP (CHỐNG 100% LỖI THANH CUỘN NGANG KHI TRỎ CHUỘT VÀO POPUP)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    z-index: 99999 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 12px;
    overflow-x: hidden !important;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #151d30;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 50px 20px 22px 20px !important;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden !important; /* CHỐNG THANH CUỘN NGANG KHI TRỎ CHUỘT */
    -webkit-overflow-scrolling: touch;
    margin: auto;
}

.auth-modal-box {
    padding-top: 56px !important;
}

/* KHUNG POPUP DONATE PHÓNG TO RÕ ĐẸP VỪA MÀN HÌNH */
.compact-donate-modal {
    padding: 44px 18px 16px 18px !important;
    max-width: 560px !important;
    max-height: 94vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* KHUNG MÃ GIỚI THIỆU PHÓNG TO RÕ ĐẸP */
.compact-ref-modal {
    padding: 44px 18px 16px 18px !important;
    max-width: 540px !important;
    max-height: 94vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* NÚT TẢI MÃ QR DONATE TO ĐẸP MỌI MÀN HÌNH */
.btn-download-qr-large {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 12px !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4) !important;
    transition: all 0.2s ease !important;
    margin-top: 10px !important;
    margin-bottom: 8px !important;
    touch-action: manipulation !important;
}

.btn-download-qr-large:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.5) !important;
}

/* NÚT X ĐÓNG POPUP SIÊU NHẠY THIẾT KẾ DẠNG BUTTON NATIVE (42px x 42px) */
button.modal-close, .modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 18px !important; /* Dịch vào 18px để KHÔNG BỊ THANH CUỘN SCROLLBAR CHE KHI TRỎ CHUỘT */
    width: 42px !important;
    height: 42px !important;
    line-height: 40px !important;
    text-align: center !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    font-size: 1.6rem !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    z-index: 100100 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    pointer-events: auto !important;
    user-select: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6) !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
    padding: 0 !important;
}

button.modal-close:hover, .modal-close:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #f87171 !important;
    transform: scale(1.15) rotate(90deg) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.9) !important;
    cursor: pointer !important;
}

button.modal-close:active, .modal-close:active {
    transform: scale(0.95) !important;
}

/* AUTH MODAL TABS */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    margin-top: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.auth-tab-btn {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.auth-tab-btn.active {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    border-color: #ffd700;
}

/* DONATE TIER GRID */
.donate-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.donate-card {
    background: rgb(17, 18, 34);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.donate-card.active {
    border-color: #ffd700;
    background: rgba(217, 119, 6, 0.15);
}

.donate-badge {
    background: #059669;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 2px;
}

.donate-price {
    font-weight: 800;
    font-size: 0.85rem;
    color: #ffffff;
}

.donate-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.qr-display-box {
    background: rgb(17, 18, 34);
    border: 1px dashed var(--gold-dark);
    border-radius: 10px;
    padding: 6px 8px;
    text-align: center;
    margin-top: 2px;
}

/* Phóng to Mã QR vừa vặn 210px rõ đẹp */
.qr-code-img {
    max-height: 210px;
    max-width: 220px;
    width: auto;
    height: auto;
    border-radius: 8px;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
    margin: 0 auto;
    display: block;
}

/* NÚT TẢI QR MẶC ĐỊNH ẨN TRÊN MÁY TÍNH */
.mobile-only-qr-btn {
    display: none !important;
}

.ref-code-display-card {
    background: rgb(17, 18, 34);
    border: 1px solid var(--gold-dark);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    margin-bottom: 12px;
}

.ref-code-big {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 2px;
    margin: 2px 0;
}

.ref-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.ref-stat-card {
    background: rgb(17, 18, 34);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
}

.stat-num {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.ref-milestone-box {
    background: rgba(217, 119, 6, 0.08);
    border: 1px dashed var(--gold-dark);
    border-radius: 8px;
    padding: 10px 12px;
    overflow-x: hidden !important;
}

.hex-card-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}

.hex-native-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.btn-mobile-share-ios {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: #059669;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 11px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.4);
    transition: all 0.2s ease;
    text-align: center;
    touch-action: manipulation;
}

/* Layout Lá quẻ */
.hex-card-view {
    background-color: #fefee5;
    color: #000000;
    font-size: 15px;
    min-width: 860px;
    padding: 25px 32px;
    box-sizing: border-box;
}

.hex-card-view .info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #888;
    padding-bottom: 10px;
    margin-bottom: 15px;
    padding-left: 5px;
}

.hex-card-view .info-line {
    margin-bottom: 6px;
    line-height: 1.6;
    color: #000000;
    font-size: 15px;
}

.hex-card-view .info-line strong {
    color: #000000;
}

.hex-card-view .highlight {
    color: #e60000;
    font-weight: 700;
}

.hex-card-view .hex-visual-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    padding: 15px 0;
    border-bottom: 2px solid #888;
    margin-bottom: 15px;
}

.hex-card-view .hex-box {
    text-align: center;
    min-width: 180px;
}

.hex-card-view .hex-title {
    font-size: 18px;
    font-weight: 700;
    color: #c41e3a;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.hex-card-view .hex-family {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin-top: 10px;
    text-transform: uppercase;
}

.hex-card-view .gua-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 110px;
    margin: 0 auto;
}

.hex-card-view .gua-line {
    height: 16px;
    width: 100%;
}

.hex-card-view .yang {
    background-color: #1a1a1a;
}

.hex-card-view .yin {
    display: flex;
    justify-content: space-between;
}

.hex-card-view .yin::before,
.hex-card-view .yin::after {
    content: '';
    display: block;
    width: 42%;
    background-color: #1a1a1a;
    height: 100%;
}

.hex-card-view .yang.moving {
    background-color: #e60000;
}

.hex-card-view .yin.moving::before,
.hex-card-view .yin.moving::after {
    background-color: #e60000;
}

.hex-card-view table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: #fefee5;
    margin-bottom: 15px;
    table-layout: auto;
}

.hex-card-view th,
.hex-card-view td {
    border: none;
    border-bottom: 1px solid #d0c8b8;
    padding: 8px 4px;
    text-align: center;
    white-space: nowrap;
    color: #000000;
}

.hex-card-view th {
    background: #e2e2cc;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 13.5px;
    padding: 9px 3px;
    border-bottom: 1px solid #bbb;
    text-transform: uppercase;
}

.hex-card-view .sep-col {
    border-left: 1px solid rgba(0, 0, 0, 0.25);
}

.hex-card-view .row-moving td {
    color: #e60000;
    font-weight: 700;
}

.hex-card-view .marker-the,
.hex-card-view .marker-ung {
    color: #1a1a1a;
    font-weight: 700;
}

.hex-card-view .row-moving .marker-the,
.hex-card-view .row-moving .marker-ung {
    color: #e60000;
}

.hex-card-view .phuc-than {
    color: #1a1a1a;
}

.hex-card-view .row-moving .phuc-than {
    color: #e60000;
    font-weight: 700;
}

.eval-box {
    margin-top: 15px;
    background: #ffffff;
    border: 1.5px solid #c0392b;
    border-radius: 10px;
    padding: 14px 18px;
    box-sizing: border-box;
}

.eval-box h4 {
    color: #c0392b;
    margin-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 700;
}

.eval-box ul {
    padding-left: 18px;
    color: #2d3748;
}

.eval-box li {
    margin-bottom: 4px;
    line-height: 1.55;
    font-size: 0.95rem;
    word-break: break-word;
}

/* TOAST NOTIFICATION */
.toast-notification {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #ffd700;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    z-index: 100000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    text-align: center;
    max-width: 90vw;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================================================
   MOBILE FIRST RESPONSIVE BREAKPOINTS (TỐI ƯU CỰC NHẠY 1-TAP CÁC NÚT TRÊN HEADER)
   ========================================================================== */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body { padding-top: 10px; padding-bottom: 40px; }
    .container { padding: 0 10px; }

    /* HIỂN THỊ NÚT TẢI QR TRÊN DI ĐỘNG */
    .mobile-only-qr-btn {
        display: block !important;
    }

    .top-user-bar {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .brand-title {
        font-size: 1.1rem;
        width: 100%;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
        padding-bottom: 6px;
    }

    /* BỐ CỤC NÚT HEADER TRÊN DI ĐỘNG: RỘNG RÃI, BẤM 1 PHÁT ĂN NGAY */
    .user-nav-group {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        justify-content: flex-start;
    }

    .user-nav-group > * {
        flex: 1 1 auto;
        min-height: 40px !important;
        font-size: 0.88rem !important;
        padding: 8px 12px !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .form-card { padding: 14px; }

    .digit-section {
        padding: 16px 10px 14px 10px;
    }

    .digit-boxes-container {
        gap: 3px;
        justify-content: space-between;
        width: 100%;
        padding: 2px 0;
    }

    .digit-box {
        width: calc((100% - 27px) / 10);
        max-width: 36px;
        height: 42px;
        font-size: 1.1rem;
        border-radius: 6px;
        padding: 0;
    }

    .prefix-selector-group {
        flex-direction: column;
        gap: 6px;
    }

    .current-sim-input-wrapper {
        flex-direction: column;
    }

    .btn-eval-current {
        padding: 11px;
        width: 100%;
        justify-content: center;
        font-size: 0.9rem;
    }

    .btn-submit {
        font-size: 0.95rem;
        padding: 13px;
    }

    .sim-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .sim-number-display {
        font-size: 1.35rem;
    }

    .sim-actions {
        flex-direction: row;
        width: 100%;
    }

    .btn-action {
        flex: 1;
    }

    .eval-box {
        padding: 12px 14px;
    }

    .eval-box li {
        font-size: 0.88rem;
    }

    .modal-content {
        padding: 48px 12px 14px 12px !important;
        max-width: 95% !important;
        margin: auto !important;
    }

    /* GIỮ 3 GÓI DONATE NẰM NGANG TRÊN 1 HÀNG TRÊN DI ĐỘNG KHÔNG BỊ XẾP CHỒNG CAO */
    .donate-tier-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
        margin-bottom: 4px !important;
    }

    .donate-card {
        padding: 4px 2px !important;
    }

    .donate-badge {
        font-size: 0.65rem !important;
        padding: 1px 4px !important;
    }

    .donate-price {
        font-size: 0.78rem !important;
    }

    .donate-desc {
        font-size: 0.62rem !important;
    }

    .qr-display-box {
        padding: 4px !important;
        margin-top: 2px !important;
    }

    .qr-code-img {
        max-height: 155px !important;
        max-width: 165px !important;
    }

    .compact-donate-modal {
        padding: 38px 10px 10px 10px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    .ref-single-line-title {
        font-size: 0.9rem;
        white-space: normal;
    }
}

/* SEO KNOWLEDGE & FAQ SECTION FOR GEO / AI OVERVIEWS */
.seo-knowledge-section {
    margin-top: 40px;
    padding: 30px 24px;
    background: #151d30;
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    color: #cbd5e1;
}

.seo-knowledge-section h2 {
    color: var(--gold-glow);
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 16px;
    text-align: center;
}

.seo-knowledge-section h3 {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 8px;
    border-left: 3px solid var(--gold-dark);
    padding-left: 10px;
}

.seo-knowledge-section p, .seo-knowledge-section li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 8px;
}

.seo-faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.seo-faq-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px;
}

.seo-faq-card h4 {
    color: var(--gold-primary);
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.main-site-footer {
    margin-top: 40px;
    padding: 24px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: #64748b;
    font-size: 0.85rem;
}

.main-site-footer a {
    color: var(--gold-primary);
    text-decoration: none;
}
