/* ============================================================
 * articles-m.css — 仅 articles.html 引用
 * 移动端游戏资讯页（≤767px）：m-* 专用结构，桌面零改动
 * 依赖：articles.css（桌面布局，ar-* 全局类在移动端复用重排版）
 * ============================================================ */

.m-top, .m-hero, .m-chips, .m-sec--articles, .m-sec--side, .m-footer, .m-tabbar, .m-drawer { display: none; }

@media (max-width: 767px) {
  /* 隐藏桌面结构（本文件仅资讯页加载） */
  .ag-header,
  .ar-hero,
  .ar-chips,
  .ar-main,
  .game-footer { display: none !important; }

  body.ag-page { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }

  .m-top { display: block; }
  .m-hero, .m-chips, .m-sec--articles, .m-sec--side { display: block; }
  .m-tabbar { display: flex; }

  /* ---------- 顶栏 ---------- */
  .m-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 8px;
  }
  .m-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
  .m-logo img { height: 40px; }
  .m-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
  .m-logo-text b {
    font-size: 19px; color: #ffcc00; letter-spacing: 2px; font-weight: 800;
    text-shadow: 0 0 14px rgba(255, 204, 0, .45);
  }
  .m-logo-text i { font-style: normal; font-size: 9.5px; color: #9a93a8; letter-spacing: 2.5px; }
  .m-topbar-actions { display: flex; gap: 8px; }
  .m-ico-btn {
    width: 40px; height: 40px; border-radius: 11px;
    background: #17171f; border: 1px solid #2b2b36; color: #e8e8f0;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .m-ico-btn--gold {
    background: linear-gradient(160deg, #ffd54a, #ffaa00);
    border-color: transparent; color: #1a1206;
    box-shadow: 0 2px 10px rgba(255, 170, 0, .35);
  }

  /* ---------- 搜索框 ---------- */
  .m-search {
    display: flex; align-items: center; gap: 8px;
    margin: 2px 14px 10px; padding: 0 12px;
    height: 38px; border-radius: 11px;
    background: #14141b; border: 1px solid #2b2b36; color: #8a8a96;
  }
  .m-search input {
    flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
    color: #f0f0f5; font-size: 14px;
  }
  .m-search input::placeholder { color: #6b6b78; }
  .m-search button {
    background: transparent; border: 0; color: #ffcc00;
    font-size: 14px; font-weight: 700; cursor: pointer; padding: 4px 2px;
  }

  /* ---------- 分类导航条 ---------- */
  .m-catnav {
    display: flex; align-items: stretch;
    padding: 6px 10px 10px; gap: 4px;
    border-bottom: 1px solid #1d1d26;
  }
  .m-catnav a {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 0; border-radius: 11px; text-decoration: none;
    color: #c9c9d4; font-size: clamp(10.5px, 3.1vw, 12px); font-weight: 600;
  }
  .m-catnav a span { white-space: nowrap; }
  .m-catnav a svg { width: 21px; height: 21px; }
  .m-catnav a.active {
    background: linear-gradient(160deg, #ffd54a, #ffaa00);
    color: #1a1206; font-weight: 800;
    box-shadow: 0 2px 10px rgba(255, 170, 0, .3);
  }

  /* ---------- 抽屉菜单 ---------- */
  .m-drawer {
    display: none;
    position: fixed; z-index: 90;
    top: 64px; right: 14px; min-width: 148px;
    background: #17171f; border: 1px solid #2b2b36; border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .6);
    overflow: hidden;
  }
  .m-drawer.open { display: block; }
  .m-drawer a {
    display: block; padding: 11px 18px; color: #d8d8e2;
    font-size: 14px; text-decoration: none; border-bottom: 1px solid #22222c;
  }
  .m-drawer a:last-child { border-bottom: 0; }
  .m-drawer a:active { background: #20202b; color: #ffcc00; }

  /* ---------- Hero（怀旧游戏攻略与资讯） ---------- */
  .m-hero--articles {
    position: relative;
    margin: 12px 12px 0;
    border-radius: 14px; overflow: hidden;
    border: 1px solid rgba(255, 170, 0, .3);
    background:
      linear-gradient(90deg, rgba(8, 8, 16, .92) 0%, rgba(8, 8, 16, .55) 55%, rgba(8, 8, 16, .25) 100%),
      url('../images/articles/hero-scene.jpg') center right / cover no-repeat,
      #0a0a0f;
  }
  .m-hero-txt { position: relative; z-index: 2; padding: 20px 16px 18px; }
  .m-hero-txt h1 {
    margin: 0; color: #ffcc00; font-size: 21px; font-weight: 900; letter-spacing: 1.5px;
    text-shadow: 0 0 16px rgba(255, 170, 0, .45);
  }
  .m-hero-txt .en {
    margin: 5px 0 0; color: #8a8a96; font-size: 10px; letter-spacing: 2.5px;
  }
  .m-hero-txt .desc {
    margin: 9px 0 0; color: #c9c9d4; font-size: 12px; line-height: 1.7;
  }

  /* ---------- 分类筛选 chips（复用 ar-chip，紧凑化） ---------- */
  .m-chips {
    display: flex; gap: 8px;
    margin: 12px 12px 0;
    overflow-x: auto; padding-bottom: 2px;
    scrollbar-width: none;
  }
  .m-chips::-webkit-scrollbar { display: none; }
  .m-chips .ar-chip {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 13px; border-radius: 10px;
    background: #14141b; border: 1px solid #2b2b36;
    color: #c9c9d4; font-size: 12.5px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
  }
  .m-chips .ar-chip .ic svg { width: 14px; height: 14px; }
  .m-chips .ar-chip.active {
    background: linear-gradient(160deg, #ffd54a, #ffaa00);
    border-color: transparent; color: #1a1206; font-weight: 800;
    box-shadow: 0 2px 10px rgba(255, 170, 0, .3);
  }

  /* ---------- 文章列表（置顶大卡 + 行卡） ---------- */
  .m-sec--articles { margin: 13px 12px 0; }

  .m-sec--articles .ar-feat {
    display: flex; flex-direction: column;
    margin-bottom: 12px; padding: 0;
    border-radius: 14px; overflow: hidden;
    background: linear-gradient(155deg, #16161e, #101016);
    border: 1px solid rgba(255, 170, 0, .35);
    cursor: pointer;
  }
  .m-sec--articles .ar-feat-img {
    position: relative; width: 100%; height: auto;
    aspect-ratio: 16 / 8.5;
    background: #14141b;
  }
  .m-sec--articles .ar-feat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .m-sec--articles .ar-feat-arrow { display: none; }
  .m-sec--articles .ar-feat-body { padding: 12px 13px 13px; }
  .m-sec--articles .ar-feat-body h3 { font-size: 15.5px; line-height: 1.45; }
  .m-sec--articles .ar-feat-body p {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 12px; line-height: 1.7; margin-top: 6px;
  }
  .m-sec--articles .ar-feat-body .ar-row-meta { margin-top: 9px; }

  .m-sec--articles .ar-row {
    display: flex; flex-direction: row; align-items: stretch; gap: 11px;
    padding: 10px; margin-bottom: 10px;
    border-radius: 13px;
    background: linear-gradient(150deg, #15151d, #101016);
    border: 1px solid #23232d;
    cursor: pointer;
  }
  .m-sec--articles .ar-row-img {
    position: relative; width: 118px; flex: 0 0 118px; height: auto;
    min-height: 88px; border-radius: 10px; overflow: hidden;
    background: #14141b; align-self: center;
  }
  .m-sec--articles .ar-row-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .m-sec--articles .ar-row-body { flex: 1; min-width: 0; padding: 0; }
  .m-sec--articles .ar-row-body h3 {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 14px; line-height: 1.45;
  }
  .m-sec--articles .ar-row-body .summary {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 11.5px; line-height: 1.6; margin-top: 4px;
  }
  .m-sec--articles .ar-row-meta { margin-top: 6px; font-size: 10.5px; gap: 8px; }

  .m-ar-empty { padding: 34px 0; text-align: center; color: #7d7d8a; font-size: 13px; }
  .m-ar-empty .big { font-size: 34px; margin-bottom: 8px; }
  .m-ar-empty.hidden { display: none; }

  .m-sec--articles .pg-pagination { margin-top: 14px; }

  /* ---------- 侧栏区块（热门文章 / 热门标签 / 推荐阅读） ---------- */
  .m-sec--side { margin: 20px 12px 0; }
  .m-sec-head { padding: 0 2px; margin-bottom: 10px; }
  .m-sec-head h2 {
    margin: 0; display: flex; align-items: center; gap: 8px;
    color: #f2f2f5; font-size: 16.5px; font-weight: 800;
  }
  .m-sec-head .h-ic { display: inline-flex; align-items: center; }
  .m-sec-head .h-ic svg { width: 19px; height: 19px; }
  .m-sec-head .h-ic.flame { color: #ff7a1a; }
  .m-sec-head .h-ic.tagico { color: #ffcc00; }
  .m-sec-head .h-ic.bookico { color: #ff5f5d; }
  .m-sec-head .h-en {
    display: block; margin: 4px 0 0 27px;
    color: #6b6b78; font-size: 10px; letter-spacing: 2px;
  }

  .m-side-card {
    padding: 4px 13px;
    border-radius: 13px;
    background: linear-gradient(150deg, #15151d, #101016);
    border: 1px solid #23232d;
  }
  .m-side-card .ar-tags { padding: 9px 0; }

  /* ---------- 简化页脚 ---------- */
  .m-footer {
    display: block;
    margin-top: 22px; padding: 16px 14px 18px;
    border-top: 1px solid #1d1d26; text-align: center;
  }
  .m-footer p { margin: 0 0 6px; }
  .m-footer-copy { color: #7d7d8a; font-size: 11.5px; }
  .m-footer-links { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 !important; }
  .m-footer-links a { color: #9a9aa6; font-size: 11.5px; text-decoration: none; }
  .m-footer-links span { color: #33333e; }

  /* ---------- 底部 TabBar（首页/分类/排行/主机/我的） ---------- */
  .m-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    height: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(14, 14, 20, .96);
    border-top: 1px solid #23232d;
    backdrop-filter: blur(10px);
  }
  .m-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: #8a8a96; font-size: 11px; text-decoration: none;
  }
  .m-tabbar a svg { width: 22px; height: 22px; }
  .m-tabbar a.active { color: #ffcc00; font-weight: 700; }
}
