/* 全局样式 - 黑灰色调 */
* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    padding-top: 70px; /* 为顶部广告预留空间，与广告栏高度一致 */
}

/* ========================================= */
/* 顶部广告横幅 */
/* ========================================= */
.topbar-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 999;
    display: flex;
    justify-content: center;  /* 居中对齐 */
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    gap: 15px;  /* 广告之间的间距 */
}

.topbar-link {
    display: block;
    height: 60px;
    transition: all 0.3s ease;
}

.topbar-link img {
    height: 100%;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.topbar-link:hover {
    transform: scale(1.05);
}

.topbar-link:hover img {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.body {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    margin: 0 auto 20px auto;
    max-width: 1400px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* 广告下方导航：Home + 语言切换居中，白色搜索区在其下方 */
.page-nav-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-nav-home,
.btn-nav-lang {
    background: white;
    border: 2px solid #2c3e50;
    color: #2c3e50;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
}

.btn-nav-lang {
    border: 2px solid #2c3e50;
}

.btn-nav-home:hover,
.btn-nav-lang:hover {
    background: #2c3e50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.5);
}

/* 默认首页基地内容（与搜索表单同区域） */
.bases-panel {
    padding: 4px 0 8px;
}

.bases-panel .bases-content {
    line-height: 1.6;
    color: #1f2937;
}

.bases-panel .bases-content a {
    color: inherit;
    text-decoration: none;
    pointer-events: none;
    cursor: default;
}

.bases-empty {
    text-align: center;
    padding: 40px 16px;
    color: #6b7280;
}

.bases-empty code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 更新记录界面：外框宽度与搜索表单一致，深色内容铺满白色卡片 */
body.view-bases .body {
    background-color: #1f2937;
    max-width: 1400px;
    margin: 0 auto 20px auto;
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

body.view-bases .bases-panel {
    padding: 0;
    margin: 0;
    width: 100%;
}

body.view-bases .bases-panel .bases-content {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.55;
    color: #e5e7eb;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 深色内容块铺满容器 */
body.view-bases .bases-content .bg-gray-800 {
    background-color: #1f2937 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 15px;
    padding: 1.25rem 1.5rem 1.5rem;
    box-sizing: border-box;
}

body.view-bases .bases-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    margin: 0.5rem 0;
}

/* [+] NEW BASES: 标题 — 白色加粗 */
body.view-bases .bases-content > .bg-gray-800 > b.font-mono,
body.view-bases .bases-content .bg-gray-800 > b.font-mono:first-of-type {
    color: #ffffff !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* 基地名称 — 蓝色，无下划线 */
body.view-bases .bases-content .text-blue-500,
body.view-bases .bases-content b.text-blue-500 {
    color: #3b82f6 !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* [*] LIVE NOW — 红色 */
body.view-bases .bases-content .text-red-500,
body.view-bases .bases-content i.text-red-500 {
    color: #ef4444 !important;
    font-size: 1rem !important;
    font-style: normal;
    text-decoration: none !important;
}

/* 详情正文 — 浅灰 */
body.view-bases .bases-content .text-gray-200,
body.view-bases .bases-content p.text-gray-200 {
    color: #e5e7eb !important;
    font-size: 0.9375rem !important;
    line-height: 1.55 !important;
}

body.view-bases .bases-content p.text-gray-200 .text-sm {
    font-size: 1rem !important;
}

body.view-bases .bases-content .underline {
    text-decoration: none !important;
}

body.view-bases .bases-empty {
    color: #9ca3af;
    padding: 2rem 1rem;
}

body.view-bases.device-xs .body,
body.view-bases.device-sm .body {
    padding: 0 !important;
    background-color: #1f2937 !important;
}

@media (max-width: 768px) {
    body.view-bases .body {
        padding: 0;
        margin: 0 10px 10px 10px;
    }

    body.view-bases .bases-content .bg-gray-800 {
        padding: 1rem 0.75rem 1.25rem;
        border-radius: 15px;
    }
}

/* ========================================= */
/* 联系客服按钮和弹窗（右下角浮层，弹窗在按钮上方） */
/* ========================================= */

/* 整体浮层：高于顶部广告(z-index:999)，与广告无关、不会被广告挡住 */
.support-dock {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    max-height: calc(100vh - 90px);
    pointer-events: none;
}

.support-dock > * {
    pointer-events: auto;
}

.support-toggle {
    position: relative;
    right: auto;
    bottom: auto;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-toggle:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.support-card {
    position: relative;
    right: auto;
    bottom: auto;
    flex-shrink: 0;
    width: 280px;
    max-width: calc(100vw - 40px);
    height: auto;
    max-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 15px;
    border: 3px solid white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    animation: popupSlideIn 0.25s ease;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.support-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.support-close:hover {
    transform: rotate(90deg);
}

.support-body {
    padding: 20px;
    color: white;
    overflow: visible;
}

.support-body h5 {
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

.support-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
}

.support-link {
    display: flex !important;
    align-items: center;
    flex-shrink: 0;
    min-height: 44px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white !important;
    text-decoration: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.support-empty {
    margin: 0;
    font-size: 0.9rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}

.support-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
    color: white;
}

.support-link i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* ========================================= */
/* 回到顶部按钮 */
/* ========================================= */

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 3px solid white;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.5);
    transition: all 0.3s;
    z-index: 998;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.7);
}

/* 表格样式 - 黑色表头 */
.table {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.table thead th {
    color: white;
    font-weight: 600;
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* 表头分隔线 */
.table thead th[style*="border-right"] {
    border-right: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.table tbody td {
    vertical-align: top;
    padding: 10px;
}

/* Region列特殊样式 */
.table tbody td.region {
    padding: 8px;
}

.table tbody td.region .form-label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

/* TYPE行内布局 */
.d-flex.gap-2 {
    gap: 0.5rem;
}

.d-flex.gap-2 label {
    cursor: pointer;
    white-space: nowrap;
}

/* 文本框样式 */
textarea.form-control {
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.3s;
}

textarea.form-control:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

/* 复选框组样式 - 紧凑版 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-group.compact {
    gap: 3px;
}

/* Level三列布局 */
.level-column {
    flex: 0 0 32%;
    min-width: 0;
    padding: 0 8px 0 0;
}

.level-column:first-child {
    padding-right: 12px;
}

.level-column:nth-child(2) {
    padding-right: 12px;
}

.level-column:last-child {
    flex: 0 0 36%;
    padding-right: 0;
}

.level-column label {
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.88rem;
}

.level-column label span {
    display: inline-block;
}

.checkbox-group label {
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 5px;
    transition: background-color 0.2s;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.checkbox-group label:hover {
    background-color: #f0f0f0;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 6px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Select样式 */
.form-select {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

/* Input样式 */
.form-control {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

.form-select:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

/* Select2样式覆盖 */
.select2-container--default .select2-selection--single {
    border: 2px solid #ddd;
    border-radius: 8px;
    height: 45px;
    padding: 5px;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #2c3e50;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 33px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 43px;
}

/* 按钮样式 - 黑灰色系 */
.btn-primary {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: none;
    padding: 10px 35px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.6);
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #95a5a6 100%);
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    border: none;
    padding: 10px 35px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(127, 140, 141, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 140, 141, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: none;
    padding: 10px 35px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    padding: 10px 35px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

/* 结果区域样式 */
#resultsContainer {
    animation: fadeIn 0.5s ease-out;
}

.alert {
    border: none;
    border-radius: 10px;
    padding: 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 5px solid #27ae60;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 5px solid #f39c12;
}

/* 表格条纹效果 */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(44, 62, 80, 0.08);
}

/* 徽章样式 */
.badge {
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding-top: 60px; /* 移动端广告高度 */
    }
    
    .topbar-links {
        height: 60px;
        padding: 5px 10px;
        gap: 8px; /* 移动端减小间距 */
    }
    
    .topbar-link {
        height: 50px;
    }
    
    .topbar-link img {
        max-width: 120px; /* 4个图片需要更小 */
    }
    
    .body {
        padding: 15px;
        margin: 0 10px 10px 10px; /* 顶部无边距，紧贴广告栏 */
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .btn-lg {
        font-size: 0.95rem;
        padding: 8px 25px;
    }
    
    .checkbox-group label {
        font-size: 0.85rem;
    }
    
    .page-nav-bar {
        padding: 12px 12px 14px;
        gap: 10px;
    }

    .btn-nav-home,
    .btn-nav-lang {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}


/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table, .alert, .btn {
    animation: fadeIn 0.5s ease-out;
}

/* 加载更多按钮样式 */
#loadMoreBtn button {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: bold;
}

#loadMoreBtn button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

#loadMoreBtn button:active {
    transform: translateY(0);
}

/* 滚动条样式 - 黑灰色 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #ecf0f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

/* 加载动画 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 表格响应式 */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
}

/* 国旗列样式 */
table td:last-child img {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    display: inline-block;
}

/* ========================================= */
/* 移动端响应式设计 - 基于设备检测 */
/* ========================================= */

/* ========================================= */
/* 表格响应式布局控制 */
/* ========================================= */

/* 默认桌面端：显示桌面表头和Level列，隐藏移动端元素 */
.mobile-header-1,
.mobile-header-2,
.mobile-header-3,
.mobile-header-combined,
.mobile-region-row,
.mobile-level-row,
.mobile-combined-row {
    display: none !important;
}

.desktop-header {
    display: table-row !important;
}

.cell-level-desktop {
    display: table-cell !important;
}

.cell-region-mobile {
    padding: 10px !important;
}

.cell-region-mobile .mb-2 {
    margin-bottom: 10px !important;
}

.mobile-level-container {
    padding: 5px 8px 10px 8px;
}

.mobile-level-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    column-gap: 8px;
}

.mobile-level-grid label {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 0.85rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    line-height: 1.3;
    min-height: 16px;
}

.mobile-level-grid input[type="checkbox"] {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* 设备特定样式 - 超小屏幕手机 (≤576px) */
body.device-xs {
    font-size: 13px;
    overflow-x: hidden !important;
    padding-top: 50px !important; /* 与device-xs广告栏高度一致，紧贴 */
}

body.device-xs .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.device-xs .col-md-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 超小屏幕手机：表格强制100%宽度 */
body.device-xs .table-bordered {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}

body.device-xs table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

body.device-xs .table-bordered td,
body.device-xs .table-bordered th {
    padding: 3px 2px !important;
    box-sizing: border-box !important;
    border: 1px solid #dee2e6 !important;
    overflow: hidden !important;
}

body.device-xs .cell-bin,
body.device-xs .cell-brand {
    vertical-align: top !important;
    overflow: hidden !important;
}

body.device-xs .cell-bin textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 3px !important;
    font-size: 0.75rem !important;
    border: 1px solid #ddd !important;
    margin: 0 !important;
    min-height: 80px !important;
    line-height: 1.2 !important;
}

body.device-xs .cell-brand .checkbox-group {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.device-xs .cell-brand label {
    font-size: 0.68rem !important;
    padding: 1px 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    margin: 0 0 1px 0 !important;
    line-height: 1.3 !important;
}

body.device-xs .cell-brand input[type="checkbox"] {
    width: 11px !important;
    height: 11px !important;
    margin-right: 3px !important;
    vertical-align: middle !important;
}

/* 超小屏幕手机：启用移动端布局 */
body.device-xs .desktop-header {
    display: none !important;
}

body.device-xs .cell-level-desktop,
body.device-xs .cell-region {
    display: none !important;
}

body.device-xs .mobile-header-1,
body.device-xs .mobile-header-combined {
    display: table-row !important;
}

body.device-xs .mobile-header-1 th {
    font-size: 0.75rem !important;
    padding: 3px 2px 2px 2px !important;
}

body.device-xs .mobile-combined-row {
    display: table-row !important;
}

body.device-xs .mobile-combined-row td {
    display: table-cell !important;
    vertical-align: top !important;
    box-sizing: border-box !important;
}

body.device-xs .form-row-1 .cell-bin,
body.device-xs .form-row-1 .cell-brand {
    display: table-cell !important;
}

body.device-xs .form-row-1 .cell-bin {
    width: 38% !important;
    max-width: 38% !important;
    min-width: 38% !important;
    box-sizing: border-box !important;
}

body.device-xs .form-row-1 .cell-brand {
    width: 62% !important;
    max-width: 62% !important;
    min-width: 62% !important;
    box-sizing: border-box !important;
}

body.device-xs .mobile-header-1 th:first-child {
    width: 38% !important;
}

body.device-xs .mobile-header-1 th:last-child {
    width: 62% !important;
    text-align: center !important;
}

body.device-xs .mobile-level-grid {
    display: grid !important;
    grid-template-columns: 2fr 3fr !important;
    column-gap: 3px !important;
    row-gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding: 0 2px !important;
}

body.device-xs .mobile-level-grid label {
    font-size: 0.75rem !important;
    gap: 2px !important;
    padding: 1px 2px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
    display: flex !important;
    align-items: center !important;
    min-height: 14px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.device-xs .mobile-level-grid input[type="checkbox"] {
    width: 10px !important;
    height: 10px !important;
    flex-shrink: 0 !important;
    margin-right: 3px !important;
    margin-left: 0 !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    vertical-align: middle !important;
}

body.device-xs .mobile-header-combined {
    display: table-row !important;
    width: 100% !important;
}

body.device-xs .mobile-header-combined th {
    font-size: 0.75rem !important;
    padding: 3px 2px 2px 2px !important;
    text-align: center !important;
    display: table-cell !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

body.device-xs .mobile-header-combined th:first-child {
    width: 40% !important;
    min-width: 40% !important;
    max-width: 40% !important;
    text-align: center !important;
    display: table-cell !important;
}

body.device-xs .mobile-header-combined th:last-child {
    width: 60% !important;
    min-width: 60% !important;
    max-width: 60% !important;
    text-align: center !important;
    display: table-cell !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.device-xs .mobile-level-container {
    padding: 3px 2px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.device-xs .mobile-combined-row .cell-region-mobile + td {
    width: 60% !important;
    max-width: 60% !important;
    min-width: 60% !important;
    padding: 1px 0px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}


body.device-xs .cell-region-mobile {
    padding: 2px 1px !important;
    box-sizing: border-box !important;
    width: 40% !important;
    max-width: 40% !important;
    min-width: 40% !important;
    overflow: hidden !important;
}

body.device-xs .cell-region-mobile .form-label {
    font-size: 0.7rem !important;
    margin-bottom: 1px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

body.device-xs .cell-region-mobile .form-control,
body.device-xs .cell-region-mobile .form-select {
    font-size: 0.75rem !important;
    padding: 3px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #ddd !important;
    margin: 0 !important;
    height: auto !important;
}

body.device-xs .cell-region-mobile .mb-2 {
    margin-bottom: 3px !important;
}

body.device-xs .cell-region-mobile .d-flex {
    flex-wrap: wrap !important;
    gap: 3px !important;
}

body.device-xs .cell-region-mobile label {
    font-size: 0.75rem !important;
    margin: 0 !important;
}

body.device-xs .cell-region-mobile strong {
    font-size: 0.7rem !important;
}

body.device-xs .cell-region-mobile input[type="checkbox"] {
    width: 11px !important;
    height: 11px !important;
    vertical-align: middle !important;
}

body.device-xs h1 {
    font-size: 1.1rem !important;
    padding: 10px 0 !important;
}

body.device-xs .main {
    padding: 8px 0 !important;
    box-sizing: border-box !important;
}

body.device-xs .container {
    padding: 0px !important;
    margin: 0px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

body.device-xs .body {
    margin: 0px !important;
    padding: 5px !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

body.device-xs .table-bordered {
    margin-bottom: 15px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.device-xs .button-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

body.device-xs .button-group .btn {
    flex: 1;
    margin: 0 !important;
    font-size: 0.9rem !important;
    padding: 12px 20px !important;
}

body.device-xs textarea.form-control {
    min-height: 100px !important;
    font-size: 0.9rem;
}

body.device-xs .form-control,
body.device-xs .form-select {
    font-size: 0.9rem;
    padding: 8px 12px;
}

body.device-xs .badge {
    font-size: 0.6rem !important;
    padding: 2px 4px !important;
}

body.device-xs .support-dock {
    right: 10px !important;
    bottom: 10px !important;
    max-height: calc(100vh - 80px) !important;
}

body.device-xs .support-toggle {
    width: 50px !important;
    height: 50px !important;
    font-size: 20px !important;
}

body.device-xs .support-card {
    width: calc(100vw - 30px) !important;
    max-width: 280px !important;
    max-height: calc(100vh - 160px) !important;
}

body.device-xs .back-to-top {
    width: 45px !important;
    height: 45px !important;
    right: 10px !important;
    bottom: 10px !important;
}

body.device-xs .page-nav-bar {
    padding: 10px 8px 12px !important;
    gap: 8px !important;
}

body.device-xs .topbar-links {
    height: 50px !important;
    padding: 5px !important;
    gap: 5px !important;
}

body.device-xs .topbar-link {
    height: 40px !important;
}

body.device-xs .topbar-link img {
    max-width: 80px !important; /* 4个图片需要更小 */
}

/* 设备特定样式 - 手机 (577px-768px) */
body.device-sm {
    font-size: 14px;
    overflow-x: hidden !important;
    padding-top: 60px !important; /* 与device-sm广告栏高度一致，紧贴 */
}

body.device-sm .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.device-sm .col-md-12 {
    padding-left: 5px !important;
    padding-right: 5px !important;
}

/* 手机：表格强制100%宽度 */
body.device-sm .table-bordered {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}

body.device-sm table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

body.device-sm .table-bordered td,
body.device-sm .table-bordered th {
    padding: 10px 8px !important;
    box-sizing: border-box !important;
}

body.device-sm .cell-bin,
body.device-sm .cell-brand {
    vertical-align: top !important;
    overflow: hidden !important;
}

body.device-sm .cell-bin textarea {
    width: 100% !important;
    box-sizing: border-box !important;
}

body.device-sm .cell-brand .checkbox-group {
    width: 100% !important;
}

body.device-sm .cell-brand label {
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 手机：启用移动端布局 */
body.device-sm .desktop-header {
    display: none !important;
}

body.device-sm .cell-level-desktop,
body.device-sm .cell-region {
    display: none !important;
}

body.device-sm .mobile-header-1,
body.device-sm .mobile-header-combined {
    display: table-row !important;
}

body.device-sm .mobile-combined-row {
    display: table-row !important;
}

body.device-sm .form-row-1 .cell-bin,
body.device-sm .form-row-1 .cell-brand {
    display: table-cell !important;
}

body.device-sm .form-row-1 .cell-bin {
    width: 38% !important;
    max-width: 38% !important;
    min-width: 38% !important;
}

body.device-sm .form-row-1 .cell-brand {
    width: 62% !important;
    max-width: 62% !important;
    min-width: 62% !important;
}

body.device-sm .mobile-header-1 th:first-child {
    width: 38% !important;
}

body.device-sm .mobile-header-1 th:last-child {
    width: 62% !important;
    text-align: center !important;
}

body.device-sm .mobile-level-grid {
    display: grid !important;
    grid-template-columns: 2fr 3fr !important;
    column-gap: 3px !important;
    row-gap: 2px !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 2px !important;
}

body.device-sm .mobile-level-grid label {
    font-size: 0.75rem !important;
    gap: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    min-height: 14px !important;
    padding: 1px 2px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.device-sm .mobile-level-grid input[type="checkbox"] {
    margin-top: 2px !important;
}

body.device-sm .mobile-header-combined {
    display: table-row !important;
    width: 100% !important;
}

body.device-sm .mobile-header-combined th {
    font-size: 0.9rem !important;
    padding: 8px 10px 5px 10px !important;
    text-align: center !important;
    display: table-cell !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

body.device-sm .mobile-header-combined th:first-child {
    width: 40% !important;
    min-width: 40% !important;
    max-width: 40% !important;
    text-align: center !important;
    display: table-cell !important;
}

body.device-sm .mobile-header-combined th:last-child {
    width: 60% !important;
    min-width: 60% !important;
    max-width: 60% !important;
    text-align: center !important;
    display: table-cell !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.device-sm .cell-region-mobile {
    padding: 5px 8px !important;
    box-sizing: border-box !important;
    width: 40% !important;
    max-width: 40% !important;
    min-width: 40% !important;
}

body.device-sm .mobile-combined-row .cell-region-mobile + td {
    width: 60% !important;
    max-width: 60% !important;
    min-width: 60% !important;
    padding: 5px 8px !important;
    box-sizing: border-box !important;
}

body.device-sm .mobile-level-container {
    padding: 3px 2px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}


body.device-sm .mobile-level-grid {
    width: 100% !important;
    box-sizing: border-box !important;
}

body.device-sm .mobile-level-grid label {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.device-sm .cell-region-mobile {
    padding: 10px 8px !important;
    box-sizing: border-box !important;
}

body.device-sm .cell-region-mobile .form-label {
    font-size: 0.9rem !important;
}

body.device-sm .cell-region-mobile .form-control,
body.device-sm .cell-region-mobile .form-select {
    font-size: 0.9rem !important;
    padding: 8px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.device-sm h1 {
    font-size: 1.3rem !important;
    padding: 12px 0 !important;
}

body.device-sm .main {
    padding: 20px 0 !important;
}

body.device-sm .container {
    padding: 10px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.device-sm .body {
    margin: 0 10px 10px 10px; /* 顶部无边距，紧贴广告栏 */
    padding: 15px;
    box-sizing: border-box;
    width: calc(100vw - 20px);
    overflow: hidden;
}

body.device-sm .table-bordered {
    margin-bottom: 20px !important;
}

body.device-sm .button-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

body.device-sm .button-group .btn {
    flex: 1;
    margin: 0 !important;
}

body.device-sm textarea.form-control {
    min-height: 100px !important;
}

body.device-sm .badge {
    font-size: 0.65rem !important;
    padding: 2px 5px !important;
}

body.device-sm .support-dock {
    right: 15px !important;
    bottom: 12px !important;
    max-height: calc(100vh - 85px) !important;
}

body.device-sm .support-toggle {
    width: 55px !important;
    height: 55px !important;
}

body.device-sm .support-card {
    width: calc(100vw - 40px) !important;
    max-width: 300px !important;
    max-height: calc(100vh - 170px) !important;
}

body.device-sm .back-to-top {
    width: 48px !important;
    height: 48px !important;
    right: 15px !important;
    bottom: 15px !important;
}

body.device-sm .page-nav-bar {
    padding: 12px 10px 14px !important;
    gap: 10px !important;
}

body.device-sm .topbar-links {
    height: 60px !important;
    padding: 5px 10px !important;
    gap: 8px !important;
}

body.device-sm .topbar-link {
    height: 50px !important;
}

body.device-sm .topbar-link img {
    max-width: 120px !important; /* 4个图片需要更小 */
}

/* 设备特定样式 - 平板 (769px-992px) */
body.device-md .button-group {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
}

body.device-md .button-group .btn {
    min-width: 150px;
}

/* ========================================= */
/* 传统媒体查询（作为后备） */
/* ========================================= */

/* 平板和小屏幕 (≤992px) */
@media (max-width: 992px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem !important;
        padding: 15px 0 !important;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    /* 让Brand/Level列更紧凑 */
    .checkbox-group {
        gap: 8px;
    }
    
    .brand-column,
    .level-column {
        padding: 3px 8px;
        font-size: 0.8rem;
    }
}

/* 手机端 (≤768px) */
@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .col-md-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .container {
        padding: 0px !important;
        margin: 0px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .body {
        margin: 0px !important;
        padding: 5px !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    /* 表格强制100%宽度 */
    .table-bordered {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
    }
    
    table {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    .table-bordered td,
    .table-bordered th {
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .cell-bin,
    .cell-brand {
        vertical-align: top !important;
        overflow: hidden !important;
    }
    
    .form-row-1 .cell-bin {
        width: 38% !important;
        max-width: 38% !important;
        min-width: 38% !important;
        box-sizing: border-box !important;
    }

    .form-row-1 .cell-brand {
        width: 62% !important;
        max-width: 62% !important;
        min-width: 62% !important;
        box-sizing: border-box !important;
    }
    
    .mobile-header-1 th:first-child {
        width: 38% !important;
    }
    
    .mobile-header-1 th:last-child {
        width: 62% !important;
        text-align: center !important;
    }
    
    .cell-bin textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .cell-brand .checkbox-group {
        width: 100% !important;
    }
    
    /* 启用移动端表格布局 */
    .desktop-header {
        display: none !important;
    }
    
    .cell-level-desktop,
    .cell-region {
        display: none !important;
    }
    
    .mobile-header-1,
    .mobile-header-combined {
        display: table-row !important;
    }
    
    .mobile-combined-row {
        display: table-row !important;
    }
    
    .mobile-combined-row td {
        padding: 0 !important;
        vertical-align: top !important;
    }
    
    .mobile-level-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px;
        column-gap: 0px;
        row-gap: 3px;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .mobile-level-grid label {
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        word-break: break-word !important;
        line-height: 1.3 !important;
        display: flex !important;
        align-items: flex-start !important;
        min-height: 16px !important;
    }
    
    .mobile-level-grid input[type="checkbox"] {
        margin-top: 2px !important;
    }
    
    .mobile-header-combined {
        display: table-row !important;
        width: 100% !important;
    }
    
    .mobile-header-combined th {
        font-size: 0.9rem !important;
        padding: 8px 10px 5px 10px !important;
        text-align: center !important;
        display: table-cell !important;
        box-sizing: border-box !important;
        vertical-align: middle !important;
    }
    
    .mobile-header-combined th:first-child {
        width: 40% !important;
        min-width: 40% !important;
        max-width: 40% !important;
        text-align: center !important;
        display: table-cell !important;
    }
    
    .mobile-header-combined th:last-child {
        width: 60% !important;
        min-width: 60% !important;
        max-width: 60% !important;
        text-align: center !important;
        display: table-cell !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .cell-region-mobile {
        padding: 5px 8px !important;
        box-sizing: border-box !important;
        width: 40% !important;
        max-width: 40% !important;
        min-width: 40% !important;
    }
    
    .mobile-combined-row .cell-region-mobile + td {
        width: 60% !important;
        max-width: 60% !important;
        min-width: 60% !important;
        padding: 5px 8px !important;
        box-sizing: border-box !important;
    }
    
    .mobile-level-container {
        padding: 5px 8px 10px 8px;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .cell-region-mobile {
        box-sizing: border-box !important;
    }
    
    .cell-region-mobile .form-control,
    .cell-region-mobile .form-select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .form-row-1 .cell-bin,
    .form-row-1 .cell-brand {
        display: table-cell !important;
    }
    
    .form-row-1 .cell-bin {
        width: 37.5% !important;
        max-width: 37.5% !important;
    }
    
    .form-row-1 .cell-brand {
        width: 62.5% !important;
        max-width: 62.5% !important;
    }
    
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.3rem !important;
        padding: 10px 0 !important;
    }
    
    /* 主容器增加内边距 */
    .main {
        padding: 15px 0 !important;
        box-sizing: border-box !important;
    }
    
    .container {
        padding: 10px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .body {
        margin: 0 10px 10px 10px; /* 顶部无边距，紧贴广告栏 */
        padding: 15px;
        box-sizing: border-box;
        width: calc(100vw - 20px);
        overflow: hidden;
    }
    
    /* 表格容器增加底部内边距 */
    .table-bordered {
        margin-bottom: 20px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* 顶部按钮 */
    #langBtn {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    /* 搜索表单 */
    .form-label {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 5px;
    }
    
    .form-control,
    .form-select {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    textarea.form-control {
        min-height: 80px !important;
    }
    
/* 按钮组 - 水平排列 */
.button-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.button-group .btn {
    flex: 1;
    margin: 0 !important;
}

.search-btn-mobile,
.reset-btn-mobile {
    display: block !important;
    flex: 1;
}
    
    /* 按钮 */
    .btn {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
    
    .btn-lg {
        font-size: 0.9rem !important;
        padding: 10px 20px !important;
    }
    
    /* Brand/Level 复选框区域 */
    .checkbox-group {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .brand-column,
    .level-column {
        padding: 2px 6px;
        font-size: 0.75rem;
        min-width: auto;
    }
    
    .brand-column input,
    .level-column input {
        width: 12px;
        height: 12px;
    }
    
    /* Type 复选框 */
    .type-row label {
        font-size: 0.85rem;
        padding: 5px 10px;
    }
    
    /* 表格 */
    table {
        font-size: 0.75rem;
    }
    
    table th {
        padding: 8px 4px !important;
        font-size: 0.7rem;
    }
    
    table td {
        padding: 6px 4px !important;
        font-size: 0.75rem;
    }
    
    /* 国旗列在手机端 */
    table td:last-child img {
        width: 28px !important;
        height: 21px !important;
    }
    
    /* 徽章在手机端 */
    .badge {
        font-size: 0.6rem !important;
        padding: 2px 4px !important;
    }
    
    /* 复制按钮 */
    .copy-btn {
        font-size: 0.7rem !important;
        padding: 2px 6px !important;
    }
    
    /* 联系客服按钮和弹窗 */
    .support-dock {
        right: 15px !important;
        bottom: 12px !important;
        max-height: calc(100vh - 85px) !important;
    }

    .support-toggle {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }
    
    .support-card {
        width: calc(100vw - 40px) !important;
        max-width: 280px !important;
        max-height: calc(100vh - 170px) !important;
    }
    
    .support-body {
        padding: 15px !important;
    }
    
    .support-body h5 {
        font-size: 0.95rem !important;
    }
    
    .support-link {
        display: flex !important;
        flex-shrink: 0 !important;
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }
    
    .support-link i {
        font-size: 1rem !important;
    }
    
    /* 回到顶部按钮 */
    .back-to-top {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem;
        right: 10px;
        bottom: 10px;
    }
    
    /* 统计信息 */
    .alert {
        font-size: 0.85rem;
        padding: 10px;
    }
}

/* 超小屏幕手机 (≤576px) */
@media (max-width: 576px) {
    * {
        box-sizing: border-box !important;
    }
    
    html, body {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    body {
        padding-top: 50px !important; /* 与超小屏幕广告栏高度一致 */
    }
    
    .topbar-links {
        height: 50px !important;
        padding: 5px !important;
        gap: 5px !important; /* 超小屏幕更小间距 */
    }
    
    .topbar-link {
        height: 40px !important;
    }
    
    .topbar-link img {
        max-width: 80px !important; /* 4个图片需要更小 */
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .col-md-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .container {
        padding: 0px !important;
        margin: 0px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .body {
        margin: 0px !important;
        padding: 3px !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    /* 表格强制100%宽度 */
    .table-bordered {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
    }
    
    .table-bordered td,
    .table-bordered th {
        padding: 4px 2px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .cell-bin,
    .cell-brand {
        vertical-align: top !important;
        overflow: hidden !important;
    }
    
    .form-row-1 .cell-bin {
        width: 38% !important;
        max-width: 38% !important;
        min-width: 38% !important;
        box-sizing: border-box !important;
    }

    .form-row-1 .cell-brand {
        width: 62% !important;
        max-width: 62% !important;
        min-width: 62% !important;
        box-sizing: border-box !important;
    }
    
    .mobile-header-1 th:first-child {
        width: 38% !important;
    }
    
    .mobile-header-1 th:last-child {
        width: 62% !important;
        text-align: center !important;
    }
    
    .cell-bin textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 6px !important;
    }
    
    .cell-brand .checkbox-group {
        width: 100% !important;
    }
    
    .cell-brand label {
        font-size: 0.75rem !important;
        padding: 2px 4px !important;
    }
    
    /* 启用移动端表格布局 */
    .desktop-header {
        display: none !important;
    }
    
    .cell-level-desktop,
    .cell-region {
        display: none !important;
    }
    
    .mobile-header-1,
    .mobile-header-combined {
        display: table-row !important;
    }
    
    .mobile-combined-row {
        display: table-row !important;
    }
    
    .mobile-combined-row td {
        padding: 0 !important;
        vertical-align: top !important;
    }
    
    .mobile-level-grid {
        display: grid !important;
        grid-template-columns: 2fr 3fr !important;
        column-gap: 2px !important;
        row-gap: 1px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding: 0 1px !important;
    }
    
    .mobile-level-grid label {
        font-size: 0.75rem !important;
        gap: 2px !important;
        padding: 1px 2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
        display: flex !important;
        align-items: center !important;
        min-height: 14px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .mobile-level-grid input[type="checkbox"] {
        margin-top: 2px !important;
    }
    
    .mobile-header-combined {
        display: table-row !important;
        width: 100% !important;
    }
    
    .mobile-header-combined th {
        font-size: 0.85rem !important;
        padding: 6px 8px 4px 8px !important;
        text-align: center !important;
        display: table-cell !important;
        box-sizing: border-box !important;
        vertical-align: middle !important;
    }
    
    .mobile-header-combined th:first-child {
        width: 40% !important;
        min-width: 40% !important;
        max-width: 40% !important;
        text-align: center !important;
        display: table-cell !important;
    }
    
    .mobile-header-combined th:last-child {
        width: 60% !important;
        min-width: 60% !important;
        max-width: 60% !important;
        text-align: center !important;
        display: table-cell !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .mobile-level-container {
        padding: 3px 2px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .cell-region-mobile {
        padding: 8px 6px !important;
        box-sizing: border-box !important;
        width: 40% !important;
        max-width: 40% !important;
        min-width: 40% !important;
    }
    
    .cell-region-mobile .form-control,
    .cell-region-mobile .form-select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .mobile-combined-row .cell-region-mobile + td {
        width: 60% !important;
        max-width: 60% !important;
        min-width: 60% !important;
    }
    
    .form-row-1 .cell-bin,
    .form-row-1 .cell-brand {
        display: table-cell !important;
    }
    
    .form-row-1 .cell-bin {
        width: 38% !important;
        max-width: 38% !important;
        min-width: 38% !important;
    }
    
    .form-row-1 .cell-brand {
        width: 62% !important;
        max-width: 62% !important;
        min-width: 62% !important;
    }
    
    .mobile-header-1 th:first-child {
        width: 38% !important;
    }
    
    .mobile-header-1 th:last-child {
        width: 62% !important;
        text-align: center !important;
    }
    
    .body {
        margin: 0 5px 5px 5px; /* 顶部无边距，紧贴广告栏 */
        padding: 8px;
        box-sizing: border-box;
        width: calc(100vw - 10px);
        overflow: hidden;
    }
    
    .container {
        padding: 6px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .main {
        padding: 8px 0 !important;
        box-sizing: border-box !important;
    }
    
    h1 {
        font-size: 1.1rem !important;
    }
    
    /* 让表单更紧凑 */
    .row.mb-3 {
        margin-bottom: 10px !important;
    }
    
    /* Brand/Level 改为两列布局 */
    .checkbox-group {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .brand-column,
    .level-column {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
    
    /* 表格横向滚动 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 国旗列在超小屏幕 */
    table td:last-child img {
        width: 24px !important;
        height: 18px !important;
    }
    
    /* 徽章在超小屏幕 */
    .badge {
        font-size: 0.55rem !important;
        padding: 1px 3px !important;
    }
    
    /* 联系客服更小 */
    .support-dock {
        right: 10px !important;
        bottom: 10px !important;
        max-height: calc(100vh - 80px) !important;
    }

    .support-toggle {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
    
    .support-card {
        width: calc(100vw - 30px) !important;
        max-width: 260px !important;
        max-height: calc(100vh - 155px) !important;
    }
    
    .support-body {
        padding: 12px !important;
    }
    
    .support-body h5 {
        font-size: 0.85rem !important;
        margin-bottom: 10px !important;
    }
    
    .support-link {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
        gap: 8px;
    }
    
    .support-link i {
        font-size: 0.9rem !important;
        margin-right: 6px !important;
    }
    
    .support-close {
        font-size: 20px !important;
        width: 25px !important;
        height: 25px !important;
    }
    
    /* 加载按钮 */
    #loadMoreBtn button {
        font-size: 0.9rem !important;
        padding: 8px 15px !important;
        min-width: 180px !important;
    }
}
