/* ==========================================================================
   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
   - MOBILE FIRST RESPONSIVE
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;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: clip !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;
    /* BASE: Mobile */
    padding-top: 0;
    padding-bottom: 40px;
}

/* ĐỒ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;
}

/* BASE: Mobile sizes for inputs to prevent iOS zoom */
input, select, textarea {
    font-size: 16px !important;
}

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

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

.brand-title {
    font-weight: 800;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
    
    /* BASE: Mobile */
    font-size: 1.1rem;
    width: 100%;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.user-nav-group {
    /* BASE: Mobile */
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
    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;
}

/* TỐI ƯU CẢM ỨNG CỰC NHẠY 1-TAP CHO TẤT CẢ NÚT TRÊN HEADER */
.btn-zalo-admin {
    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;
}

/* CHỈ ÁP DỤNG HOVER KHI DÙNG CHUỘT TRÊN MÁY TÍNH */
@media (hover: hover) and (pointer: fine) {
    .btn-zalo-admin:hover {
        background: linear-gradient(135deg, #3399FF 0%, #0066FF 100%) !important;
        transform: translateY(-1px) !important;
    }
}

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

/* ==========================================================================
   FORM NHẬP THÔNG TIN
   ========================================================================== */
.form-card {
    background: #151d30;
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    margin-bottom: 22px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    
    /* BASE: Mobile */
    padding: 14px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden;
}

.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;
    gap: 14px;
    margin-bottom: 18px;
    
    /* BASE: Mobile */
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.gender-radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
    min-height: 44px;
    background: rgb(17, 18, 34);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 16px;
    box-sizing: border-box;
}

.gender-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.95rem;
    user-select: none;
}

.gender-radio-label input[type="radio"] {
    accent-color: #d97706;
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

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

.form-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    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;
}

/* Fix đặc thù cho input datetime-local trên iOS Safari / Mobile chống tràn viền */
input[type="datetime-local"].form-control,
input[type="datetime-local"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
}

input[type="datetime-local"]::-webkit-date-and-time-value {
    text-align: left;
    min-height: 1.25em;
    margin: 0;
    padding: 0;
}

input[type="datetime-local"]::-webkit-datetime-edit {
    display: inline-flex;
    padding: 0;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.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;
    
    /* BASE: Mobile */
    flex-direction: column;
}

.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;
    
    /* BASE: Mobile */
    padding: 11px;
    width: 100%;
    justify-content: center;
}

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

/* ==========================================================================
   DIGIT SELECTOR
   ========================================================================== */
.digit-section {
    background: #881b1b;
    border: 1px solid #b91c1c;
    border-radius: 12px;
    margin-bottom: 18px;
    text-align: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
    
    /* BASE: Mobile */
    padding: 16px 10px 14px 10px;
}

.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;
    
    /* BASE: Mobile */
    flex-direction: column;
    gap: 6px;
    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;
    align-items: center;
    margin-bottom: 10px;
    box-sizing: border-box;
    
    /* BASE: Mobile */
    gap: 2px;
    justify-content: center;
    width: 100%;
    padding: 0;
}

.digit-box {
    flex: 1 1 0%;
    min-width: 0;
    background: #ffffff !important;
    border: 1px solid #d97706 !important;
    color: #991b1b !important;
    font-weight: 900;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
    font-family: monospace, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* BASE: Mobile */
    max-width: 36px;
    height: 40px;
    font-size: 1rem;
    border-radius: 6px;
    padding: 0;
}

.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%;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    font-weight: 900;
    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;
    
    /* BASE: Mobile */
    font-size: 0.95rem;
    padding: 13px;
}

/* ==========================================================================
   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;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: grid;
    
    /* BASE: Mobile */
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
}

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

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

.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;
    gap: 8px;
    
    /* BASE: Mobile */
    flex-direction: row;
    width: 100%;
}

.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;
    
    /* BASE: Mobile */
    flex: 1;
}

.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
   ========================================================================== */
.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;
    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;
    -webkit-overflow-scrolling: touch;
    
    /* BASE: Mobile */
    padding: 48px 12px 14px 12px !important;
    max-width: 95% !important;
    margin: auto !important;
}

button.modal-close, .modal-close {
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    width: 38px !important;
    height: 38px !important;
    line-height: 1 !important;
    text-align: center !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    z-index: 100100 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !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.1) !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.8) !important;
    cursor: pointer !important;
}

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

/* ==========================================================================
   HEXAGRAM VIEWS
   ========================================================================== */
.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;
}

.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-watermark-note {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    font-size: 14px;
    color: #475569;
    font-style: italic;
    border-top: 1px dashed rgba(0, 0, 0, 0.25);
}

.hex-card-view .hex-watermark-note strong {
    color: #b91c1c;
    font-style: normal;
    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 {
    background: #ffffff;
    border: 1.5px solid #c0392b;
    border-radius: 10px;
    box-sizing: border-box;
    margin-top: 15px;
    
    /* BASE: Mobile */
    padding: 12px 14px;
}

.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;
    word-break: break-word;
    
    /* BASE: Mobile */
    font-size: 0.88rem;
}

/* 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;
}

/* 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(2, 1fr);
    gap: 18px;
    margin-top: 20px;
}

@media (max-width: 640px) {
    .seo-faq-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.seo-faq-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

.seo-faq-card:hover {
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 14px rgba(217, 119, 6, 0.2);
}

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

.main-site-footer {
    margin-top: 36px;
    padding: 24px 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.85rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.main-site-footer p {
    margin: 4px 0;
}

.main-site-footer strong {
    color: #e2e8f0;
    font-weight: 700;
}

.main-site-footer a {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
}

.main-site-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   TABLET & DESKTOP BREAKPOINTS (MOBILE FIRST)
   ========================================================================== */
@media (min-width: 641px) {
    body { padding-top: 0 !important; }
    .container { padding: 18px 20px 0; }
    
    input, select, textarea {
        font-size: unset !important;
    }
    
    .top-user-bar {
        flex-direction: row;
        align-items: center;
        padding: 10px 18px;
        justify-content: space-between;
    }
    .brand-title {
        font-size: 1.15rem;
        width: auto;
        border-bottom: none;
        padding-bottom: 0;
    }
    .user-nav-group {
        width: auto;
        flex-wrap: nowrap;
    }
    .user-nav-group > * {
        flex: 0 1 auto;
        min-height: 38px !important;
        padding: 7px 14px !important;
    }

    .form-card { padding: 20px; }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .current-sim-input-wrapper {
        flex-direction: row;
    }
    
    .btn-eval-current {
        padding: 10px 18px;
        width: auto;
    }
    
    .digit-section {
        padding: 20px 16px 16px 16px;
    }
    
    .prefix-selector-group {
        flex-direction: row;
        gap: 8px;
    }
    
    .digit-boxes-container {
        gap: 4px;
    }
    
    .digit-box {
        max-width: 42px;
        height: 46px;
        font-size: 1.2rem;
        border-radius: 8px;
    }
    
    .btn-submit {
        padding: 14px;
        font-size: 1.05rem;
    }

    .sim-card {
        grid-template-columns: 1fr auto;
        padding: 16px 18px;
        gap: 14px;
    }
    
    .sim-number-display {
        font-size: 1.5rem;
    }
    
    .sim-actions {
        flex-direction: column;
        width: auto;
    }
    
    .btn-action {
        flex: 0 1 auto;
    }
    
    .eval-box {
        padding: 14px 18px;
    }
    
    .eval-box li {
        font-size: 0.95rem;
    }

    .modal-content {
        max-width: 560px !important;
        padding: 50px 20px 22px 20px !important;
    }
}

@media (min-width: 769px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =======================================================
   PORTAL MULTI-TAB NAVIGATION & MOBILE OFF-CANVAS DRAWER
   Tích hợp đồng nhất 4 môn: Lục Hào - Tử Vi - HKPT - Sim Phong Thủy
   - PC: 4 Tab căn giữa sang trọng, nền gradient huyền học, viền vàng kim, không thuần đen
   - Mobile: Nút Hamburger mở Drawer danh mục 4 môn mượt mà
   ======================================================= */
.portal-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
    background: linear-gradient(180deg, #18223c 0%, #0d1527 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.28);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
}

/* --- Desktop Navigation (>= 769px) --- */
.portal-desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.portal-tabs-track {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(10, 16, 30, 0.65);
    padding: 5px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.portal-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none !important;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}

.portal-tab-btn:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.22) 0%, rgba(180, 83, 9, 0.12) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.2);
}

.portal-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border: 1px solid #ef4444;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font-weight: 700;
}

.portal-tab-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.portal-tab-text {
    letter-spacing: 0.2px;
}

/* --- Mobile Bar (< 769px) --- */
.portal-mobile-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.portal-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    color: #f8fafc;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: 0.3px;
    min-height: 38px;
}

.mobile-brand-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.mobile-brand-title {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 60%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: 0.4px;
    font-size: 1.02rem;
}

.portal-hamburger-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4.5px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.portal-hamburger-btn:active {
    background: rgba(255, 255, 255, 0.16);
    transform: scale(0.95);
}

.hamburger-bar {
    display: block;
    width: 19px;
    height: 2px;
    background: #f8fafc;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.portal-hamburger-btn.open .hamburger-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.portal-hamburger-btn.open .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.portal-hamburger-btn.open .hamburger-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Mobile Drawer Backdrop --- */
.portal-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.portal-drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
}

/* --- Mobile Slide-in Drawer --- */
.portal-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    background: linear-gradient(180deg, #141c2f 0%, #0c1220 100%);
    border-left: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: -8px 0 35px rgba(0, 0, 0, 0.75);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.portal-drawer.open {
    transform: translateX(0);
}

.portal-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 28, 48, 0.95);
}

.drawer-header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.drawer-header-icon {
    font-size: 1.25rem;
}

.drawer-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.drawer-close-btn:hover,
.drawer-close-btn:active {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

.portal-drawer-body {
    padding: 16px 14px;
    flex: 1;
}

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

.drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #e2e8f0;
}

.drawer-item:hover,
.drawer-item:active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateX(2px);
}

.drawer-item.active {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.35) 0%, rgba(153, 27, 27, 0.18) 100%);
    border: 1.5px solid #ef4444;
    box-shadow: 0 4px 14px rgba(185, 28, 28, 0.35);
}

.drawer-item-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

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

.drawer-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}

.drawer-item.active .drawer-item-title {
    color: #ffffff;
}

.drawer-item-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.3;
}

.drawer-item-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

.drawer-item-arrow {
    color: #64748b;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.portal-drawer-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 28, 48, 0.95);
}

.drawer-contact-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-contact-card a {
    color: #fbbf24;
    font-size: 0.92rem;
    text-decoration: none !important;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 768px) {
    .portal-desktop-nav {
        display: none !important;
    }
    .portal-mobile-bar {
        display: flex !important;
    }
    .portal-nav {
        padding: 7px 12px;
    }
}

@media (min-width: 769px) {
    .portal-desktop-nav {
        display: flex !important;
    }
    .portal-mobile-bar {
        display: none !important;
    }
    .portal-drawer,
    .portal-drawer-backdrop {
        display: none !important;
    }
}
