@charset "UTF-8";
/* ============================================================
 * 爱看直播 - 首页响应式覆盖层
 * 策略：>1200px 完全不影响桌面布局；
 *       1200px 以下逐步缩放为流式布局；
 *       768px 以下手机端单列/双列卡片网格。
 * 放在 header-v3.css / home-v5.css 之后加载，同优先级覆盖。
 * ============================================================ */

/* PC 端默认隐藏移动端文字导航，仅手机屏显示 */
.m-topnav { display: none; }

/* ===== 中等屏（平板/小笔记本）：1200px 以下 ===== */
@media (max-width: 1200px) {

  /* 取消全局最小宽度限制 */
  body, html { min-width: 0 !important; }

  /* 顶部导航栏 */
  .head { min-width: 0 !important; }
  .header { min-width: 0; }
  .header-inner {
    width: 100% !important;
    max-width: 1200px;
    padding: 0 15px;
    box-sizing: border-box;
  }

  /* 推荐位区域 */
  #hot-panel .content { width: 100% !important; max-width: 1200px; padding: 0 15px; box-sizing: border-box; }
  #hot-panel .content .ch-list-panel { width: 100% !important; height: auto !important; float: none; }
  #hot-panel .content .ch-list-panel .channel-list { height: auto !important; margin-left: -10px; }
  #hot-panel .content .ch-list-panel .channel-list li {
    width: calc((100% - 10px * 4) / 4) !important;
    height: auto !important;
    margin: 10px 0 0 10px;
  }
  #hot-panel .content .ch-list-panel .channel-list li img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
  #hot-panel .content .ch-list-panel .channel-list li .info-panel { position: relative; bottom: auto; width: 100% !important; background: transparent; padding: 6px 0 0; }
  #hot-panel .content .ch-list-panel .channel-list li .info-panel .cname,
  #hot-panel .content .ch-list-panel .channel-list li .info-panel .pname { width: 100% !important; color: #333; text-align: center; }

  /* 地方台面板 */
  #hot-panel .content .pg-list-panel {
    width: 100% !important;
    float: none;
    margin-left: 0 !important;
    height: auto !important;
    margin-top: 15px;
  }
  #hot-panel .content .pg-list-panel ul { height: auto !important; }

  /* 栏目面板 */
  .live-panel { width: 100% !important; max-width: 1200px; padding: 0 15px; box-sizing: border-box; }
  .live-panel .content .recomend {
    width: calc(33.333% - 4px) !important;
    height: auto !important;
    margin-right: 4px;
  }
  .live-panel .content .recomend img { width: 100%; height: auto; }
  .live-panel .content .recomend .info-panel { width: 100% !important; }
  .live-panel .content .recomend .info-panel .cname,
  .live-panel .content .recomend .info-panel .pname { width: 100% !important; }
  .live-panel .content .recomend svg { width: 100%; height: 100%; }

  .live-panel .content .channel-list {
    width: calc(66.666% - 4px) !important;
    height: auto !important;
    margin-top: 0 !important;
  }
  .live-panel .content .channel-list li {
    width: calc((100% - 22px) / 4) !important;
    height: auto !important;
    margin: 8px 0 0 11px;
  }
  .live-panel .content .channel-list li a { width: 100% !important; height: auto !important; }
  .live-panel .content .channel-list li img { width: 100% !important; height: auto; position: relative; }
  .live-panel .content .channel-list li .info-panel { width: 100% !important; margin-top: 0; position: relative; }
  .live-panel .content .channel-list li .info-panel .cname,
  .live-panel .content .channel-list li .info-panel .pname { width: 100% !important; }

  /* 页脚 */
  .footer { width: 100% !important; max-width: 1200px; padding: 0 15px; box-sizing: border-box; }
  .foot-bottom .friend-link .friend-link-panel { width: calc(100% - 90px); }
}

/* ===== 手机/小平板：768px 以下 ===== */
@media (max-width: 768px) {

  body { font-size: 14px; }

  /* ---- 顶部导航：两行式（logo+搜索 / 文字导航） ---- */
  .header-inner {
    height: auto;
    padding: 8px 16px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
  }
  .header .head-logo {
    position: relative;
    top: 0;
    left: 0;
    order: 1;
    flex: 0 0 auto;
    margin: 0;
  }

  /* 移动端隐藏 PC 端背景图精灵导航（避免和文字导航重复） */
  .head-nav { display: none !important; }

  .head-login-panel {
    position: relative !important;
    right: 0;
    order: 2;
    width: auto !important;
    margin: 0 0 0 auto;
    text-align: right;
  }
  .head-login-panel .search { float: none; display: inline-flex; margin: 0; align-items: center; }
  .head-login-panel .search input[type="text"] {
    width: 40vw !important;
    max-width: 200px;
    height: 34px !important;
    font-size: 14px !important;
    border-radius: 17px 0 0 17px !important;
  }
  .head-login-panel .search button {
    height: 36px !important;
    font-size: 14px !important;
    padding: 0 14px !important;
    border-radius: 0 17px 17px 0 !important;
  }
  /* 移动端隐藏韩剧/节目表小图标，省空间（已并入文字导航） */
  .head-login { display: none; }

  /* 移动端文字导航（横向滚动） */
  .m-topnav {
    order: 3;
    display: flex !important;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .m-topnav a {
    flex: 0 0 auto;
    display: inline-block;
    padding: 5px 13px;
    margin-right: 5px;
    color: #444;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 15px;
    background: #f5f5f5;
  }
  .m-topnav a:active,
  .m-topnav a:hover { background: #fff2e6; color: #ff8a00; }

  /* ---- 推荐位 9 宫格 → 2 列 ---- */
  #hot-panel .content { padding: 0 10px; }
  #hot-panel .content .ch-list-panel .channel-list {
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  #hot-panel .content .ch-list-panel .channel-list li {
    width: 100% !important;
    margin: 0 !important;
  }
  #hot-panel .content .ch-list-panel .channel-list li .info-panel .cname,
  #hot-panel .content .ch-list-panel .channel-list li .info-panel .pname { color: #333; }

  /* ---- 栏目面板：推荐位和频道列表堆叠 ---- */
  .live-panel .content .recomend {
    width: 100% !important;
    float: none;
    margin-right: 0;
    margin-bottom: 10px;
  }
  .live-panel .content .recomend img {
    width: 100% !important;
    height: auto !important;
  }
  .live-panel .content .recomend .info-panel {
    width: 100% !important;
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    height: auto !important;
    padding: 8px 0;
  }
  .live-panel .content .recomend .info-panel .cname,
  .live-panel .content .recomend .info-panel .pname {
    width: auto !important;
    position: relative !important;
    margin: 0 8px !important;
    line-height: 1.5 !important;
    height: auto !important;
  }
  .live-panel .content .recomend .info-panel .online-num {
    display: none;
  }

  .live-panel .content .channel-list {
    width: 100% !important;
    height: auto !important;
    float: none;
    margin-top: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 11px;
  }
  .live-panel .content .channel-list li {
    width: 100% !important;
    height: auto !important;
    float: none;
    margin: 0 !important;
    position: relative;
  }
  .live-panel .content .channel-list li a {
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  .live-panel .content .channel-list li img {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    display: block;
  }
  .live-panel .content .channel-list li .info-panel {
    width: 100% !important;
    height: auto !important;
    margin-top: 0 !important;
    position: relative !important;
    padding: 6px 0;
    box-sizing: border-box;
  }
  .live-panel .content .channel-list li .info-panel .cname,
  .live-panel .content .channel-list li .info-panel .pname {
    width: auto !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 6px !important;
    line-height: 1.5 !important;
    height: auto !important;
    font-size: 12px !important;
  }
  .live-panel .content .channel-list li .info-panel .online-num {
    display: none;
  }
  .live-panel .content .channel-list li svg,
  .live-panel .content .channel-list li .svgwrap {
    display: none !important;
  }

  /* ---- 地方台省份列表换行 ---- */
  #hot-panel .content .pg-list-panel ul li {
    height: auto !important;
    line-height: 28px !important;
    padding: 4px 0;
  }
  #hot-panel .content .pg-list-panel ul li .footer-link {
    display: inline-block;
    margin: 2px 8px;
    white-space: nowrap;
  }
  #hot-panel .content .pg-list-panel ul li div { line-height: 28px; }

  /* ---- 页脚 ---- */
  .footer { padding: 0 10px; }
  #footer-top { padding: 10px 0; }
  #copy-right { float: none; display: block; margin-bottom: 5px; }
  #footer-link-wrap { float: none; display: block; }
  .footer-link { display: inline-block; margin: 2px 6px; }
  .foot-bottom .friend-link { height: auto; }
  .foot-bottom .friend-link .link-title { float: none; line-height: 30px; }
  .foot-bottom .friend-link .friend-link-panel { width: 100%; height: auto; text-align: left; }

  /* ---- 浮动广告层隐藏 ---- */
  .float_layer { display: none !important; }
}

/* ===== 小手机：480px 以下 ===== */
@media (max-width: 480px) {

  /* 推荐位 → 2 列 */
  #hot-panel .content .ch-list-panel .channel-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  #hot-panel .content .ch-list-panel .channel-list li {
    width: 100% !important;
    margin: 0 !important;
  }

  /* 栏目频道列表 → 2 列 */
  .live-panel .content .channel-list {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .live-panel .content .channel-list li {
    width: 100% !important;
    margin: 0 !important;
  }

  /* 导航文字进一步缩小 */
  .head-nav li { margin-left: 3px !important; margin-right: 3px; }
  .head-nav li.home a,
  .head-nav li.all-channel a,
  .head-nav li.playbill a,
  #download-mobile-link,
  #forum-link { transform: scale(0.62); }

  .live-panel .title-panel .title a { font-size: 18px; }
  .live-panel .content .channel-list li .info-panel .cname { font-size: 13px; }
  .live-panel .content .channel-list li .info-panel .pname { font-size: 11px; }
}

/* ===== 超小屏：360px 以下 ===== */
@media (max-width: 360px) {
  .head-nav li { margin-left: 2px !important; margin-right: 2px; }
  #hot-panel .content .ch-list-panel .channel-list li {
    width: calc((100% - 10px) / 2) !important;
  }
}
