/* ============================================================
   3QYYDS 主题 · responsive.css — 响应式（统一列数，等比缩放）
   核心原则：PC/笔记本/平板均固定 6 列，仅通过 1fr 自动分配宽度。
   手机竖屏(≤640px)降为 3 列（否则海报过窄不可读）。
   ============================================================ */

/* ── 断点1：笔记本 / 平板横屏（≤1200px）── */
@media (max-width: 1200px) {
  /* Hero：高度收窄 */
  .qy-hero { height: 440px; }
  .qy-hero__info { right: 28px; max-width: 260px; }
  .qy-hero__title { font-size: 22px; }

  /* Hero 缩略图：等比缩小但仍显示约 6 个 */
  .qy-hero__thumbs { max-width: 600px; gap: 6px; }
  .qy-hero__thumb-track { max-width: calc(6 * 85px + 5 * 8px); }
  .qy-hero__thumb { flex: 0 0 85px; gap: 3px; }
  .qy-hero__thumb img { width: 85px; }
  .qy-hero__thumb-label,
  .qy-hero__thumb-name { font-size: 11px; line-height: 1.2; }
  .qy-hero__thumb-arrow { flex: 0 0 28px; width: 28px; height: 38px; font-size: 17px; }

  /* 网格：仍然 6 列（1fr 自动适配宽度） */
  .qy-grid--vod { grid-template-columns: repeat(6, 1fr); }
  .qy-grid--vod-lg { grid-template-columns: repeat(6, 1fr); }
  .qy-block__row { grid-template-columns: repeat(6, 1fr); }

  /* 卡片内间距微调 */
  .qy-card__body { padding: 7px 9px 10px; }
  .qy-card__title { font-size: 13px; }
}

/* ── 断点2：小平板 / 手机横屏（≤900px）── */
@media (max-width: 900px) {
  /* 头部适配 */
  .qy-header__box { gap: 8px; height: 54px; padding: 0 12px; }
  .qy-logo__text { font-size: 17px; }
  .qy-search { max-width: none; order: 3; flex-basis: calc(100% - 80px); }
  .qy-tools .qy-tool__label { display: none; }
  .qy-tool { width: 40px; }

  /* 主内容区（侧边栏已隐藏） */
  .qy-main { padding: 8px 0 20px; }

  /* Hero：中等紧凑 */
  .qy-hero { height: 340px; border-radius: 0; overflow: hidden; margin: 0 -8px; width: calc(100% + 16px); }
  .qy-hero__info { right: 16px; max-width: 200px; }
  .qy-hero__title { font-size: 18px; }
  .qy-hero__desc { display: none; } /* 藏简介省空间 */

  /* Hero 缩略图：更小但保持可见 */
  .qy-hero__thumbs { left: 10px; bottom: 10px; max-width: calc(100% - 220px); gap: 5px; }
  .qy-hero__thumb-track { max-width: calc(6 * 70px + 5 * 6px); }
  .qy-hero__thumb { flex: 0 0 70px; gap: 2px; border-radius: 6px; }
  .qy-hero__thumb img { width: 70px; border-radius: 4px; }
  .qy-hero__thumb-label,
  .qy-hero__thumb-name { font-size: 10px; }
  .qy-hero__thumb-arrow { width: 24px; height: 32px; font-size: 15px; }
  .qy-hero__dots { right: 10px; bottom: 8px; }

  /* 网格：仍然 6 列（手机横屏也保持数量一致） */
  .qy-grid--vod { grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .qy-grid--vod-lg { grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .qy-block__row { grid-template-columns: repeat(6, 1fr); }

  /* 卡片紧凑 */
  .qy-card__body { padding: 5px 6px 8px; }
  .qy-card__title { font-size: 11.5px; }
  .qy-card__sub { font-size: 10.5px; }
  .qy-card__tag { font-size: 9.5px; top: 5px; left: 5px; padding: 1px 5px; }
  .qy-card__score { font-size: 10.5px; top: 5px; right: 5px; padding: 1px 5px; }
  .qy-section-title { font-size: 17px; margin: 20px 0 10px; }

  /* 周表 Tab */
  .qy-module--week .qy-week__tabs {
    gap: 2px; overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .qy-week__tab { padding: 4px 10px; font-size: 11px; white-space: nowrap; }
  .qy-week__panel { min-height: 140px; }

  /* 页脚 */
  .qy-footer__box { flex-direction: column; align-items: flex-start; padding: 18px 14px; }

  /* 详情页 */
  .qy-detail-box { gap: 18px; padding: 16px; }
  .qy-detail-poster { flex: 0 0 160px; }
  .qy-detail-title { font-size: 22px; }
  .qydetail-info-grid { grid-template-columns: 1fr 1fr; }

  /* 播放页双栏（平板） */
  .qy-play-layout { flex-direction: column; gap: 16px; }
  .qy-play-left { width: 100%; }
  .qy-play-right { flex: none; width: 100%; max-width: 520px; margin: 0 auto; }
  .qy-pi-poster { max-width: 200px; align-self: center; }

  /* 播放页头部内嵌分类（平板） */
  .qy-pnav-inject { gap: 1px; margin-right: 4px; }
  .qy-pnav-item { padding: 5px 9px; font-size: 12px; }
  .qy-pnav-more__text { font-size: 11.5px; }
  .qy-dropdown--cats { width: 420px; }
}

/* ── 断点3：手机竖屏（≤640px）—— 降为 3 列（6列在竖屏上太窄不可读）── */
@media (max-width: 640px) {
  .qy-hero { height: 260px; }
  .qy-hero__info { display: none; } /* 隐藏文字卡 */
  .qy-hero__overlay {
    background: linear-gradient(180deg, transparent 50%, rgba(4,8,18,.9) 100%);
  }

  .qy-hero__thumbs { left: 8px; bottom: 8px; max-width: calc(100% - 36px); gap: 4px; }
  .qy-hero__thumb-track { max-width: calc(3 * 56px + 2 * 5px); }
  .qy-hero__thumb { flex: 0 0 56px; gap: 2px; border-radius: 5px; }
  .qy-hero__thumb img { width: 56px; border-radius: 4px; }
  .qy-hero__thumb-label,
  .qy-hero__thumb-name { font-size: 9.5px; line-height: 1.15; }
  .qy-hero__thumb-arrow { display: none; } /* 竖屏隐藏箭头，直接滑动 */
  .qy-hero__dots { right: 8px; bottom: 6px; }

  /* 网格：手机竖屏 3 列 */
  .qy-grid--vod { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .qy-grid--vod-lg { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .qy-block__row { grid-template-columns: repeat(3, 1fr); }

  .qy-card__body { padding: 4px 5px 7px; }
  .qy-card__title { font-size: 11px; }
  .qy-card__sub { font-size: 10px; }
  .qy-section-title { font-size: 15px; margin: 16px 0 8px; }
  /* 详情页竖屏 */
  .qy-detail-box { flex-direction: column; padding: 14px; gap: 16px; }
  .qy-detail-poster { flex: 0 0 auto; max-width: 160px; margin: 0 auto; }
  .qydetail-info-grid { grid-template-columns: 1fr 1fr; gap: 4px 12px; }

  /* 播放页竖屏（手机） */
  .qy-play-layout { gap: 12px; }
  .qy-play-right { padding: 14px; width: 100%; max-width: none; }
  .qy-pi-poster { max-width: 140px; }
  .qy-pi-title { font-size: 16px; }
  .qy-pir { font-size: 12px; }
  .qy-ep { padding: 6px 11px; font-size: 12px; }
}

/* ── 超小竖屏（≤380px）—— 极限适配 ── */
@media (max-width: 380px) {
  .qy-grid--vod { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .qy-block__row { grid-template-columns: repeat(3, 1fr); }
  .qy-logo__text { font-size: 14px; }
  .qy-hero { height: 220px; }
  .qy-hero__thumb { flex: 0 0 48px; }
  .qy-hero__thumb img { width: 48px; }
}
