/* ============================================================
   CSS 变量体系 —— 全局配色方案
   ============================================================ */
:root {
    --color-primary: #1E6FFF;
    --color-primary-hover: #1556CC;
    --color-primary-light: #EBF3FF;
    --color-accent: #FF6B35;
    --color-accent-hover: #E55A2B;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #5A5A5A;
    --color-text-tertiary: #8C8C8C;
    --color-bg-page: #F5F7FA;
    --color-bg-card: #FFFFFF;
    --color-border: #E4E7ED;
    --color-shadow: rgba(0, 0, 0, 0.06);
    --color-success: #52C41A;
    --color-warning: #FAAD14;
    --color-error: #F5222D;
}

/* ============================================================
   全局基础
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-y: scroll; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--color-bg-page);
    color: var(--color-text-primary);
    line-height: 1.6; min-height: 100vh;
    display: flex; flex-direction: column;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }

/* ============================================================
   顶部导航栏
   ============================================================ */
.topbar {
    width: 100%;
    background: var(--color-bg-card);
    height: 56px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 4px var(--color-shadow); top: 0; z-index: 100;
}
.topbar-inner {
    width: 100%; max-width: 1200px; padding: 0 15px;
    display: flex; align-items: center;
}
.topbar .logo {
    font-size: 20px; font-weight: bold; text-decoration: none;
    color: var(--color-primary);
}
.topbar .logo:hover { color: var(--color-primary-hover); }

/* 分类导航 */
.nav-categories {
    background: var(--color-bg-card);
    box-shadow: 0 1px 4px var(--color-shadow);
    display: flex; justify-content: center;
}
.nav-categories-inner {
    width: 100%; max-width: 1200px; padding: 0 15px;
    display: flex; flex-wrap: wrap; gap: 0;
}
.nav-categories a {
    display: inline-block; padding: 12px 16px;
    color: var(--color-text-primary); text-decoration: none;
    font-size: 14px; border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.nav-categories a:hover,
.nav-categories a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.nav-categories a.active { font-weight: bold; }

/* ============================================================
   面包屑导航
   ============================================================ */
.breadcrumb {
    width: 100%;
    margin: 10px 0;
    padding: 12px 16px;
    font-size: 13px; color: var(--color-text-tertiary); line-height: 1;
    background: var(--color-bg-card);
    border-radius: 6px;
}
.breadcrumb a { color: var(--color-primary); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary-hover); text-decoration: underline; }
.breadcrumb .breadcrumb-sep {
    margin: 0 10px;
    color: #777b82;
    user-select: none;
    font-weight: 800;
}
.breadcrumb .breadcrumb-current {
    color: var(--color-text-primary); font-weight: 500;
}

/* ============================================================
   主体布局
   ============================================================ */
.main-container {
    flex: 1;
    width: 100%; max-width: 1200px; margin: 15px auto; padding: 0 15px;
    display: flex; flex-wrap: wrap; gap: 5px 20px; align-items: flex-start;
}
.content-area { flex: 1; min-width: 0; min-height: 300px; }

/* ---- 页面主标题 H1（SEO：每页一个，置于面包屑/列表之上） ---- */
.site-h1 {
    font-size: 16px; font-weight: 500; line-height: 1.6;
    color: var(--color-text-secondary);
    background: var(--color-primary-light);
    padding: 10px 14px 6px; border-radius: 6px 6px 0 0;
    margin: 0;
}
.site-subtitle {
    font-size: 13px; line-height: 1.5;
    color: var(--color-text-secondary);
    background: var(--color-primary-light);
    padding: 0 14px 10px; border-radius: 0 0 6px 6px;
    margin: 0 0 16px;
}
.cat-h1 {
    font-size: 16px; font-weight: 500; line-height: 1.6;
    color: var(--color-text-secondary);
    background: var(--color-primary-light);
    padding: 10px 14px 6px; border-radius: 6px 6px 0 0;
    margin: 0;
}

/* ---- 相关驱动推荐（内链） ---- */
.related-articles { margin: 24px 0; padding: 16px; background: #fff; border: 1px solid var(--color-border); border-radius: 6px; }
.related-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--color-text-primary); }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { padding: 8px 0; border-bottom: 1px dashed var(--color-border); }
.related-list li:last-child { border-bottom: none; }
.related-list a { color: var(--color-primary); text-decoration: none; font-size: 14px; }
.related-list a:hover { color: var(--color-accent); text-decoration: underline; }
.sidebar { width: 300px; flex-shrink: 0; }

/* ============================================================
   文章卡片（分类列表页）
   ============================================================ */
.article-card {
    background: var(--color-bg-card); border-radius: 6px; padding: 0;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px var(--color-shadow);
    transition: box-shadow 0.2s;
}
.article-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.article-card-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; text-decoration: none; color: inherit;
}
.article-card-title {
    font-size: 16px; color: var(--color-text-primary); flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: flex; align-items: center; gap: 10px;
}
.article-card-title::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--color-primary); flex-shrink: 0;
}
.article-card:hover .article-card-title { color: var(--color-primary); }
.article-card-time {
    font-size: 13px; color: var(--color-text-tertiary); flex-shrink: 0; margin-left: 20px;
}

/* ============================================================
   分类列表卡片（左右布局 - 带摘要）
   ============================================================ */
.category-list-card {
    display: flex; align-items: center; gap: 20px;
    padding: 16px 20px;
}
.category-list-left {
    flex: 1; min-width: 0;
}
.category-list-link {
    text-decoration: none; color: inherit; display: block;
}
.category-list-title {
    font-size: 16px; color: var(--color-text-primary); font-weight: 600;
    display: flex; align-items: center; gap: 10px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.category-list-title::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--color-primary); flex-shrink: 0;
}
.category-list-card:hover .category-list-title { color: var(--color-primary); }
.category-list-meta { margin-top: 6px; }
.category-list-time {
    font-size: 13px; color: var(--color-text-tertiary);
}
.category-list-excerpt {
    margin-top: 8px;
    font-size: 14px; color: var(--color-text-secondary);
    line-height: 1.6;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.category-list-right { flex-shrink: 0; }

/* ============================================================
   侧边栏
   ============================================================ */
.sidebar-module {
    background: var(--color-bg-card); border-radius: 6px;
    padding: 16px; margin-bottom: 24px;
    box-shadow: 0 2px 8px var(--color-shadow);
}
.sidebar-module .sidebar-title {
    font-size: 16px; margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-text-primary);
}
.sidebar-module ul { list-style: none; padding: 0; margin: 0; }
.sidebar-module li {
    padding: 8px 0; border-bottom: 1px dashed var(--color-border);
    display: flex; align-items: center; gap: 8px;
}
.sidebar-module li:last-child { border-bottom: none; }
.sidebar-module a {
    color: var(--color-text-primary); text-decoration: none; font-size: 14px;
    flex: 1; min-width: 0;
}
.sidebar-module a:hover { color: var(--color-primary); }
.brand-slug {
    flex-shrink: 0; font-weight: bold; text-transform: uppercase;
    font-size: 11px; color: #d7d7d7;
}
.sidebar-module .layui-icon{
    font-size: 18px;
    color: #689af3;
    vertical-align: middle;
    margin-right: 4px;
}
.detail-title-tip .layui-icon {
    color: #16baaa;
    font-size: 14px;
    margin-right: 2px;
}
/* ============================================================
   文章详情页
   ============================================================ */
.article-detail {
    background: var(--color-bg-card); border-radius: 6px; padding: 10px;
    box-shadow: 0 2px 8px var(--color-shadow);
    overflow: hidden;
}
.page-article-detail{
    background: var(--color-bg-card); border-radius: 6px; padding: 30px;
    box-shadow: 0 2px 8px var(--color-shadow);
    overflow: hidden; 
}
/* 左图右文容器 */
.detail-cover-wrap {
    margin-top: 20px;
    border-top: 2px solid var(--color-border);
    padding-top: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: row; /* 封面在左、正文在右 */
    align-items: flex-start;
    gap: 24px;
}
.detail-cover {
    width: 300px; height: 300px;
    margin-bottom: 16px;
    margin-top: 45px;
    flex-shrink: 0;
    background-color: #fff;
}
.detail-cover img {
    display: block; width: 100%; height: 100%;
    object-fit: cover; border-radius: 4px;
    padding: 5px;
    border: 1px solid #eee;
}
.detail-body { flex: 1 1 auto; min-width: 0; }
.detail-body .detail-title {
    font-size: 24px; font-weight: bold; margin-bottom: 12px;
    color: var(--color-text-primary);
}
.detail-body .detail-meta {
    font-size: 13px; color: var(--color-text-tertiary);
    margin-bottom: 20px; padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}
.detail-body .detail-meta span { margin-right: 15px; }
.detail-body .detail-content {
    font-size: 16px; line-height: 1.8; color: var(--color-text-primary);
    word-break: break-all;
}
.detail-body .detail-content img {
    max-width: 100%; height: auto; border-radius: 4px;
}
.detail-body .detail-content p { margin-bottom: 15px; }
.detail-body .detail-content h2,
.detail-body .detail-content h3 {
    margin: 20px 0 10px; color: var(--color-text-primary);
}

/* ============================================================
   阅读全文折叠
   ============================================================ */
.article-content-wrapper {
    position: relative;
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
/* 展开状态 - 通过JS切换此类名 */
.article-content-wrapper.expanded {
    max-height: none;
    overflow: visible;
}
/* 未展开时的渐变遮罩 */
.article-content-wrapper:not(.expanded)::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--color-bg-card) 60%);
    pointer-events: none;
}
.read-more-container {
    text-align: left;
    padding: 16px 0 8px;
}
.read-more-container.hidden {
    display: none;
}
.read-more-btn {
    display: inline-block;
    padding: 8px 28px;
    font-size: 14px; font-weight: bold;
    color: var(--color-primary);
    background: transparent;
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.read-more-btn:hover {
    color: #fff;
    background: var(--color-primary);
}

/* ============================================================
   分页信息说明栏（SEO：每页首段文字不同）
   ============================================================ */
.page-info-bar {
    background: var(--color-primary-light);
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--color-text-secondary);
    text-align: center;
}
.page-info-bar strong {
    color: var(--color-primary);
}

/* ============================================================
   分页导航
   ============================================================ */
.pagination-wrapper { text-align: center; padding: 20px 0; }
.pagination {
    display: inline-flex; list-style: none; gap: 4px;
    align-items: center;
}
.pagination .page-link {
    display: block; padding: 6px 14px;
    border: 1px solid var(--color-border); border-radius: 4px;
    color: var(--color-text-primary); text-decoration: none;
    font-size: 14px; transition: all 0.2s;
}
.pagination .page-link:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.pagination .active .page-link,
.pagination .page-current {
    background: var(--color-primary); color: #fff;
    border-color: var(--color-primary);
    padding: 6px 14px; border-radius: 4px;
    font-size: 14px; font-weight: bold;
}
.pagination .page-ellipsis {
    padding: 6px 4px;
    font-size: 14px;
    color: var(--color-text-tertiary);
    user-select: none;
}
.pagination .disabled .page-link,
.pagination .page-link.disabled {
    color: var(--color-text-tertiary);
    cursor: not-allowed; pointer-events: none;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
    background: var(--color-text-primary); color: var(--color-text-tertiary);
    text-align: center; padding: 20px; font-size: 13px; margin-top: 0;
}
.footer a { color: var(--color-text-tertiary); text-decoration: none; }
.footer a:hover { color: #fff; }

/* ============================================================
   友情链接
   ============================================================ */
.friend-links {
    width: 100%;
    padding: 16px 0 0;
    margin-top: 20px;
    border-top: 1px solid var(--color-border);
    text-align: left;
    line-height: 2;
    font-size: 12px;
    color: var(--color-text-tertiary);
}
.friend-links-title {
    font-weight: 500;
    color: var(--color-text-primary);
}
.friend-links a {
    color: var(--color-text-tertiary);
    margin: 0 8px;
    white-space: nowrap;
    transition: color 0.2s;
    font-size: 12px;
}
.friend-links a:hover { color: var(--color-primary); }

/* ============================================================
   无数据
   ============================================================ */
.no-data {
    text-align: center; padding: 60px 20px;
    color: var(--color-text-tertiary);
    min-height: 280px;
    display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   品牌索引页（首页）
   ============================================================ */
/* 字母快速跳转栏 */
.brand-index-bar {
    background: var(--color-bg-card);
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px var(--color-shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.brand-index-bar .bar-hint {
    display: block; text-align: center;
    font-size: 13px; color: var(--color-text-secondary);
    margin-bottom: 8px;
}
.brand-index-bar .bar-hint::before {
    content: '🏷️';
    margin-right: 6px;
    font-style: normal;
}
.brand-index-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    margin: 0;
    padding: 0;
}
.brand-index-list li { flex-shrink: 0; }
.brand-index-list a {
    display: block;
    width: 36px; height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 4px;
    font-size: 25px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s;
}
.brand-index-list a:hover {
    background: var(--color-primary);
    color: #fff;
}

/* 品牌分组容器 */
.brand-group {
    background: var(--color-bg-card);
    border-radius: 6px;
    padding: 24px 28px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px var(--color-shadow);
    scroll-margin-top: 20px;
}
.brand-row {
    display: flex;
    align-items: flex-start;
}
.brand-letter {
    flex-shrink: 0;
    width: 50px;
    font-size: 32px;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
}
.brand-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    gap: 6px 16px;
}
.brand-list li { line-height: 1.5; }
.brand-list .brand-en { text-transform: uppercase; }
.brand-list a {
    display: block;
    padding: 4px 10px;
    font-size: 15px;
    color: var(--color-text-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}
.brand-list a:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* ============================================================
   驱动下载表格
   ============================================================ */
.detail-title-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.detail-title-row .detail-title {
    margin-bottom: 0; flex: 0 1 auto;
}
.detail-title-row > .detail-title-tip {
    margin: 0; flex: 0 0 auto;
}
.driver-section h3 {
    font-size: 18px; font-weight: bold; margin-bottom: 15px;
    border-left: 3px solid var(--color-primary);
    padding-left: 10px; color: var(--color-text-primary);
}
.driver-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
    table-layout: auto;
}
.driver-table thead th {
    background: var(--color-primary-light);
    padding: 12px; text-align: left;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-primary); font-weight: 600;
    word-break: break-word; white-space: normal;
}
.driver-table tbody td {
    padding: 12px; border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
    word-break: break-word; white-space: normal;
}
.driver-table tbody tr:hover { background: #dce8ff; }
.driver-table .download-col {
    position: relative;
    padding-left: 20px !important;
}
.driver-table .download-col::before {
    content: '';
    position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 1px;
    background: var(--color-border);
}
.download-btn {
    display: block; padding: 10px 24px; margin-bottom: 6px;
    background: var(--color-accent);
    color: #fff; text-decoration: none; border-radius: 4px;
    font-size: 14px; font-weight: bold; text-align: center;
    transition: background 0.2s;
    white-space: nowrap;
}
.download-btn:hover { background: var(--color-accent-hover); color: #fff; }
.thunder-btn {
    display: block; padding: 8px 24px;
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary); text-decoration: none;
    border-radius: 4px; font-size: 13px; text-align: center;
    transition: all 0.2s;
    white-space: nowrap;
}
.thunder-btn:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.backup-btn {
    display: block; padding: 8px 24px;
    background: transparent;
    border: 1px solid #ccc;
    color: #555; text-decoration: none;
    border-radius: 4px; font-size: 13px; text-align: center;
    transition: all 0.2s;
    white-space: nowrap;
}
.backup-btn:hover {
    border-color: #999;
    color: #333;
}
/* 下载按钮加载状态 */
.btn-spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    vertical-align: middle; margin-right: 4px;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.btn-loading {
    pointer-events: none; opacity: 0.8;
}
.backup-btn .btn-spinner {
    border-color: rgba(85,85,85,0.2);
    border-top-color: #555;
}
.no-driver {
    text-align: center; padding: 30px;
    color: var(--color-text-tertiary); font-size: 14px;
}

/* ============================================================
   评论区域
   ============================================================ */
.comment-section {
    background: var(--color-bg-card); border-radius: 6px;
    padding: 24px 30px; margin-top: 20px;
    box-shadow: 0 2px 8px var(--color-shadow);
}
.comment-title {
    font-size: 18px; font-weight: bold; margin-bottom: 18px;
    border-left: 3px solid var(--color-primary);
    padding-left: 10px; color: var(--color-text-primary);
}
.comment-list { margin-bottom: 10px; }
.comment-item {
    padding: 14px 0; border-bottom: 1px solid var(--color-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-item-inner {
    display: flex; gap: 12px; align-items: flex-start;
}
.comment-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-weight: bold; color: #fff; font-size: 16px;
    line-height: 1; user-select: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.comment-avatar-sm {
    width: 32px; height: 32px; font-size: 13px;
}
.comment-main { flex: 1; min-width: 0; }
.comment-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 6px;
}
.comment-nickname {
    font-weight: bold; font-size: 14px;
    color: var(--color-text-primary);
}
.comment-time {
    font-size: 12px; color: var(--color-text-tertiary);
}
.comment-body {
    font-size: 14px; color: var(--color-text-primary);
    line-height: 1.7; word-break: break-word;
}
.comment-empty {
    text-align: center; padding: 30px;
    color: var(--color-text-tertiary); font-size: 14px;
}
.comment-pagination { margin-top: 15px; }

/* 回复按钮 */
.comment-actions { margin-top: 8px; }
.reply-btn {
    background: none; border: 1px solid var(--color-border);
    color: var(--color-text-tertiary);
    padding: 3px 12px; border-radius: 3px; font-size: 12px;
    cursor: pointer; transition: all 0.2s;
}
.reply-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* 回复列表 */
.reply-list {
    margin-top: 10px; margin-left: 0;
    border-radius: 4px;
    padding: 0 14px;
}
/* 按深度缩进 + 渐进背景色 */
.reply-depth-1 {
    margin-left: 30px;
    background: var(--color-bg-page); /* #F5F7FA */
}
.reply-depth-2 {
    margin-left: 60px;
    background: #EDF0F5;              /* 比 depth-1 稍深 */
    border-radius: 4px;
}
.reply-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid var(--color-border);
}
.reply-item:last-child { border-bottom: none; }
.reply-item .comment-nickname { font-size: 13px; }
.reply-item .comment-time { font-size: 11px; }
.reply-item .comment-body {
    font-size: 13px; color: var(--color-text-secondary);
}

/* 回复表单 */
.reply-form-wrap {
    margin-top: 10px; margin-bottom: 10px;
}
.reply-form {
    background: var(--color-bg-page);
    border: 1px solid var(--color-border);
    border-radius: 4px; padding: 14px;
}
.reply-form .form-group { margin-bottom: 10px; }
.reply-form .form-input,
.reply-form .form-textarea {
    width: 100%; padding: 8px 10px;
    border: 1px solid var(--color-border); border-radius: 4px;
    font-size: 13px; font-family: inherit;
    transition: border-color 0.2s; outline: none; box-sizing: border-box;
}
.reply-form .form-input:focus,
.reply-form .form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}
.reply-form .form-textarea { resize: vertical; min-height: 60px; }
.reply-submit-btn { padding: 8px 20px; font-size: 13px; }
.reply-cancel-btn {
    padding: 8px 16px; margin-left: 8px; font-size: 13px;
    border: 1px solid var(--color-border); border-radius: 4px;
    background: var(--color-bg-card); color: var(--color-text-secondary);
    cursor: pointer; transition: all 0.2s;
}
.reply-cancel-btn:hover {
    color: var(--color-error);
    border-color: var(--color-error);
}

/* ============================================================
   评论表单
   ============================================================ */
.comment-form-section {
    background: var(--color-bg-card); border-radius: 6px;
    padding: 24px 30px; margin-top: 20px;
    box-shadow: 0 2px 8px var(--color-shadow);
}
.comment-form .form-group { margin-bottom: 16px; }
.comment-form label {
    display: block; margin-bottom: 6px; font-size: 14px;
    color: var(--color-text-secondary); font-weight: 500;
}
.comment-form .required { color: var(--color-error); }
.comment-form .form-input,
.comment-form .form-textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--color-border); border-radius: 4px;
    font-size: 14px; font-family: inherit;
    transition: border-color 0.2s; outline: none;
    box-sizing: border-box;
}
.comment-form .form-input:focus,
.comment-form .form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}
.comment-form .form-textarea { resize: vertical; min-height: 80px; }
.comment-submit-btn {
    padding: 10px 28px; font-size: 14px; border: none; border-radius: 4px;
    cursor: pointer; color: #fff;
    background: var(--color-primary);
    transition: background 0.2s;
}
.comment-submit-btn:hover { background: var(--color-primary-hover); }
.comment-submit-btn:disabled {
    background: var(--color-border);
    color: var(--color-text-tertiary);
    cursor: not-allowed;
}
.comment-message {
    padding: 10px 14px; border-radius: 4px; font-size: 14px; margin-top: 10px;
}
.comment-message-success {
    background: #f6ffed; color: var(--color-success);
    border: 1px solid #b7eb8f;
}
.comment-message-error {
    background: #fff2f0; color: var(--color-error);
    border: 1px solid #ffccc7;
}

/* ============================================================
   报错反馈（按钮 + 弹窗）
   ============================================================ */
.detail-body .detail-meta {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: nowrap; gap: 10px;
}
.detail-body .detail-meta .detail-meta-left {
    display: inline-flex; flex-wrap: wrap; gap: 15px;
    flex: 1 1 auto; min-width: 0;
}
.detail-body .detail-meta .detail-meta-left span { margin-right: 0; }
/* 报错反馈按钮：始终靠右、不收缩、不换行 */
.detail-body .detail-meta .feedback-btn-trigger {
    margin-left: auto; flex-shrink: 0; white-space: nowrap;
    align-self: center;
}

/* 弹窗遮罩 */
.feedback-modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.feedback-modal {
    width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    background: #fff; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    animation: feedbackFadeIn 0.2s ease;
}
@keyframes feedbackFadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.feedback-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid var(--color-border);
    font-size: 16px; font-weight: 600; color: var(--color-text-primary);
}
.feedback-modal-close {
    border: none; background: none; font-size: 22px; line-height: 1;
    color: var(--color-text-tertiary); cursor: pointer; padding: 0 4px;
}
.feedback-modal-close:hover { color: var(--color-error); }
.feedback-form { padding: 18px 20px 20px; }
.feedback-form .form-group { margin-bottom: 16px; }
.feedback-form label {
    display: block; margin-bottom: 6px; font-size: 14px;
    color: var(--color-text-secondary); font-weight: 500;
}
/* 适配 layui 输入框：确保宽度 */
.feedback-form .layui-input,
.feedback-form .layui-textarea,
.feedback-form .feedback-select {
    width: 100%; box-sizing: border-box;
}
.feedback-form .layui-textarea { resize: vertical; min-height: 80px; }
/* 原生 select 下拉框样式（避免 layui 隐藏原生 select） */
.feedback-select {
    height: 38px; padding: 0 30px 0 10px;
    border: 1px solid var(--color-border); border-radius: 4px;
    font-size: 14px; font-family: inherit;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 12px 12px;
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    cursor: pointer;
}
.feedback-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
    outline: none;
}
.feedback-form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 0; }
.feedback-form .comment-message { margin-top: 14px; }

/* ============================================================
   响应式（平板 + 移动端 ≤1024px）
   原则：仅在 ≤1024px 生效，PC 端（>1024px）完全不受影响
   ============================================================ */
@media (max-width: 1024px) {
    /* ---- 视口高度：dvh 防止移动浏览器地址栏伸缩时内容跳动 ---- */
    body { min-height: 100dvh; }

    /* ---- 全局触控优化：移除 300ms 点击延迟 ---- */
    a, button, [role="button"], input[type="submit"] { touch-action: manipulation; }

    /* ---- 顶部导航吸顶 ---- */
    .topbar {
        position: sticky; top: 0; z-index: 100;
    }

    /* ---- 触控热区 ≥ 44px ---- */
    .download-btn, .thunder-btn, .backup-btn {
        display: inline-flex; align-items: center; justify-content: center;
        min-height: 48px;
    }
    .pagination .page-link,
    .pagination .page-current {
        display: inline-flex; align-items: center; justify-content: center;
        min-width: 44px; min-height: 44px;
    }
    .reply-btn {
        min-height: 44px; min-width: 44px;
        padding: 8px 16px;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .comment-submit-btn, .read-more-btn {
        min-height: 44px; display: inline-flex; align-items: center;
    }
    .brand-index-list a {
        min-width: 44px; min-height: 44px;
        display: flex; align-items: center; justify-content: center;
    }

    /* ---- 驱动表格横向滚动（平板窄屏容错）---- */
    .driver-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }

    /* ---- 无障碍焦点样式 ---- */
    :focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
}

/* ============================================================
   响应式（手机端 ≤768px）— 在 ≤1024px 基础上进一步优化
   原则：所有规则仅在 ≤768px 生效，绝对不影响 PC 端布局
   ============================================================ */
@media (max-width: 768px) {
    /* ---- 布局 ---- */
    /* 用 clip 而非 hidden：clip 不创建滚动容器，不会破坏表格内部的 overflow-x:auto 嵌套横向滚动 */
    html { overflow-x: clip; }
    .main-container { flex-direction: column; }
    .sidebar { width: 100%; }
    .sidebar-module li { padding: 10px 0; }
    .sidebar-module a { display: block; padding: 6px 0; font-size: 15px; }
    .article-card { flex-direction: column; }

    /* ---- 顶部导航 - 吸顶 + 铺满视口 ---- */
    .topbar {
        position: sticky; top: 0;
        width: 100%; max-width: none;
        z-index: 100;
    }
    .nav-categories { width: 100%; max-width: none; }

    /* ---- 面包屑 - 全宽背景 ---- */
    .breadcrumb {
        width: auto; margin: 10px -15px 0 -15px;
        padding: 12px 16px;
        border-radius: 0; line-height: 2;
        font-size: 14px;
    }

    /* ---- 文章详情 ---- */
    .article-detail { padding: 15px; overflow: hidden; }
    .detail-cover-wrap { flex-direction: column; gap: 0; margin-top: 10px; padding-top: 10px; }
    .detail-cover { width: 100%; height: auto; margin: 0 0 16px 0; }
    .detail-cover img { height: auto; max-width: 300px; margin: 0 auto; display: block; }
    .detail-body .detail-title { font-size: 20px; }
    .detail-content { word-break: break-word; overflow-wrap: break-word; }
    .detail-body .detail-content { word-break: break-word; overflow-wrap: break-word; }
    .detail-body .detail-meta { flex-wrap: wrap; }
    .detail-body .detail-meta span { display: inline-block; margin-bottom: 4px; }
    .detail-title-tip { white-space: normal; font-size: 12px; }

    /* ---- 分类列表卡片 ---- */
    .category-list-card { flex-direction: column; align-items: stretch; padding: 14px 16px; }
    .category-list-right { margin-top: 10px; text-align: center; }
    .category-list-right .download-btn { display: inline-block; min-width: 100px; }
    .category-list-title { font-size: 15px; white-space: normal; }
    .category-list-excerpt { font-size: 13px; }
    .article-card-link { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px; }
    .article-card-title { white-space: normal; }
    .article-card-time { margin-left: 0; }

    /* ---- 驱动表格 - 横向滚动 ---- */
    .driver-table-wrap {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        /* 横向滑表格、纵向滑页面都放行，纵向手势会冒泡给页面 */
        touch-action: pan-x pan-y;
    }
    /* 表格内元素同样放行双方向，避免按钮的 touch-action 干扰 */
    .driver-table-wrap a,
    .driver-table-wrap td,
    .driver-table-wrap th {
        touch-action: pan-x pan-y;
    }
    .driver-table { min-width: 650px; font-size: 12px; }
    .driver-table thead th { padding: 8px 6px; font-size: 12px; white-space: nowrap !important; }
    .driver-table tbody td { padding: 8px 6px; font-size: 12px; }

    /* ---- 下载按钮 - 触控优化 ---- */
    .download-btn, .thunder-btn, .backup-btn {
        display: inline-flex; align-items: center; justify-content: center;
        min-height: 48px; padding: 10px 16px; font-size: 13px;
        white-space: normal; word-break: keep-all;
    }
    .thunder-btn, .backup-btn { padding: 8px 14px; font-size: 12px; min-height: 48px; }
    .download-icon { display: none; }

    /* ---- 品牌索引 ---- */
    .content-area { min-width: 0; }
    .brand-index-list { flex-wrap: nowrap; gap: 8px; }
    .brand-index-list li { flex-shrink: 0; }
    .brand-index-list a { width: 44px; height: 44px; line-height: 44px; font-size: 18px; }
    .brand-letter { font-size: 24px; width: 40px; }
    .brand-group { padding: 14px; }
    .brand-list a { font-size: 14px; padding: 6px 10px; overflow-wrap: break-word; word-break: break-word; }
    .brand-list li { max-width: 100%; }
    .brand-row { gap: 8px; }

    /* ---- 分页 - 触控优化 ---- */
    .pagination { flex-wrap: wrap; justify-content: center; }
    .page-link, .page-current {
        display: inline-flex; align-items: center; justify-content: center;
        min-width: 44px; min-height: 44px; padding: 6px 12px;
    }

    /* ---- 评论表单 ---- */
    .comment-form-section, .comment-section { padding: 16px 15px; }
    .comment-submit-btn, .read-more-btn { min-height: 44px; display: inline-flex; align-items: center; }
    .reply-btn { padding: 8px 16px; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }

    /* ---- 回复区域 - 缩进适配 ---- */
    .reply-depth-1 { margin-left: 0; }
    .reply-depth-2 { margin-left: 0; }
    .reply-form-wrap[style*="margin-left: 60px"] { margin-left: 0 !important; }
    .reply-form-wrap[style*="margin-left: 30px"] { margin-left: 0 !important; }
    .reply-list { margin-left: 0; padding: 0 10px; }

    /* ---- 全局移动端优化 ---- */
    a, button, [role="button"], input[type="submit"] { touch-action: manipulation; }
    :focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
}
