/* ============================================================
   首涂短剧 · 红果风格界面 v1.0
   三列竖版海报九宫格 / 橙红主题 / 标题叠加渐变遮罩
   本文件在 style.css 之后加载，覆盖原模板样式
   ============================================================ */

:root{
  --hg-primary:#ff5a36;        /* 红果橙红 */
  --hg-primary-dark:#f5451f;
  --hg-orange:#ff8a3d;
  --hg-bg:#f6f7f9;
  --hg-card:#ffffff;
  --hg-text:#1a1a1a;
  --hg-sub:#9a9aa0;
  --hg-radius:10px;
}

html,body{background:var(--hg-bg)!important}

/* ---------- 顶部品牌栏 ---------- */
.hg-header{
  position:relative;z-index:50;
  background:linear-gradient(135deg,var(--hg-orange),var(--hg-primary));
  padding:calc(env(safe-area-inset-top) + 12px) 16px 12px;
  color:#fff;
}
.hg-header .hg-brand{display:flex;align-items:center;gap:9px;margin-bottom:12px}
.hg-header .hg-logo{
  width:34px;height:34px;border-radius:9px;background:#fff;padding:4px;flex:0 0 auto;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.hg-header .hg-logo img{width:100%;height:100%;border-radius:6px;display:block}
.hg-header .hg-name{font-size:19px;font-weight:800;letter-spacing:.5px}
.hg-header .hg-slogan{font-size:11px;opacity:.85;margin-left:2px;font-weight:400}
.hg-header .hg-search{
  display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.95);
  border-radius:22px;padding:9px 14px;color:#bbb;
}
.hg-header .hg-search svg{width:17px;height:17px;flex:0 0 auto}
.hg-header .hg-search input{
  flex:1;border:0;outline:0;background:transparent;font-size:14px;color:#333;
}
.hg-header .hg-search input::placeholder{color:#b9b9bd}
.hg-header .hg-search a{color:var(--hg-primary);font-size:13px;font-weight:600;text-decoration:none;white-space:nowrap}

/* ---------- 分类标签栏 ---------- */
.hg-tabs{
  display:flex;gap:4px;overflow-x:auto;background:#fff;padding:0 8px;
  border-bottom:1px solid #f0f0f0;scrollbar-width:none;position:sticky;top:0;z-index:40;
}
.hg-tabs::-webkit-scrollbar{display:none}
.hg-tabs a{
  flex:0 0 auto;padding:13px 15px;font-size:15px;color:#666;text-decoration:none;
  font-weight:500;position:relative;white-space:nowrap;
}
.hg-tabs a.active{color:var(--hg-primary);font-weight:800}
.hg-tabs a.active:after{
  content:'';position:absolute;left:50%;bottom:5px;transform:translateX(-50%);
  width:20px;height:3px;border-radius:2px;background:var(--hg-primary);
}

/* ---------- 板块标题 ---------- */
.hg-section-title{
  display:flex;align-items:center;gap:8px;padding:16px 16px 10px;background:var(--hg-bg);
}
.hg-section-title .bar{width:4px;height:17px;border-radius:2px;background:var(--hg-primary)}
.hg-section-title h2{font-size:18px;font-weight:800;color:var(--hg-text);margin:0;flex:1}
.hg-section-title .more{font-size:13px;color:var(--hg-sub);text-decoration:none}

/* ---------- 三列海报网格 ---------- */
.hg-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px 9px;padding:0 12px;
}
.hg-grid .hg-item{width:auto!important;margin:0!important;padding:0!important;float:none!important}

/* ---------- 海报卡片：海报 + 下方独立标题（不再叠加） ---------- */
.hg-card,.hg-card *{box-sizing:border-box}
.hg-card{display:block;text-decoration:none;position:relative}
.hg-cover{
  position:relative;width:100%;aspect-ratio:3/4;border-radius:9px;
  overflow:hidden;background:#e8eaed;
}
.hg-cover img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;
  border-radius:0!important;animation:hgFadeIn .35s ease both;transition:transform .35s ease;
}
@keyframes hgFadeIn{from{opacity:.4}to{opacity:1}}
.hg-card:active .hg-cover img{transform:scale(1.04)}

/* 集数角标 */
.hg-eps{
  position:absolute;top:6px;right:6px;background:rgba(0,0,0,.66);color:#fff;
  font-size:10px;font-weight:600;padding:3px 7px;border-radius:5px;
  backdrop-filter:blur(4px);max-width:80%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
}
/* 卡片文字区：海报下方，浅色底 + 深色标题，清晰不重影 */
.hg-card-body{padding:6px 2px 2px}
.hg-title{
  color:var(--hg-text);font-size:13px;font-weight:600;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;text-align:left;min-height:18px;
}

/* ---------- 兼容原 .box 容器 ---------- */
.box{background:transparent!important;margin-top:0!important;padding:0!important}
.box .title{display:none!important}
.box .box_con{overflow:visible!important}
.box .box_con .img-list{
  display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:10px 9px;padding:0 12px;margin:0!important;
  list-style:none;
}
.box .box_con .img-list li,
.box .box_con .img-list li:nth-child(3n+2){
  float:none!important;width:auto!important;margin:0!important;padding:0!important;
}
.box .box_con .img-list li a{background:transparent!important}
.box .box_con .img-list li a h2,
.box .box_con .img-list li span:before{display:none!important}
.box .box_con .img-list li a img{border-radius:var(--hg-radius)!important}

/* ---------- 底部导航 ---------- */
footer .footer{background:#fff!important;border-top:1px solid #f0f0f0}
footer .footer ul li a span{font-size:11px!important}
footer .footer ul li a{color:#999!important}
footer .footer ul li a.active,footer .footer ul li a:hover{color:var(--hg-primary)!important}

/* ---------- 隐藏原模板的搜索框与顶部大图（首页用自定义品牌栏） ---------- */
body.hg-home .top_bg,
body.hg-home .top_search_box,
body.hg-home .top_user_bar{display:none!important}

/* ---------- 通用底部留白 ---------- */
body{padding-bottom:0!important}

/* ============================================================
   分类页 / 搜索页 / 详情页 红果适配
   ============================================================ */

/* 分类页：去掉原左侧固定侧栏与顶部留白 */
#type{background:var(--hg-bg)!important}
#type header{display:none!important}
#type aside,.type_aside{display:none!important}
.type_section,
#type .type_section{
  margin-top:0!important;float:none!important;width:100%!important;
  background:transparent!important;border-radius:0!important;
}
#type .box .box_title{display:none!important}

/* 搜索页 / 标签页 标题栏红果化 */
.search-list .title,.box .title{display:none!important}
.label-search .go-index a{color:var(--hg-primary)!important}

/* 详情页：橙红主题点缀 */
.shoutu-mhead{background:#fff!important}
.detail-cols{border-color:#f0f0f0!important;box-shadow:0 2px 12px rgba(0,0,0,.05)}
.detail-pic img{border-radius:10px!important}
.play-btn a{
  background:linear-gradient(135deg,var(--hg-orange),var(--hg-primary))!important;
  color:#fff!important;border-radius:24px!important;font-weight:700!important;
  box-shadow:0 4px 14px rgba(255,90,54,.35)!important;
}
.detail-info .info a{color:var(--hg-primary)!important}

/* 分页按钮橙红 */
.pages a,.pages span{color:var(--hg-primary)!important}

/* ---------- 底部导航 5 tab 优化 ---------- */
footer{padding-bottom:env(safe-area-inset-bottom,0px)}
footer .footer ul{display:flex;width:100%;margin:0;padding:0;list-style:none}
footer .footer ul li{float:none;flex:1;width:20%!important;padding:10px 2px 8px!important}
footer .footer ul li a{font-size:12px!important;text-decoration:none}
footer .footer ul li a i{font-size:24px!important;line-height:1!important}
footer .footer ul li a span{display:block;margin-top:3px;font-size:11px!important}
/* 下载APP角标 */
footer .footer ul li:last-child a{position:relative}
footer .footer ul li:last-child a:after{
  content:'NEW';position:absolute;top:-6px;left:calc(50% + 6px);
  background:#ff5a2d;color:#fff;font-size:8px;line-height:13px;
  padding:0 4px;border-radius:7px;font-style:normal;font-weight:700;
}
