/* ============================================================
   移动端适配层 mobile.css v2.0
   加载于 style.css 之后，专门处理手机/小屏的自适应
   ============================================================ */

/* ---------- 平板（769~992px） ---------- */
@media (max-width: 992px) {
  .page-layout { flex-direction: column; }
  .page-sidebar { width: 100%; }
  .detail-body { flex-direction: column; }
  .detail-sidebar { width: 100%; }
  .detail-hero-inner { flex-direction: column; }
  .detail-hero-slides { width: 100%; height: 240px; }
  .collection-banner-body { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 手机（≤768px）核心适配 ---------- */
@media (max-width: 768px) {

  /* ===== 1. 全局：杜绝横向滚动 + 安全区 ===== */
  html, body {
    overflow-x: hidden;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
  }
  * {
    -webkit-tap-highlight-color: rgba(16, 142, 233, .12);
    box-sizing: border-box;
  }
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  .container { width: 100%; padding: 0 12px; }
  .main-content .container { padding-top: 14px; padding-bottom: 14px; }

  /* 富文本内容约束 */
  .detail-content-box img, .article-content img {
    max-width: 100% !important; height: auto; border-radius: 6px;
  }
  .detail-content-box iframe, .detail-content-box video,
  .detail-content-box embed, .detail-content-box object,
  .article-content iframe, .article-content video,
  .article-content embed, .article-content object {
    max-width: 100% !important;
  }
  .detail-content-box table, .article-content table {
    display: block; width: 100%; overflow-x: auto;
    -webkit-overflow-scrolling: touch; white-space: nowrap;
  }
  .detail-content-box pre, .article-content pre {
    overflow-x: auto; max-width: 100%;
  }
  img { max-width: 100%; height: auto; display: block; }

  /* ===== 2. iOS：输入控件16px防放大 ===== */
  input[type="text"], input[type="search"], input[type="url"],
  input[type="email"], input[type="tel"], input[type="password"],
  input[type="number"], textarea, select {
    font-size: 16px !important;
  }

  /* ===== 3. 顶部栏：手机端隐藏 ===== */
  .top-bar { display: none !important; }

  /* ===== 4. 头部：吸顶 + 紧凑 ===== */
  .header {
    position: sticky; top: 0; z-index: 500;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
  }
  .header-inner { height: 54px; gap: 8px; }
  .logo img { height: 30px; }
  .logo-text { font-size: 18px; letter-spacing: 0; }
  .header-search-btn {
    width: 34px; height: 34px; font-size: 14px; border-radius: 6px;
  }

  /* 导航菜单 */
  .nav-list {
    display: none !important;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fff;
    z-index: 1000;
    padding: 70px 0 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,.1);
  }
  .nav-list.show {
    display: flex !important;
    transform: translateX(0);
  }
  .nav-list li a {
    height: 52px; line-height: 52px;
    padding: 0 24px;
    font-size: 16px;
    border-bottom: 1px solid #f5f5f5;
    font-weight: 500;
  }
  .nav-list li a.active { color: #108ee9; }
  .nav-list li a.active::after { display: none; }
  .nav-mobile-btn {
    display: flex !important;
    align-items: center;
    height: 54px;
    padding: 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #108ee9;
    cursor: pointer;
    white-space: nowrap;
  }

  /* 导航遮罩层 */
  .nav-mask {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
  }
  .nav-mask.show { display: block; }

  /* 菜单关闭按钮 */
  .nav-close-item {
    list-style: none;
    border-bottom: 1px solid #f5f5f5;
  }
  .nav-close-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 52px;
    padding: 0 24px;
    font-size: 14px;
    color: #999;
    cursor: pointer;
    font-weight: 500;
  }
  .nav-close-btn:active { color: #108ee9; }

  /* ===== 5. Banner轮播 ===== */
  .banner-slider {
    height: auto !important;
    aspect-ratio: 2.4 / 1;
    min-height: 130px;
    border-radius: 8px;
    margin-bottom: 14px;
  }
  .banner-item { min-height: 0; height: 100%; }
  .banner-item img { min-height: 0; height: 100%; object-fit: cover; }
  .banner-arrow {
    width: 28px; height: 28px; font-size: 12px;
    background: rgba(0,0,0,.25);
  }
  .banner-prev { left: 6px; }
  .banner-next { right: 6px; }
  .banner-dots { bottom: 8px; gap: 4px; }
  .banner-dot { width: 6px; height: 6px; }
  .banner-dot.active { width: 16px; }

  /* ===== 6. 图标横滑区 ===== */
  .icon-scroll-section {
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 8px;
  }
  .icon-scroll-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    gap: 18px;
    margin-bottom: 10px;
    scrollbar-width: none;
  }
  .icon-scroll-tabs::-webkit-scrollbar { display: none; }
  .icon-scroll-tabs a {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 14px;
    padding-bottom: 6px;
  }
  .icon-scroll-row {
    gap: 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .icon-scroll-row::-webkit-scrollbar { display: none; }
  .icon-scroll-item { width: 62px; }
  .icon-scroll-item .icon-img {
    width: 50px; height: 50px;
    border-radius: 10px;
    margin-bottom: 6px;
  }
  .icon-scroll-item .icon-name { font-size: 11px; }

  /* ===== 7. 三栏布局区 ===== */
  .three-col-section {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }
  .three-col-box { padding: 14px; border-radius: 8px; }
  .three-col-box h3 { font-size: 15px; margin-bottom: 10px; }
  .editor-pick-card { padding: 14px; }
  .editor-pick-card .pick-cover { width: 72px; height: 72px; }
  .news-simple-list li { padding: 7px 0; }
  .news-simple-list .ns-title { font-size: 13px; }
  .hot-topic-list .ht-cover { height: 70px; }

  /* ===== 8. 卡片网格 ===== */
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
  .card-item { border-radius: 8px; }
  .card-item:hover { transform: none; box-shadow: none; }
  .card-cover { border-radius: 8px 8px 0 0; }
  .card-info { padding: 8px 6px; }
  .card-title { font-size: 13px; margin-bottom: 3px; }
  .card-meta { font-size: 10px; gap: 6px; }
  .card-btn {
    width: auto;
    display: inline-block;
    box-sizing: border-box;
    margin: 6px auto 0;
    padding: 4px 14px;
    font-size: 12px;
    min-height: 26px;
    line-height: 1.2;
  }
  .card-badge { font-size: 10px; padding: 1px 5px; top: 4px; left: 4px; }

  /* ===== 9. 带侧栏大区 ===== */
  .section-with-sidebar {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }
  .app-section {
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 8px;
  }
  .app-section-header {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
  }
  .app-section-title { font-size: 16px; }
  .app-section-cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .app-section-cats::-webkit-scrollbar { display: none; }
  .app-section-cats a {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 12px;
    padding: 4px 10px;
  }

  /* 侧栏组件 */
  .sidebar-widget {
    margin-bottom: 12px;
    border-radius: 8px;
  }
  .widget-title {
    padding: 12px 14px;
    font-size: 14px;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 8px;
  }
  .widget-title .more {
    font-size: 12px;
    color: #108ee9;
    font-weight: 400;
    margin-left: auto;
    flex-shrink: 0;
  }
  .widget-body { padding: 8px 14px; }
  .rank-list li { padding: 9px 0; gap: 10px; }
  .rank-num { width: 22px; height: 22px; line-height: 22px; font-size: 12px; }
  .rank-cover { width: 38px; height: 38px; border-radius: 6px; }
  .rank-cover img { width: 38px; height: 38px; }
  .rank-name { font-size: 13px; }
  .rank-views { font-size: 11px; }

  /* ===== 10. 合集大区 ===== */
  .collection-banner-section {
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 8px;
  }
  .collection-banner-header {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
  }
  .collection-banner-title { font-size: 16px; }
  .collection-banner-tabs a { padding: 5px 14px; font-size: 12px; }
  .collection-banner-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .collection-banner-big { height: 150px; border-radius: 8px; }
  .collection-banner-big .cbb-title {
    padding: 14px 12px 10px;
    font-size: 16px;
  }
  .collection-rank-list li { padding: 8px 0; gap: 10px; }
  .collection-rank-list .cr-num { font-size: 18px; width: 26px; }
  .collection-rank-list .cr-title { font-size: 13px; }
  .collection-rank-list .cr-date { font-size: 11px; }

  /* ===== 11. 两栏资讯 ===== */
  .two-col-news {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }
  .news-col-box { padding: 14px; border-radius: 8px; }

  /* ===== 12. 三列排行榜 ===== */
  .rank-three-col {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }
  .rank-col-box { border-radius: 8px; }
  .rank-col-header { padding: 12px 14px; font-size: 14px; }
  .rank-col-body { padding: 6px 14px; }
  .rank-col-body .rank-list li { padding: 9px 0; }

  /* ===== 13. 区块标题 ===== */
  .section-title {
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 2px 10px;
    margin-bottom: 12px;
  }
  .section-title h2 { font-size: 16px; gap: 6px; }
  .section-title h2::before { width: 3px; height: 16px; }
  .section-title .title-sub { font-size: 12px; margin-left: 4px; }
  .section-title .more { font-size: 12px; }

  /* ===== 14. 详情页 ===== */
  .detail-hero { padding: 14px 0; margin-bottom: 14px; }
  .breadcrumb {
    font-size: 12px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 12px !important;
  }
  .breadcrumb::-webkit-scrollbar { display: none; }
  .detail-hero-inner { gap: 14px; flex-direction: column; }
  .detail-hero-cover { width: 72px; height: 72px; border-radius: 10px; }
  .detail-hero-main { width: 100%; }
  .detail-hero-title {
    font-size: 18px;
    gap: 6px;
    flex-wrap: wrap;
    word-break: break-all;
    line-height: 1.4;
    margin-bottom: 8px;
  }
  .detail-hero-badge { padding: 2px 7px; font-size: 10px; }
  .detail-hero-meta {
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12px;
    margin-bottom: 6px;
  }
  .detail-hero-meta span { font-size: 12px; }
  .detail-hero-desc {
    font-size: 12px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.7;
  }
  .detail-hero-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .detail-hero-actions .btn-download-big {
    flex: 1;
    min-width: 140px;
    justify-content: center;
    padding: 11px 16px;
    font-size: 14px;
    min-height: 44px;
  }
  .detail-hero-actions .btn-like-outline {
    padding: 11px 14px;
    font-size: 13px;
    min-height: 44px;
  }
  .detail-hero-actions > span {
    font-size: 11px;
    width: 100%;
    color: #999;
  }
  .detail-hero-slides {
    width: 100%;
    height: 200px;
    border-radius: 8px;
  }
  .detail-hero-slides .slide-prev,
  .detail-hero-slides .slide-next {
    width: 28px; height: 28px;
    font-size: 13px;
  }
  .detail-hero-slides .slide-dots { bottom: 8px; gap: 4px; }
  .detail-hero-slides .slide-dot { width: 6px; height: 6px; }
  .detail-hero-slides .slide-dot.active { width: 16px; }

  /* 详情标签栏 */
  .detail-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px;
    scrollbar-width: none;
    border-radius: 8px 8px 0 0;
  }
  .detail-tabs::-webkit-scrollbar { display: none; }
  .detail-tabs a {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 12px 16px;
    font-size: 13px;
  }

  /* 详情内容 */
  .detail-content-box {
    padding: 16px 14px;
    margin-bottom: 12px;
    border-radius: 0 0 8px 8px;
  }
  .detail-content-box h3 {
    font-size: 15px;
    margin: 18px 0 10px;
    padding-left: 8px;
  }
  .detail-content-box h3:first-child { margin-top: 0; }
  .detail-content-box h4 { font-size: 14px; margin: 14px 0 8px; }
  .detail-content-box p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 10px;
  }
  .detail-content-box ul, .detail-content-box ol {
    padding-left: 18px;
    margin-bottom: 10px;
  }
  .detail-content-box li { font-size: 14px; margin-bottom: 4px; }

  /* 参数表 */
  .param-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .param-table th { width: 90px; font-size: 12px; padding: 8px 10px; }
  .param-table td { font-size: 12px; padding: 8px 10px; }

  /* 评分区 */
  .rating-box { padding: 12px; gap: 12px; flex-wrap: wrap; }
  .rating-box .rating-score { font-size: 28px; }
  .rating-stars { font-size: 16px; }

  /* 评论区 */
  .comment-section { padding: 16px 14px; margin-bottom: 12px; border-radius: 8px; }
  .comment-section h3 { font-size: 16px; margin-bottom: 12px; }
  .comment-form { padding: 12px; border-radius: 8px; margin-bottom: 18px; }
  .comment-form textarea { font-size: 14px; padding: 10px; height: 80px; }
  .comment-form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
  }
  .comment-form-row input { width: 100%; font-size: 14px; padding: 10px 12px; }
  .comment-form-row button {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }
  .comment-rating { gap: 10px; margin-bottom: 10px; }
  .star-rating { font-size: 22px; }
  .star-rating label { font-size: 22px; padding: 0 1px; }
  .comment-list .comment-item { padding: 12px 0; gap: 10px; }
  .comment-avatar { width: 36px; height: 36px; }
  .comment-nick { font-size: 13px; }
  .comment-time { font-size: 11px; }
  .comment-text { font-size: 14px; line-height: 1.7; }
  .comment-head { flex-wrap: wrap; gap: 6px; }

  /* 相关游戏卡片 */
  .related-game-card {
    flex-wrap: wrap;
    padding: 12px;
    gap: 12px;
    border-radius: 8px;
  }
  .related-game-card .rg-cover { width: 54px; height: 54px; border-radius: 8px; }
  .related-game-card .rg-info { flex: 1 1 100%; min-width: 0; }
  .related-game-card .rg-title { font-size: 14px; }
  .related-game-card .rg-meta { font-size: 11px; }
  .related-game-card .rg-btn {
    width: 100%;
    text-align: center;
    min-height: 40px;
    font-size: 13px;
  }

  /* 上下篇 */
  .article-nav { grid-template-columns: 1fr; gap: 10px; }
  .article-nav a { padding: 12px; font-size: 13px; border-radius: 8px; }

  /* ===== 15. 列表页 ===== */
  /* 分类页大标题 */
  .category-hero { padding: 18px 0; margin-bottom: 14px; text-align: center; }
  .category-hero h1 { font-size: 22px !important; margin-bottom: 6px; }
  .category-hero p { font-size: 13px; }
  .category-hero .count-num { font-size: 16px; }

  /* 分类筛选 */
  .category-filter-box { padding: 12px; margin-bottom: 14px; border-radius: 8px; }
  .category-filter-row {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px;
    margin-bottom: 8px;
    scrollbar-width: none;
    display: flex !important;
  }
  .category-filter-row::-webkit-scrollbar { display: none; }
  .category-filter-label { flex-shrink: 0; width: 50px; font-size: 12px; }
  .category-filter-row a {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 12px;
    padding: 4px 12px;
  }

  /* 分类页横向列表样式 */
  .category-list {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
  }
  .category-list .card-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px !important;
    background: #fff !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    box-shadow: none !important;
    transform: none !important;
    border: 1px solid #f0f0f0 !important;
  }
  .category-list .card-item > a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    flex-wrap: wrap !important;
  }
  .category-list .card-cover {
    width: 56px !important;
    height: 56px !important;
    aspect-ratio: auto !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .category-list .card-cover img {
    width: 56px !important;
    height: 56px !important;
    object-fit: cover !important;
  }
  .category-list .card-badge {
    top: 4px; left: 4px;
    font-size: 10px;
    padding: 1px 5px;
  }
  .category-list .card-info {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }
  .category-list .card-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: left !important;
    margin-bottom: 4px !important;
  }
  .category-list .card-meta {
    justify-content: flex-start !important;
    font-size: 12px !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
  }
  .category-list .card-btn {
    width: auto !important;
    display: inline-block !important;
    margin: 6px 0 0 !important;
    padding: 4px 16px !important;
    font-size: 12px !important;
    text-align: center !important;
    min-height: 28px !important;
    line-height: 1.4 !important;
    border-radius: 4px !important;
  }

  /* 排行榜页 */
  .rank-hero {
    padding: 28px 0;
    margin-bottom: 14px;
    border-radius: 8px;
  }
  .rank-hero h1 { font-size: 26px; margin-bottom: 6px; }
  .rank-hero p { font-size: 13px; }
  .rank-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
    padding: 5px;
    margin-bottom: 14px;
    scrollbar-width: none;
  }
  .rank-tabs::-webkit-scrollbar { display: none; }
  .rank-tabs a {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 9px 16px;
    font-size: 14px;
  }

  /* 排行榜大列表 */
  .rank-big-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }
  .rank-big-num {
    flex-shrink: 0;
    width: 32px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
  }
  .rank-big-cover {
    width: 54px !important;
    height: 54px !important;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .rank-big-cover img {
    width: 54px !important;
    height: 54px !important;
    object-fit: cover;
  }
  .rank-big-info { flex: 1; min-width: 0; }
  .rank-big-title { font-size: 14px; margin-bottom: 4px; }
  .rank-big-meta {
    font-size: 11px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
  }
  .rank-big-desc {
    font-size: 11px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }
  .rank-big-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
  .rank-big-tag { font-size: 10px; padding: 2px 7px; border-radius: 4px; }
  .rank-big-btn {
    flex-shrink: 0;
    padding: 5px 16px;
    font-size: 12px;
    text-align: center;
    min-height: 28px;
    line-height: 1.2;
    width: auto;
    display: inline-block;
    margin-top: 8px;
    border-radius: 4px;
  }

  /* 合集列表 */
  .collection-list-item {
    flex-direction: column;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
  }
  .collection-list-cover {
    width: 100%;
    height: 150px;
    border-radius: 8px;
  }
  .collection-list-cover img { width: 100%; height: 100%; object-fit: cover; }
  .collection-list-info { width: 100%; margin-top: 10px; }
  .collection-list-title { font-size: 15px; margin-bottom: 6px; }
  .collection-list-desc { font-size: 12px; margin-bottom: 8px; }
  .collection-list-meta {
    font-size: 11px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }
  .collection-list-btn {
    display: inline-block;
    padding: 4px 16px;
    font-size: 12px;
    min-height: 28px;
    line-height: 1.2;
    width: auto;
  }

  /* 资讯列表 - 横向紧凑布局 */
  .news-list li {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  .news-list li:last-child { border-bottom: none; }
  .news-thumb {
    width: 100px !important;
    height: 75px !important;
    border-radius: 6px;
    flex-shrink: 0;
  }
  .news-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .news-body { flex: 1; min-width: 0; width: auto; }
  .news-title { font-size: 14px; margin-bottom: 4px; font-weight: 600; line-height: 1.4; }
  .news-summary {
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .news-meta {
    font-size: 11px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
  }
  .news-read-btn {
    display: inline-block;
    padding: 4px 14px;
    font-size: 12px;
    min-height: 26px;
    line-height: 1.2;
    width: auto;
  }

  /* 文章详情 */
  .article-detail { padding: 20px 14px; border-radius: 8px; }
  .article-title { font-size: 20px; margin-bottom: 12px; line-height: 1.4; }
  .article-meta { font-size: 12px; gap: 10px; margin-bottom: 18px; padding-bottom: 12px; }
  .article-content { font-size: 14px; line-height: 1.9; }
  .article-content p { margin-bottom: 12px; }
  .article-content img { margin: 12px auto; border-radius: 8px; }
  .article-content h2, .article-content h3 { margin: 18px 0 10px; }

  /* ===== 16. 搜索页 ===== */
  .search-page-box { padding: 14px; margin-bottom: 12px; border-radius: 8px; }
  .search-page-form { flex-wrap: wrap; gap: 8px; }
  .search-page-input {
    width: 100%;
    flex: none;
    font-size: 16px;
    padding: 10px 12px;
    min-height: 44px;
  }
  .search-page-select {
    flex: 1;
    height: 44px;
    font-size: 14px;
  }
  .search-page-btn {
    flex: 1;
    height: 44px;
    padding: 0;
    font-size: 14px;
    min-height: 44px;
  }
  .search-result-count { font-size: 12px; margin-bottom: 10px; }
  .search-result-item { padding: 14px; margin-bottom: 10px; border-radius: 8px; }
  .search-result-inner { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
  .search-result-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .search-result-cover img { width: 60px; height: 60px; object-fit: cover; }
  .search-result-body { flex: 1; min-width: 0; }
  .search-result-title { font-size: 14px; margin-bottom: 4px; }
  .search-result-desc { font-size: 12px; line-height: 1.6; }
  .search-result-meta {
    font-size: 11px;
    margin-top: 6px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .search-type-tag { font-size: 10px; padding: 1px 7px; margin-right: 6px; }
  .search-empty { padding: 40px 16px; border-radius: 8px; }
  .search-empty-icon { font-size: 42px; margin-bottom: 10px; }
  .search-empty-title { font-size: 15px; margin-bottom: 6px; }
  .search-empty-tip { font-size: 12px; }

  /* 搜索弹窗 */
  .search-modal { padding: 60px 12px 0; }
  .search-modal-box { padding: 14px; border-radius: 8px; }
  .search-modal-box form { flex-wrap: wrap; gap: 8px; }
  .search-modal-box input[type="text"] {
    width: 100%;
    flex: none;
    height: 44px;
    font-size: 16px;
  }
  .search-modal-box select { flex: 1; height: 44px; }
  .search-modal-box button { flex: 1; height: 44px; padding: 0; font-size: 14px; }

  /* ===== 17. 分页 ===== */
  .pagination { gap: 6px; margin: 18px 0; flex-wrap: wrap; }
  .pagination a, .pagination span {
    min-width: 38px;
    height: 38px;
    line-height: 36px;
    padding: 0 10px;
    text-align: center;
    font-size: 13px;
    border-radius: 6px;
  }

  /* ===== 18. 标签云 ===== */
  .tag-cloud { gap: 8px; }
  .tag-cloud a { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

  /* 分类标签 */
  .cat-tabs { gap: 8px; margin-bottom: 14px; }
  .cat-tabs a { padding: 7px 14px; font-size: 13px; border-radius: 6px; }

  /* ===== 19. 友情链接 + 底部 ===== */
  .friend-links { padding: 14px 0; }
  .friend-links-title { font-size: 13px; margin-bottom: 8px; }
  .friend-links-list { gap: 10px; }
  .friend-links-list a { font-size: 12px; }

  .footer { padding-top: 20px; border-radius: 0; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding-bottom: 18px;
  }
  .footer-col h4 { font-size: 14px; margin-bottom: 10px; }
  .footer-col p { font-size: 12px; line-height: 1.7; }
  .footer-col ul li { margin-bottom: 6px; }
  .footer-col ul li a { font-size: 12px; }
  .footer-bottom {
    padding: 14px 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    font-size: 11px;
  }
  .footer-bottom p { margin-bottom: 4px; line-height: 1.6; }

  /* ===== 20. 移动端底部导航栏（新增） ===== */
  .mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 600;
    box-shadow: 0 -2px 10px rgba(0,0,0,.04);
  }
  .mobile-bottom-nav.show { display: flex; }
  .mobile-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 56px;
    color: #999;
    font-size: 10px;
    text-decoration: none;
    transition: color .2s;
    gap: 2px;
  }
  .mobile-bottom-nav a .nav-icon {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 2px;
  }
  .mobile-bottom-nav a.active { color: #108ee9; }
  .mobile-bottom-nav a:active { background: #f5f6f8; }

  /* ===== 21. 详情页吸底下载栏（新增） ===== */
  .detail-download-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 550;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    align-items: center;
    gap: 10px;
  }
  .detail-download-bar.show { display: flex; }
  .detail-download-bar .ddb-cover {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
  }
  .detail-download-bar .ddb-cover img {
    width: 40px;
    height: 40px;
    object-fit: cover;
  }
  .detail-download-bar .ddb-info {
    flex: 1;
    min-width: 0;
  }
  .detail-download-bar .ddb-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
  }
  .detail-download-bar .ddb-meta {
    font-size: 11px;
    color: #999;
  }
  .detail-download-bar .ddb-btn {
    flex-shrink: 0;
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    background: linear-gradient(135deg, #108ee9, #0e7ad1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(16,142,233,.3);
  }
  .detail-download-bar .ddb-btn:active { opacity: .85; }

  /* 有吸底下载栏时，隐藏底部导航栏，避免重叠 */
  body.has-download-bar .mobile-bottom-nav {
    display: none !important;
  }

  /* 有吸底下载栏时，body底部padding加大 */
  body.has-download-bar {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  /* ===== 22. 回到顶部按钮 ===== */
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    right: 14px;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(16,142,233,.3);
  }

  /* ===== 23. 空状态/错误页 ===== */
  .empty-state, .error-page, .search-empty {
    padding: 40px 16px;
    border-radius: 8px;
  }
  .empty-state-icon { font-size: 42px; margin-bottom: 10px; }
  .empty-state-title { font-size: 15px; margin-bottom: 6px; }
  .empty-state-tip { font-size: 12px; }
  .error-page .error-code { font-size: 56px; margin-bottom: 12px; }
  .error-page .error-title { font-size: 18px; margin-bottom: 6px; }
  .error-page .error-desc { font-size: 13px; margin-bottom: 20px; }
  .error-actions { gap: 10px; flex-wrap: wrap; }
  .error-actions a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 0 24px;
  }

  /* ===== 24. 通用页面布局 ===== */
  .page-layout { flex-direction: column; gap: 14px; }
  .page-main { min-width: 0; }
  .page-sidebar { width: 100%; }

  /* ===== 25. 触控目标≥44px ===== */
  .btn-download-big, .btn-like-outline, .card-btn, .rank-big-btn,
  .search-page-btn, .news-read-btn, .collection-list-btn, .pick-btn, .rg-btn,
  .header-search-btn, .search-modal-box button, .pagination a, .pagination span,
  .error-btn, .error-btn-outline, .nav-mobile-btn, .mobile-bottom-nav a,
  .detail-download-bar .ddb-btn {
    min-height: 44px;
    line-height: 1.2;
  }
  .star-rating label { padding: 6px 3px; }

  /* ===== 26. 横向滚动条隐藏 ===== */
  .icon-scroll-row, .icon-scroll-tabs, .category-filter-row,
  .detail-tabs, .rank-tabs, .breadcrumb, .news-meta, .param-table,
  .app-section-cats {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .icon-scroll-row::-webkit-scrollbar, .icon-scroll-tabs::-webkit-scrollbar,
  .category-filter-row::-webkit-scrollbar, .detail-tabs::-webkit-scrollbar,
  .rank-tabs::-webkit-scrollbar, .breadcrumb::-webkit-scrollbar,
  .app-section-cats::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
  }

  /* ===== 27. 内联样式兜底覆盖 ===== */
  /* 6列grid -> 2列 */
  .detail-content-box .card-grid[style*="grid-template-columns:repeat(6"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* 3列grid -> 2列 */
  .sidebar-widget .card-grid[style*="grid-template-columns:repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* 2列grid -> 1列 */
  .detail-content-box [style*="grid-template-columns:repeat(2"],
  .article-detail [style*="grid-template-columns:repeat(2"] {
    grid-template-columns: 1fr !important;
  }
  /* 合集页3列grid -> 1列 */
  .container > [style*="grid-template-columns:repeat(3"],
  .section-title + [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  /* flex容器强制换行 */
  .detail-content-box [style*="display:flex"][style*="gap:14px"],
  .category-hero [style*="display:flex"][style*="gap:24px"] {
    flex-wrap: wrap;
  }
  .detail-content-box [style*="display:flex"][style*="gap:14px"] > [style*="width:120px"],
  .category-hero [style*="display:flex"][style*="gap:24px"] > [style*="width:200px"] {
    width: 100% !important;
    height: 130px !important;
    max-width: 100% !important;
  }
  /* 资讯缩略图内联宽度覆盖 */
  .news-list .news-thumb[style*="width:120px"] {
    width: 100% !important;
    height: 160px !important;
  }
  /* tag-filter-bar垂直排列 */
  .tag-filter-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .tag-filter-bar h1 { font-size: 16px !important; }
  .tag-filter-bar > div[style*="display:flex"] {
    flex-wrap: wrap;
    width: 100%;
  }
  /* rank-tabs max-width取消 */
  .rank-tabs[style*="max-width"] { max-width: 100% !important; }
  /* 合集列表小图标横向滚动 */
  .collection-list-item [style*="display:flex"][style*="gap:8px"] {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .collection-list-item [style*="display:flex"][style*="gap:8px"] > a {
    flex-shrink: 0;
  }
  .collection-list-item [style*="width:44px"] {
    width: 44px !important;
    flex-shrink: 0;
  }
}

/* ---------- 大屏手机 / 横屏（481~768px）：卡片恢复3列 ---------- */
@media (min-width: 481px) and (max-width: 768px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .detail-content-box .card-grid[style*="grid-template-columns:repeat(6"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ---------- 超小屏（≤480px） ---------- */
@media (max-width: 480px) {
  .container { padding: 0 10px; }
  .logo-text { font-size: 17px; }
  .detail-hero-title { font-size: 17px; }
  .detail-hero-cover { width: 64px; height: 64px; }
  .card-grid { gap: 8px; }
  .card-info { padding: 7px 5px; }
  .card-title { font-size: 12px; }
  .card-meta { font-size: 10px; gap: 4px; }
  .icon-scroll-item { width: 56px; }
  .icon-scroll-item .icon-img { width: 46px; height: 46px; }
  .icon-scroll-item .icon-name { font-size: 10px; }
  .rank-big-cover { width: 48px !important; height: 48px !important; }
  .rank-big-cover img { width: 48px !important; height: 48px !important; }
  .rank-big-num { font-size: 18px; width: 28px; }
  .search-result-cover { width: 54px; height: 54px; }
  .search-result-cover img { width: 54px; height: 54px; }
  .news-thumb { height: 150px !important; }
  .collection-list-cover { height: 130px; }
  .btn-download-big { font-size: 13px; padding: 10px 18px; }
  .detail-hero-slides { height: 180px; }
  .banner-slider { aspect-ratio: 2.2 / 1; min-height: 120px; }
  .mobile-bottom-nav a { font-size: 10px; }
  .mobile-bottom-nav a .nav-icon { font-size: 18px; }
  .detail-download-bar .ddb-cover { width: 36px; height: 36px; }
  .detail-download-bar .ddb-cover img { width: 36px; height: 36px; }
  .detail-download-bar .ddb-btn { padding: 0 16px; height: 38px; line-height: 38px; font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
  .section-title h2 { font-size: 15px; }
  .app-section-title { font-size: 15px; }
  .collection-banner-title { font-size: 15px; }
}

/* ---------- 超小屏（≤360px） ---------- */
@media (max-width: 360px) {
  .container { padding: 0 8px; }
  .logo-text { font-size: 16px; }
  .detail-hero-title { font-size: 16px; }
  .detail-hero-cover { width: 60px; height: 60px; }
  .card-grid { gap: 7px; }
  .card-title { font-size: 11px; }
  .card-meta { font-size: 9px; }
  .icon-scroll-item { width: 52px; }
  .icon-scroll-item .icon-img { width: 42px; height: 42px; }
  .rank-big-cover { width: 44px !important; height: 44px !important; }
  .rank-big-cover img { width: 44px !important; height: 44px !important; }
  .rank-big-num { font-size: 16px; width: 26px; }
  .search-result-cover { width: 50px; height: 50px; }
  .search-result-cover img { width: 50px; height: 50px; }
  .btn-download-big { min-width: 0; width: 100%; }
  .detail-hero-actions .btn-download-big { min-width: 120px; }
  .news-thumb { height: 140px !important; }
  .collection-list-cover { height: 120px; }
  .detail-hero-slides { height: 170px; }
  .banner-slider { aspect-ratio: 2 / 1; min-height: 110px; }
  .mobile-bottom-nav a .nav-icon { font-size: 17px; }
  .mobile-bottom-nav a { font-size: 9px; }
  .detail-download-bar .ddb-title { font-size: 12px; }
  .detail-download-bar .ddb-meta { font-size: 10px; }
  .detail-download-bar .ddb-btn { padding: 0 14px; height: 36px; line-height: 36px; font-size: 12px; }
  .pagination a, .pagination span { min-width: 34px; height: 34px; line-height: 32px; font-size: 12px; }
  .back-to-top { width: 36px; height: 36px; font-size: 14px; }
}
