/* YUTU034 · 移动端深色影视模板
   结构：顶部分类横滑 / 居中品牌 / 圆角搜索 / 大图轮播 / 方块位 / 三列竖版海报流 */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #0b0b0d;
  --panel: #141418;
  --panel-2: #1c1c22;
  --line: #232329;
  --text: #f4f4f6;
  --dim: #94949e;
  --dim-2: #6a6a75;
  --accent: #ff3b30;
  --accent-2: #ff7a45;
  --radius: 10px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #000;
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; border: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.app {
  max-width: 750px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}

/* ========== 顶部：分类横滑 ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 11, 13, .94);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.nav {
  display: flex;
  align-items: stretch;
  gap: 22px;
  padding: 0 16px;
  height: 46px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar { display: none; }

.nav-i {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  font-size: 15.5px;
  font-weight: 600;
  color: #cfcfd6;
  letter-spacing: .2px;
  white-space: nowrap;
  transition: color .18s;
}
.nav-i:active { opacity: .7; }
.nav-i.is-active { color: #fff; }
.nav-i.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 20px;
  height: 3px;
  margin-left: -10px;
  border-radius: 3px;
  background: var(--accent);
}
.nav-more { color: var(--dim); font-weight: 500; }

/* ========== 品牌 ========== */
.brand {
  display: flex;
  justify-content: center;
  padding: 18px 16px 12px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-logo {
  height: 38px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  border-radius: 8px;
}
.brand .yutu-logo-title { display: none !important; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt strong {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-txt em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--accent);
  line-height: 1.3;
}

/* ========== 搜索 ========== */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 16px;
  height: 46px;
  padding: 0 6px 0 16px;
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
}
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 14.5px;
  -webkit-appearance: none;
}
.search input::placeholder { color: var(--dim-2); }
.search input::-webkit-search-cancel-button { display: none; }
.search button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 34px;
  border-radius: 9px;
  color: var(--dim);
}
.search button:active { background: rgba(255, 255, 255, .06); }
.search svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* ========== 大图轮播 ========== */
.hero { padding: 0 16px; }
.hero-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}
.hero-track::-webkit-scrollbar { display: none; }

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  isolation: isolate;
}
.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .72) 72%, rgba(0, 0, 0, .92) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 62%);
}
.hero-body {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
}
.hero-body h2 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 12px;
  color: #c9c9d2;
}
.hero-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
  font-size: 12.5px;
  font-weight: 600;
}
.hero-btn svg { width: 12px; height: 12px; fill: currentColor; }

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 10px 0 2px;
}
.hero-dots i {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .22);
  transition: width .2s, background .2s;
}
.hero-dots i.on { width: 14px; background: var(--accent); }

/* ========== 广告容器 ========== */
.ad-zone { padding: 0 16px; margin: 14px 0; }
.ad-zone img { max-width: 100%; height: auto; margin: 0 auto; border-radius: 10px; }
.yutu-banner-slot > p { margin: 0; }
/* ========== 图标广告位（轮播下方一行） ========== */
.square-zone { padding: 0 16px; margin: 14px 0 2px; }

#yutu-square-ads[data-layout] {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 16px 8px !important;
  justify-content: space-between !important;
}
#yutu-square-ads[data-layout="container"] {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
#yutu-square-ads[data-layout] .yutu-square-ad { font-size: 11px !important; gap: 6px !important; }
#yutu-square-ads[data-layout] .yutu-square-ad-image { border-radius: 11px !important; }
#yutu-square-ads[data-layout] .yutu-square-ad-label { color: #c3c3cc !important; }

/* ========== 板块 ========== */
.sec { padding: 16px 16px 4px; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.sec-head h3 {
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: .2px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sec-head .more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12.5px;
  color: var(--dim);
}
.sec-head .more svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ========== 海报网格 ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 9px;
}

.card { display: block; min-width: 0; }
.card .thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:active .thumb img { transform: scale(1.04); }
.card .badge {
  position: absolute;
  top: 0;
  left: 0;
  padding: 2px 6px;
  border-bottom-right-radius: 8px;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(4px);
  font-size: 10.5px;
  font-weight: 600;
  color: #ffb454;
  line-height: 1.5;
}
.card .title {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.35;
  color: #e6e6ec;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 列表式条目（侧栏/最新） ========== */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.row .thumb {
  flex: 0 0 118px;
  aspect-ratio: 16 / 10;
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel);
}
.row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .txt { min-width: 0; flex: 1; }
.row .txt h4 {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row .txt span {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--dim-2);
}

/* ========== 页面标题 ========== */
.page-head { padding: 6px 16px 14px; }
.page-head h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .2px;
}
.page-head p { margin-top: 5px; font-size: 12.5px; color: var(--dim-2); }

/* ========== 详情 ========== */
.detail-cover {
  display: block;
  position: relative;
  margin: 0 16px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .82) 100%);
}
.detail-cover .play-dot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-cover .play-dot i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  border: 1.5px solid rgba(255, 255, 255, .75);
  backdrop-filter: blur(6px);
}
.detail-cover .play-dot svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }

.detail-info { padding: 14px 16px 0; }
.detail-info h1 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--dim);
}
.detail-meta .sep { color: #3a3a44; }
.detail-meta a { color: var(--accent-2); }

.btn-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 16px 4px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(96deg, var(--accent) 0%, var(--accent-2) 100%);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(255, 59, 48, .9);
}
.btn-play:active { transform: translateY(1px); }
.btn-play svg { width: 17px; height: 17px; fill: currentColor; }

/* ========== 播放器 ========== */
.player {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ========== 分页 ========== */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 16px 8px;
}
.pager a, .pager strong, .pager .gap {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--panel-2);
  font-size: 13px;
  font-weight: 500;
  color: #d0d0d8;
}
.pager a[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.pager strong { background: var(--accent); color: #fff; font-weight: 700; }
.pager .gap { background: none; color: var(--dim-2); min-width: 14px; padding: 0; }
.pager .nums { display: flex; align-items: center; gap: 8px; }

/* 图片占位 */
.img-empty { background: linear-gradient(135deg, #1a1a20 0%, #232329 100%); }

/* ========== 空态 ========== */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--dim-2);
  font-size: 13.5px;
}
.empty strong { display: block; margin-bottom: 6px; font-size: 15px; color: var(--dim); }

/* ========== 页尾 ========== */
.site-footer {
  margin-top: 26px;
  padding: 22px 16px 34px;
  border-top: 1px solid rgba(255, 255, 255, .05);
  text-align: center;
  color: var(--dim-2);
  font-size: 12px;
}
.site-footer .f-name { font-size: 13.5px; color: #b9b9c2; font-weight: 600; }
.site-footer .f-mail { margin-top: 6px; }
.site-footer .f-mail a { color: var(--dim); }
.friend-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
  margin-top: 14px;
  font-size: 12px;
}
.friend-links a { color: var(--dim-2); }
.friend-links a:active { color: var(--accent-2); }
.copyright { margin-top: 14px; font-size: 11.5px; color: #4d4d57; }

/* ========== 返回顶部 ========== */
.back-top {
  position: fixed;
  right: max(14px, calc(50% - 375px + 14px));
  bottom: calc(22px + var(--ad-inset, 0px));
  z-index: 70;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(28, 28, 34, .92);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}
.back-top svg { width: 17px; height: 17px; stroke: #e8e8ee; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ========== 分类抽屉 ========== */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s, visibility .22s;
}
.drawer-mask.on { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 91;
  max-width: 750px;
  margin: 0 auto;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: #16161b;
  border-radius: 18px 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
  transform: translateY(101%);
  transition: transform .26s cubic-bezier(.22, .8, .3, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.drawer.on { transform: translateY(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
}
.drawer-head h3 { font-size: 16px; font-weight: 700; }
.drawer-head button { color: var(--dim); font-size: 13px; }
.drawer-body {
  overflow-y: auto;
  padding: 4px 18px 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.drawer-body a {
  padding: 11px 8px;
  border-radius: 9px;
  background: var(--panel-2);
  text-align: center;
  font-size: 13px;
  color: #cfcfd8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-body a:active { background: #2a2a32; }

/* ========== 宽屏兜底（同模板可直接用于电脑端） ========== */
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; }
  .card .title { font-size: 13px; }
  .drawer-body { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #yutu-square-ads[data-layout] { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
