/* MIB (dfa-08) landing page styles
 *
 * A 版（/）= 真实 HTML/CSS 版式：黑底 + 红色强调（#e8112d），PC / H5 两个 shell，
 * landing.js detectDevice 后给 <main.landing> 加 data-layout="pc"/"h5" 二选一显示；
 * 四个视图（home/video/actress/media）由 mib.js 客户端切换。
 * 所有封面卡片 data-action="download-auto" —— 落地页唯一目标是装机。
 *
 * B 版（/b）= 旧「整图 bg-b.jpg + 热区」长页保留不动；其 PC 端复用新版 pcShell。
 */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #000; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-y: auto;
}
img { user-select: none; -webkit-user-drag: none; }
a { text-decoration: none; color: inherit; }

.landing { display: block; }
.landing[data-layout="pending"] { visibility: hidden; }

.pc-shell, .h5-shell { display: none; }
.landing[data-layout="pc"] .pc-shell { display: block; }
.landing[data-layout="h5"] .h5-shell { display: block; }

/* ========== 公共：MIB 设计元素 ========== */
:root {
  --mib-red: #e8112d;
  --mib-bg: #000;
  --mib-card: #141414;
  --mib-gray: #9a9a9a;
}

/* logo：图 + 「韩国第一AV」文字 */
.mib-logo { display: inline-flex; align-items: center; gap: 8px; }
.mib-logo span { font-weight: 600; white-space: nowrap; }

/* 顶部右侧圆形外链图标组 */
.mib-links { display: flex; align-items: center; }
.mib-links a { display: block; border-radius: 50%; overflow: hidden; }
.mib-links img { display: block; width: 100%; height: 100%; }

/* 段落标题：红圆叠白字（设计稿「精选/视频/女优/媒体」样式） */
.mib-title-wrap { position: relative; }
.mib-title-wrap.center { text-align: center; }
.mib-title {
  position: relative;
  display: inline-block;
  margin: 0;
  font-weight: 700;
  color: #fff;
  z-index: 0;
}
.mib-title::before {
  content: '';
  position: absolute;
  top: 50%;
  border-radius: 50%;
  background: var(--mib-red);
  z-index: -1;
}

/* 「最高评分」标签（切图自带图标+文字，红下划线） */
.mib-rating {
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid var(--mib-red);
}
.mib-rating img { display: block; }

/* 封面卡片 */
.mib-card { display: block; background: var(--mib-card); overflow: hidden; border-radius: 4px; }
.mib-card > img { display: block; width: 100%; height: auto; }

/* 媒体卡片：封面下带标题 + 日期/播放量 */
.mib-card-media { background: transparent; }
.mib-card-media > img { border-radius: 4px; }
.mib-media-title { margin: 10px 0 4px; color: #fff; font-weight: 500; }
.mib-media-meta { margin: 0; color: var(--mib-gray); display: flex; align-items: center; }
.mib-media-meta .sep { width: 1px; height: 12px; background: #3a3a3a; margin: 0 10px; }

/* 媒体平台入口（YouTube / TG / X / TikTok 深色块） */
.mib-platforms { display: grid; grid-template-columns: repeat(4, 1fr); }
.mib-platforms a {
  display: flex; align-items: center; justify-content: center;
  background: #161616;
  border-radius: 4px;
}
.mib-platforms img { display: block; }

/* banner 轮播（PC home） */
.mib-banner { position: relative; display: block; width: 100%; aspect-ratio: 1920 / 600; overflow: hidden; background: #0a0a0a; }
.mib-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s ease;
}
.mib-slide.on { opacity: 1; }

/* ========== PC shell（≥961px 或桌面 UA） ========== */
.pc-shell { background: var(--mib-bg); min-height: 100vh; }

.mib-header {
  display: flex; align-items: center;
  height: 84px;
  padding: 0 44px;
  background: #000;
}
.mib-header .mib-logo img { height: 42px; }
.mib-header .mib-logo span { font-size: 19px; }
.mib-nav { display: flex; gap: 46px; margin-left: 64px; }
.mib-nav a {
  position: relative;
  font-size: 21px;
  font-weight: 600;
  color: #fff;
  padding: 6px 2px 12px;
}
.mib-nav a.on { color: var(--mib-red); }
.mib-nav a.on::after {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 0;
  width: 38px; height: 3px;
  background: var(--mib-red);
}
.mib-header .mib-links { margin-left: auto; gap: 22px; }
.mib-header .mib-links a { width: 46px; height: 46px; }

.pc-shell .mib-title { font-size: 30px; padding: 8px 6px 8px 20px; }
.pc-shell .mib-title::before { left: 0; width: 46px; height: 46px; transform: translateY(-50%); }
.pc-shell .mib-title-wrap.center { margin: 34px 0 26px; }
.pc-shell .mib-rating { margin: 4px 0 22px; padding-bottom: 6px; }
.pc-shell .mib-rating img { height: 22px; }

/* home 精选：全宽 3 列 */
.mib-grid { display: grid; }
.mib-grid-home { grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0 14px 56px; }
.mib-grid-home .mib-card > img { aspect-ratio: 627 / 357; object-fit: cover; }

/* 内页容器（视频 / 女优 / 媒体） */
.mib-page { max-width: 1400px; margin: 0 auto; padding: 36px 40px 64px; }
.mib-page .mib-title-wrap { margin-bottom: 14px; }

.mib-grid-video { grid-template-columns: repeat(3, 1fr); gap: 26px; }
.mib-grid-video .mib-card > img { aspect-ratio: 424 / 241; object-fit: cover; }

.mib-grid-actress { grid-template-columns: repeat(5, 1fr); gap: 22px; }
.mib-grid-actress .mib-card > img { aspect-ratio: 246 / 324; object-fit: cover; }

.pc-shell .mib-platforms { gap: 18px; margin: 10px 0 30px; }
.pc-shell .mib-platforms a { height: 112px; }
.pc-shell .mib-platforms img { height: 44px; }
.mib-grid-media { grid-template-columns: repeat(3, 1fr); gap: 26px 26px; }
.mib-grid-media .mib-card > img { aspect-ratio: 425 / 242; object-fit: cover; }
.pc-shell .mib-media-title { font-size: 15px; }
.pc-shell .mib-media-meta { font-size: 13px; }

.mib-footer {
  display: flex; align-items: center; justify-content: space-between;
  background: #0d0d0d;
  padding: 44px 60px;
  margin-top: 24px;
}
.mib-footer-logo { height: 62px; display: block; }
.mib-footer-left p { margin: 16px 0 0; color: #8a8a8a; font-size: 14px; }
.mib-footer-right { display: flex; align-items: center; gap: 14px; }
.mib-quark {
  writing-mode: vertical-rl;
  font-size: 14px;
  color: #ddd;
  letter-spacing: 2px;
}
.pc-qr { width: 128px; height: 128px; background: #fff; padding: 6px; }
.pc-qr canvas, .pc-qr img { width: 100% !important; height: 100% !important; display: block; }

/* ========== H5 shell（<961px 移动端；750 设计稿 ≈ 2x） ========== */
.h5-shell {
  position: relative;
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  background: var(--mib-bg);
  min-height: 100vh;
  /* 给底部固定下载条留出空间 */
  padding-bottom: 92px;
}

.mib-h5-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 4px;
}
.mib-h5-header .mib-logo img { height: 30px; }
.mib-h5-header .mib-logo span { font-size: 15px; }
.mib-h5-header .mib-links { gap: 12px; }
.mib-h5-header .mib-links a { width: 36px; height: 36px; }

.mib-h5-nav { display: flex; justify-content: center; gap: 34px; padding: 8px 0 2px; }
.mib-h5-nav a {
  position: relative;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  padding: 4px 2px 10px;
}
.mib-h5-nav a.on { color: var(--mib-red); }
.mib-h5-nav a.on::after {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 2px;
  width: 30px; height: 3px;
  background: var(--mib-red);
}

.mib-h5-banner { display: block; }
.mib-h5-banner img { display: block; width: 100%; height: auto; }

.h5-shell .mib-title { font-size: 22px; padding: 6px 4px 6px 12px; }
.h5-shell .mib-title::before { left: -2px; width: 34px; height: 34px; transform: translateY(-50%); }
.h5-shell .mib-title-wrap { margin: 14px 10px 10px; }
.h5-shell .mib-title-wrap.center { margin: 18px 0 12px; }
.h5-shell .mib-rating { margin: 0 10px 12px; padding-bottom: 5px; }
.h5-shell .mib-rating img { height: 18px; }

/* 单列卡片流（home 精选 / 视频 / 媒体） */
.mib-h5-list { display: flex; flex-direction: column; gap: 10px; padding: 0 10px; }
.mib-h5-list .mib-card > img { aspect-ratio: 720 / 410; object-fit: cover; }

/* 女优：搜索行 + 2 列网格 */
.mib-h5-search { display: flex; align-items: center; gap: 8px; padding: 0 10px 12px; }
.mib-h5-search a:first-child { flex: 1; min-width: 0; }
.mib-h5-searchwrap { position: relative; }
.mib-h5-searchbox { display: block; width: 100%; height: auto; }
.mib-h5-searchtext {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 15px;
  color: #fff;
}
.mib-h5-sort { display: block; height: 40px; width: auto; }
.mib-h5-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 10px; }
.mib-h5-grid2 .mib-card > img { aspect-ratio: 349 / 461; object-fit: cover; }

.mib-h5-platforms { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 10px; margin: 6px 0 14px; }
.mib-h5-platforms a { height: 62px; }
.mib-h5-platforms img { height: 26px; }
.h5-shell .mib-media-title { font-size: 14px; }
.h5-shell .mib-media-meta { font-size: 12px; }

.mib-h5-footer { padding: 26px 14px 10px; }
.mib-h5-footer img { display: block; width: 100%; height: auto; }

/* 底部固定下载条：普通下载（描边）/ 高速下载（实底），图为切图按钮 */
.mib-h5-dlbar {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: 0;
  width: 100%; max-width: 750px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, .92);
  z-index: 40;
}
.mib-h5-dlbar a { flex: 1; min-width: 0; }
.mib-h5-dlbar img { display: block; width: 100%; height: auto; }

/* ========== B 版（视频网格长落地页，Figma node 648:66 → 750×2212 裁后） ========== */
/* B 版是单页长滚动；.landing-b 容器限宽居中，热区 % 相对 bg 图对齐。 */
body.b-version { overflow: auto; background: #000; }
.landing.landing-b {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  background: #000;
}
/* B 版移动长页容器：定位上下文 = 图片框，热区 % 相对它对齐。
 * PC 端（landing.js 切 data-layout="pc" 并去掉 .landing-b）隐藏本段、改显 pcShell。*/
.b-shell { position: relative; display: block; }
.landing[data-layout="pc"] .b-shell { display: none; }

.b-bg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}
.b-hot {
  position: absolute;
  display: block;
  background: transparent;
  text-decoration: none;
  border: 0;
  outline: 0;
  cursor: pointer;
  z-index: 5;
}
/* B 版热区（基于 bg-b.jpg 750×2212；精确测自 648:102/648:108/648:101 bbox） */
.b-btn-android { left:  4.00%; top: 91.14%; width: 44.80%; height: 3.71%; border-radius: 999px; }
.b-btn-ios     { left: 51.73%; top: 91.14%; width: 44.80%; height: 3.71%; border-radius: 999px; }
.b-bottom-text { left: 24.53%; top: 96.02%; width: 51.20%; height: 2.89%; }
/* B 版顶部右侧 3 个外链按钮（图标+文案为整块热区；目标与 PC pc-mail/telegram/sw 一致）
 * 商务合作(♥)→官网 t1t1.com、官方社群(✈)→Telegram、官方邮箱(✉)→mailto。
 * 坐标量自 bg-b.jpg 顶部 header（750×2212）。 */
.b-biz   { left: 57.60%; top: 1.18%; width: 14.67%; height: 4.43%; }
.b-group { left: 72.00%; top: 1.18%; width: 13.33%; height: 4.43%; }
.b-mail  { left: 84.93%; top: 1.18%; width: 14.67%; height: 4.43%; }
.landing.landing-b.debug-hotspots .b-hot { outline: 2px solid rgba(255,64,64,.6); background: rgba(255,64,64,.08); }

/* 轻量 toast：下载链未配置时给用户可见反馈（见 landing.js trackThenGo）。 */
.landing-toast {
  position: fixed;
  left: 50%;
  bottom: 12%;
  z-index: 200;
  max-width: 80vw;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.landing-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ========== 安卓「安装包报毒解决方案」弹层 ========== */
.android-modal {
  position: fixed; inset: 0;
  background: #f5f5f5;
  color: #222;
  z-index: 100;
  overflow-y: auto;
}
.android-modal[hidden] { display: none; }
.android-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky; top: 0; z-index: 2;
}
.android-modal-back {
  width: 32px; height: 32px;
  background: none; border: 0; padding: 0;
  cursor: pointer;
}
.android-modal-back img { width: 100%; height: 100%; object-fit: contain; }
.android-modal-title { font-size: 16px; font-weight: 600; flex: 1; text-align: center; }
.android-modal-spacer { width: 32px; }

.android-modal-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.android-modal-cell {
  display: block;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
}
.android-modal-cell img { width: 100%; display: block; }

.android-modal-detail { padding: 12px; }
.android-modal-detail[hidden] { display: none; }
.android-modal-pic { background: #fff; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.android-modal-pic img { width: 100%; display: block; }

/* ========== 浮动广告位（右下） ========== */
.ad-float {
  position: fixed;
  right: 12px;
  bottom: 16px;
  width: min(80px, 22vw);
  aspect-ratio: 1/1;
  z-index: 50;
}
.ad-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.ad-slide.active { opacity: 1; }
.ad-slide img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}
.ad-close {
  position: absolute;
  top: -8px; right: -8px;
  width: 20px; height: 20px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
  z-index: 1;
}

@media (min-width: 961px) {
  .ad-float { width: 96px; right: 24px; bottom: 24px; }
}
