/* ============ CSS变量定义 ============ */
:root {
    --primary-color: #1a56db;
    --secondary-color: #3b82f6;
    --accent-color: #0ea5e9;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --radius: 8px;
}

/* ============ 重置与基础样式 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ 导航栏 ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 24px;
}

.navbar-center {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 20px;
    padding: 6px 16px;
    gap: 8px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 160px;
    font-size: 14px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
}

/* ============ 导航下拉菜单 ============ */
.nav-dropdown {
    position: relative;
}
.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.dropdown-arrow {
    font-size: 11px;
    transition: transform 0.2s;
}
.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 300px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
    z-index: 1001;
}
.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.15s;
    text-decoration: none;
}
.dropdown-item:hover {
    background: var(--bg-color, #f1f5f9);
}
.dropdown-item i {
    font-size: 20px;
    color: var(--primary-color, #1a56db);
    margin-top: 2px;
    flex-shrink: 0;
}
.dropdown-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #1e293b);
    margin-bottom: 2px;
}
.dropdown-item span {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
}
/* 商城入口突出 */
.nav-link-shop {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white) !important;
    padding: 6px 16px !important;
    border-radius: 20px;
    font-weight: 600;
    border-bottom: none !important;
}
.nav-link-shop:hover {
    opacity: 0.9;
    border-bottom: none !important;
}

/* 平板 768-1023px：隐藏搜索框，导航紧凑 */
@media (max-width: 1023px) and (min-width: 768px) {
    .navbar-center {
        gap: 18px;
    }
    .search-box {
        display: none;
    }
    .nav-link {
        font-size: 14px;
    }
}

/* 移动端下拉菜单手风琴 */
@media (max-width: 767px) {
    .nav-dropdown {
        width: 100%;
    }
    .dropdown-trigger {
        justify-content: space-between;
        width: 100%;
    }
    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        padding: 0 0 0 16px;
        min-width: auto;
        display: none;
        border-left: 2px solid var(--bg-color, #f1f5f9);
        margin-top: 8px;
    }
    .dropdown-menu.show {
        display: block;
        transform: none;
    }
    .dropdown-item {
        padding: 8px 10px;
    }
    .nav-link-shop {
        display: inline-block;
        width: auto;
    }
}

/* ============ Hero区域 ============ */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    padding: 100px 20px 80px;
    text-align: center;
    color: var(--white);
    margin-top: 64px;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    text-wrap: balance;
}
.hero-search {
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 30px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
}

.hero-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
}

.hero-search i {
    color: var(--text-light);
}

/* ============ 工具卡片区域 ============ */
.tools-section {
    padding: 32px 0;
}

.category {
    margin-bottom: 26px;
}

.category-title {
    font-size: 19px;
    margin-bottom: 14px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-title i {
    color: var(--primary-color);
}

/* ===== 首页分类区块排版（结构根除错位：每个分类独立区块，标题与卡片物理绑定） =====
   外层 .home-layout 用 flex 换行并排区块；区块内部标题 + 卡片网格是同一容器，
   卡片绝不可能跨到别的标题下。 */
.home-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cat-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cat-title {
    font-size: 19px;
    margin: 0 0 14px 0;
    padding-bottom: 8px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
}

.cat-title i {
    color: var(--primary-color);
}

.cat-cards {
    display: grid;
    gap: 12px;
}

/* 默认（移动优先）：所有区块独占一行，卡片单列堆叠 */
.cat-block.cat-small,
.cat-block.cat-medium,
.cat-block.cat-large,
.cat-block.cat-single {
    flex: 1 1 100%;
}
.cat-block .cat-cards {
    grid-template-columns: 1fr;
}

/* 平板 >=768：小/中/单卡区块并排(50%)，大区块独占一行，大区块卡片2列 */
@media (min-width: 768px) {
    .cat-block.cat-small,
    .cat-block.cat-medium,
    .cat-block.cat-single {
        flex: 1 1 calc(50% - 8px);
    }
    .cat-block.cat-small .cat-cards,
    .cat-block.cat-medium .cat-cards {
        grid-template-columns: 1fr 1fr;
    }
    .cat-block.cat-single .cat-cards {
        grid-template-columns: 1fr;
    }
    .cat-block.cat-large {
        flex: 1 1 100%;
    }
    .cat-block.cat-large .cat-cards {
        grid-template-columns: 1fr 1fr;
    }
}

/* 小桌面 >=1024：大区块卡片升级为3列x2行，彻底消除5+1孤卡 */
@media (min-width: 1024px) {
    .cat-block.cat-large .cat-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: block;
    color: var(--text-color);
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.tool-card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
    margin-bottom: 10px;
}

.bg-blue { background: var(--primary-color); }
.bg-light-blue { background: var(--secondary-color); }
.bg-sky { background: var(--accent-color); }
.bg-gray { background: #94a3b8; }
.bg-red { background: #dc2626; }
.bg-orange { background: #ea580c; }
.bg-green { background: #16a34a; }
.bg-purple { background: #7c3aed; }
.bg-indigo { background: #4f46e5; }
.bg-yellow { background: #ca8a04; }

/* 工具集合页分类 */
.tool-category {
    margin-bottom: 48px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.tool-card h3 {
    font-size: 15px;
    margin-bottom: 4px;
    line-height: 1.35;
}

.tool-card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.45;
}

/* ============ 页脚 ============ */
.footer {
    background: #1e293b;
    color: #cbd5e1;
    margin-top: 60px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 48px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: 16px;
}

.footer-col p,
.footer-col li {
    font-size: 14px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: #94a3b8;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 18px;
    font-size: 13px;
    color: #64748b;
}
.footer-links .copyright {
    color: #64748b;
}
.beian-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}
.beian-link:hover {
    color: #e2e8f0;
    text-decoration: underline;
}
.beian-link i {
    margin-right: 3px;
}

/* ============ 计算器页面 ============ */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 40px 20px;
    margin-top: 64px;
}

.page-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header p {
    opacity: 0.9;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    padding: 32px 20px;
    align-items: start;
}

/* ============ 卡片通用 ============ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============ 表单样式 ============ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-color);
}

.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
}

.hint {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.form-section {
    margin: 20px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.form-section h4 {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-group {
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.detail-group summary {
    padding: 10px 14px;
    background: var(--bg-color);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.detail-group[open] summary {
    border-bottom: 1px solid var(--border-color);
}

.detail-group .form-group {
    padding: 12px 14px 0;
    margin-bottom: 12px;
}

/* ============ Tab按钮组 ============ */
.tab-group {
    display: flex;
    background: var(--bg-color);
    border-radius: 6px;
    padding: 4px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    color: var(--text-light);
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-color);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

/* ============ 按钮 ============ */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #1544ad;
}

.btn-print {
    padding: 6px 14px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-print:hover {
    background: var(--border-color);
}

/* ============ 结果展示 ============ */
.placeholder {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

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

.summary-header .card-title {
    border: none;
    padding: 0;
    margin: 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.summary-item {
    background: var(--bg-color);
    padding: 16px;
    border-radius: 6px;
    text-align: center;
}

.summary-item.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.summary-item .label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.summary-item.highlight .label {
    color: rgba(255,255,255,0.9);
}

.summary-item .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
}

.summary-item.highlight .value {
    color: var(--white);
}

/* ============ 图表区域 ============ */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-card {
    margin-bottom: 0;
}

.chart-card canvas {
    max-height: 280px;
}

/* ============ 数据表格 ============ */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

.data-table td:first-child,
.data-table th:first-child {
    text-align: center;
}

.data-table tbody tr:hover {
    background: var(--bg-color);
}

/* ============ 年终奖对比 ============ */
.bonus-compare {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bonus-option {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: 6px;
}

.option-label {
    font-size: 14px;
    color: var(--text-light);
}

.option-value {
    font-weight: 600;
    color: var(--text-color);
}

.bonus-recommend {
    padding: 12px 16px;
    background: #ecfdf5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
    font-size: 14px;
}

.bonus-recommend .saving {
    margin-left: auto;
    font-weight: 600;
}

/* ============ 政策说明 ============ */
.policy-details {
    margin-bottom: 20px;
}

.policy-details summary {
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
}

.policy-content {
    margin-top: 16px;
}

.policy-content ul {
    padding-left: 20px;
    font-size: 14px;
    line-height: 2;
}

/* ============ 信息卡片 ============ */
.info-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.info-card h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-list {
    list-style: none;
    font-size: 14px;
    line-height: 2;
}

.info-list .update-time {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 8px;
}

/* ============ 免责声明 ============ */
.disclaimer {
    padding: 16px;
    background: #fefce8;
    border-radius: 6px;
    font-size: 13px;
    color: #854d0e;
    line-height: 1.6;
}

.disclaimer i {
    margin-right: 6px;
}

/* ============ 工具页面通用样式 ============ */
.tool-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 20px;
}

/* 上传拖拽区 */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
    margin-bottom: 20px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.upload-zone i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.upload-zone h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.upload-zone p {
    font-size: 14px;
    color: var(--text-light);
}

.upload-zone input[type="file"] {
    display: none;
}

/* 文件列表 */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
}

.file-item:hover {
    border-color: var(--primary-color);
}

.file-item .file-icon {
    font-size: 24px;
    color: var(--primary-color);
    width: 32px;
    text-align: center;
}

.file-item .file-info {
    flex: 1;
    min-width: 0;
}

.file-item .file-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item .file-size {
    font-size: 12px;
    color: var(--text-light);
}

.file-item .file-remove {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: var(--transition);
}

.file-item .file-remove:hover {
    color: #dc2626;
}

/* 操作按钮区 */
.action-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-action {
    padding: 10px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-action:hover:not(:disabled) {
    background: #1544ad;
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 24px;
    background: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 结果区 */
.result-area {
    display: none;
}

.result-area.show {
    display: block;
}

.download-card {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.download-card h3 {
    color: #059669;
    margin-bottom: 8px;
}

.download-card .file-size-info {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.download-card .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #059669;
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.download-card .btn-download:hover {
    background: #047857;
}

/* 选项面板 */
.options-panel {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.options-panel h4 {
    font-size: 15px;
    margin-bottom: 16px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* 图片预览/Canvas区 */
.preview-area {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    text-align: center;
}

.preview-area canvas,
.preview-area img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.preview-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.preview-compare .preview-box {
    text-align: center;
}

.preview-compare .preview-box h5 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-light);
}

/* PDF缩略图网格 */
.pdf-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.pdf-thumb {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.pdf-thumb:hover {
    border-color: var(--primary-color);
}

.pdf-thumb.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.2);
}

.pdf-thumb img {
    width: 100%;
    display: block;
}

.pdf-thumb .page-num {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    font-size: 12px;
    padding: 4px;
    text-align: center;
}

.pdf-thumb .thumb-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 4px;
}

.pdf-thumb .thumb-actions button {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.pdf-thumb .thumb-actions button:hover {
    background: var(--primary-color);
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-bar .progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 提示消息 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background: #eff6ff;
    color: var(--primary-color);
    border: 1px solid #bfdbfe;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb i {
    font-size: 12px;
}

/* ============ 响应式设计 ============ */

/* 平板 768-1023px */
@media (max-width: 1023px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机 <768px */
@media (max-width: 767px) {
    .navbar-center {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px 20px;
        box-shadow: var(--shadow-md);
        gap: 16px;
    }

    .navbar-center.show {
        display: flex;
    }

    .hamburger {
        display: block;
    }

/* ============ 导航下拉菜单 ============ */
.nav-dropdown {
    position: relative;
}
.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.dropdown-arrow {
    font-size: 11px;
    transition: transform 0.2s;
}
.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 300px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
    z-index: 1001;
}
.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.15s;
    text-decoration: none;
}
.dropdown-item:hover {
    background: var(--bg-color, #f1f5f9);
}
.dropdown-item i {
    font-size: 20px;
    color: var(--primary-color, #1a56db);
    margin-top: 2px;
    flex-shrink: 0;
}
.dropdown-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #1e293b);
    margin-bottom: 2px;
}
.dropdown-item span {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
}
/* 商城入口突出 */
.nav-link-shop {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white) !important;
    padding: 6px 16px !important;
    border-radius: 20px;
    font-weight: 600;
    border-bottom: none !important;
}
.nav-link-shop:hover {
    opacity: 0.9;
    border-bottom: none !important;
}

/* 平板 768-1023px：隐藏搜索框，导航紧凑 */
@media (max-width: 1023px) and (min-width: 768px) {
    .navbar-center {
        gap: 18px;
    }
    .search-box {
        display: none;
    }
    .nav-link {
        font-size: 14px;
    }
}

/* 移动端下拉菜单手风琴 */
@media (max-width: 767px) {
    .nav-dropdown {
        width: 100%;
    }
    .dropdown-trigger {
        justify-content: space-between;
        width: 100%;
    }
    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        padding: 0 0 0 16px;
        min-width: auto;
        display: none;
        border-left: 2px solid var(--bg-color, #f1f5f9);
        margin-top: 8px;
    }
    .dropdown-menu.show {
        display: block;
        transform: none;
    }
    .dropdown-item {
        padding: 8px 10px;
    }
    .nav-link-shop {
        display: inline-block;
        width: auto;
    }
}

    .search-box {
        display: none;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero-content h1 {
        font-size: 28px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 宽屏 >=1440px：放宽首页容器，让大区块3列卡片更舒展 */
@media (min-width: 1440px) {
    .tools-section .container {
        max-width: 1380px;
    }
}

/* ============ 单位换算工具 ============ */
.converter-input-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.converter-input-row .form-group {
    margin-bottom: 0;
}

.result-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.result-unit {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 44px 14px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.result-unit:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.ru-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.ru-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    word-break: break-all;
}

.ru-symbol {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

.ru-name {
    font-size: 13px;
    color: var(--text-light);
}

.ru-sub {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.5;
}

.ru-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-light);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ru-copy:hover {
    background: var(--primary-color);
    color: var(--white);
}

.rate-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    background: #eff6ff;
    color: var(--primary-color);
    border: 1px solid #bfdbfe;
}

.rate-status.err {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.rate-status.ok {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

#shoeTable tbody tr.highlight {
    background: #eff6ff;
    font-weight: 600;
}

/* 移动端：换算输入行与结果列表单列 */
@media (max-width: 767px) {
    .converter-input-row {
        flex-direction: column;
        gap: 12px;
    }

    .result-list {
        grid-template-columns: 1fr;
    }
}

/* ============ 论文查重工具 ============ */
.plagiarism-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    padding: 32px 20px;
    align-items: start;
}

.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: var(--transition);
    line-height: 1.6;
}

.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--white);
}

.form-group input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gauge-row {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.gauge-container {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.gauge-ring {
    width: 140px;
    height: 140px;
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 10;
}

.gauge-fg {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke 0.3s ease;
}

.gauge-text {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
}

.gauge-label {
    font-size: 12px;
    color: var(--text-light);
}

.gauge-stats {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: 6px;
    font-size: 14px;
}

.stat-label {
    color: var(--text-light);
}

.stat-value {
    font-weight: 600;
    color: var(--text-color);
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-item {
    border: 1px solid var(--border-color);
    border-left: 4px solid #dc2626;
    border-radius: 6px;
    padding: 14px 16px;
    background: #fefefe;
}

.match-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.match-num {
    font-weight: 600;
    color: var(--text-light);
    font-size: 13px;
}

.match-sim {
    color: var(--white);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.match-sentence,
.match-source,
.match-snippet {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 6px;
    word-break: break-word;
}

.match-sentence .label,
.match-source .label {
    font-weight: 600;
    color: var(--text-color);
}

mark.dup {
    background: #fecaca;
    color: #991b1b;
    padding: 1px 2px;
    border-radius: 2px;
}

.match-source a {
    word-break: break-all;
}

.match-snippet {
    color: var(--text-light);
    font-size: 13px;
    padding-left: 4px;
}

.no-match {
    text-align: center;
    padding: 24px;
    color: #059669;
    font-size: 15px;
}

.no-match i {
    margin-right: 6px;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-color);
    border-radius: 6px;
    font-size: 14px;
}

.source-item i {
    color: var(--primary-color);
    flex-shrink: 0;
}

@media (max-width: 1023px) {
    .plagiarism-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .gauge-row {
        flex-direction: column;
        align-items: center;
    }
    .gauge-stats {
        width: 100%;
    }
}

@media print {
    .navbar,
    .footer,
    .input-panel,
    #printBtn,
    .page-header p {
        display: none !important;
    }
    .plagiarism-layout {
        display: block;
        padding: 0;
    }
    .result-panel {
        margin: 0;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    body {
        background: var(--white);
    }
}

/* ============================================================
   AIGC / 论文AI检测 专用样式
   ============================================================ */
.aigc-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    padding: 32px 20px;
    align-items: start;
}

.how-text {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.7;
}

/* 判定徽章 */
.verdict-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}
.verdict-ai {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.verdict-mixed {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}
.verdict-human {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* 短文本提示 */
.short-warning {
    margin-top: 16px;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #b45309;
    font-size: 13px;
}
.short-warning i { margin-right: 6px; }

/* 逐句高亮 */
.legend-line {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-left: 8px;
}
.dot-red { background: #fecaca; }
.dot-yellow { background: #fde68a; }
.dot-green { background: #bbf7d0; }

.highlight-text {
    font-size: 15px;
    line-height: 2.1;
    text-align: justify;
    color: var(--text-color);
}
.hl-sentence {
    border-radius: 3px;
    padding: 1px 2px;
    cursor: help;
    transition: background 0.2s;
}
.hl-red { background: #fecaca; }
.hl-yellow { background: #fde68a; }
.hl-green { background: #dcfce7; }
.hl-sentence:hover {
    outline: 2px solid rgba(0,0,0,0.2);
}

/* 七维指标 */
.dim-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.dim-item {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 14px 16px;
}
.dim-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.dim-name {
    font-size: 14px;
    font-weight: 600;
}
.dim-score {
    font-size: 18px;
    font-weight: 700;
}
.dim-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.dim-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}
.dim-value {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}
.dim-explain {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
    margin-top: 3px;
}
.dim-explain.dim-ai {
    color: #b45309;
}

/* 输入提示条 */
.alert-box {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }

/* 响应式 */
@media (max-width: 1023px) {
    .aigc-layout { grid-template-columns: 1fr; }
}

@media print {
    .input-panel { display: none !important; }
    .aigc-layout { display: block; padding: 0; }
    .hl-sentence:hover { outline: none; }
}

/* ========== 广告位样式 ========== */
.ad-container {
    width: 100%;
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 16px;
    display: flex;
    justify-content: center;
}
.ad-slot {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ad-slot ins { display: block; }
@media (max-width: 768px) {
    .ad-container { padding: 0 8px; margin: 8px auto; }
    .ad-slot { min-height: 60px; }
}

/* ========== 全站搜索联想下拉 ========== */
.site-search-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    border: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 9999;
    max-height: 420px;
    overflow-y: auto;
    text-align: left;
}
.search-box .site-search-panel {
    top: calc(100% + 6px);
    right: auto;
    width: 320px;
}
.site-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.15s ease;
}
.site-search-item:hover,
.site-search-item.active {
    background: #eff6ff;
}
.site-search-item .item-icon {
    font-size: 18px;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.site-search-item .item-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.site-search-item .item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-search-item .item-cat {
    font-style: normal;
    font-size: 11px;
    font-weight: 500;
    color: var(--primary-color);
    background: #eff6ff;
    padding: 1px 8px;
    border-radius: 10px;
}
.site-search-item .item-desc {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-search-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}
.site-search-empty i { margin-right: 6px; }

@media (max-width: 768px) {
    .hero-search {
        max-width: 100%;
        border-radius: 16px;
    }
    .site-search-panel {
        left: 8px;
        right: 8px;
        max-height: 60vh;
    }
}

/* ============ 主页"更多工具"卡片 ============ */
.tool-card-more {
    background: var(--bg-color, #f8fafc);
    border: 2px dashed var(--border-color, #e2e8f0);
}
.tool-card-more:hover {
    border-color: var(--primary-color, #1a56db);
    background: var(--white);
}
.tool-card-more .card-icon {
    background: var(--text-muted, #94a3b8) !important;
}

/* ============ 商城入口卡片 ============ */
.shop-hero-card {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
}
.shop-hero-card:hover {
    border-color: #f97316;
    transform: translateY(-2px);
}
.shop-hero-card .card-icon {
    background: #f97316 !important;
}
.shop-enter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 6px 14px;
    background: #f97316;
    color: #fff;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}
.shop-hero-card:hover .shop-enter-btn {
    background: #ea580c;
}
/* ============ 防孤字/不换行 ============ */
.nowrap { white-space: nowrap; }
.tool-card h3, .product-title, .category-title, .cat-title {
    text-wrap: balance;
}
/* 平板竖屏：副标题微调防孤字 */
@media (max-width: 1023px) and (min-width: 768px) {
    .hero-subtitle { font-size: 17px; }
}
@media (max-width: 576px) {
    .hero-subtitle { font-size: 15px; line-height: 1.7; }
}

/* ============================================================
   导航断点重构：汉堡菜单提前到991px，消除挤压区间
   ============================================================ */
@media (max-width: 991px) {
    .navbar-center {
        display: none !important;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px 20px;
        box-shadow: var(--shadow-md);
        gap: 14px;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        z-index: 1001;
    }
    .navbar-center.show {
        display: flex !important;
    }
    .hamburger {
        display: block !important;
    }
    .search-box {
        display: none !important;
    }
    /* 移动端下拉手风琴 */
    .nav-dropdown { width: 100%; }
    .dropdown-trigger { justify-content: space-between; width: 100%; }
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        padding: 0 0 0 16px !important;
        min-width: auto !important;
        display: none !important;
        border-left: 2px solid var(--bg-color, #f1f5f9);
        margin-top: 8px;
    }
    .dropdown-menu.show { display: block !important; }
    .dropdown-item { padding: 8px 10px; }
    /* 移动端商城按钮恢复普通链接样式 */
    .nav-link-shop, .nav-link-shop-outline {
        border: none !important;
        background: none !important;
        color: var(--text-color) !important;
        padding: 8px 0 !important;
        border-radius: 0 !important;
        font-weight: 500 !important;
    }
    .nav-link-shop.active, .nav-link-shop-outline.active {
        color: var(--primary-color) !important;
        border-bottom: 2px solid var(--primary-color) !important;
    }
}

/* 桌面端：商城按钮非选中态用描边 */
@media (min-width: 992px) {
    .nav-link-shop-outline {
        border: 1.5px solid var(--primary-color, #1a56db);
        color: var(--primary-color, #1a56db) !important;
        padding: 5px 16px !important;
        border-radius: 20px;
        font-weight: 600;
        transition: all 0.2s;
        border-bottom: 1.5px solid var(--primary-color, #1a56db) !important;
    }
    .nav-link-shop-outline:hover {
        background: var(--primary-color, #1a56db);
        color: var(--white) !important;
    }
}

/* 导航active分组高亮 */
.nav-dropdown.active-group > .dropdown-trigger {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ============================================================
   广告位（百度联盟，可配置开关）
   说明：仅当环境变量 BAIDU_UNION_ID 非空时，base.html 才会渲染 .ad-slot 容器；
        未配置时全站不输出任何广告 DOM，此样式在未启用时不产生任何影响。
   用户在百度联盟后台拿到广告位 JS 后，粘贴到 base.html 对应 .ad-slot-inner 内即可。
   ============================================================ */
.ad-slot {
    max-width: 1200px;          /* 与导航/容器同宽，居中对齐 */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}
.ad-slot-top {
    margin-top: 64px;           /* 顶部广告位避让 fixed 导航栏（高 64px） */
}
.ad-slot-bottom {
    margin-bottom: 8px;
}
.ad-slot-inner {
    min-height: 90px;           /* 横幅广告位预留高度，防止广告加载时页面抖动 */
    margin: 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
@media (max-width: 768px) {
    .ad-slot-inner {
        min-height: 60px;       /* 移动端横幅更矮 */
        margin: 12px 0;
    }
}
