/* ============================================================
   豆瓣电影移动端复刻样式（魔术道具项目）
   主色: 豆瓣绿 #42bd56 / 评分橙 #ffac2d
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
html, body { width: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #494949; background: #fff; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; border: 0; }
ul, li { list-style: none; }
button { font-family: inherit; border: 0; background: none; cursor: pointer; }
input { font-family: inherit; border: 0; outline: none; }

/* ---------- 顶部导航 ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: #fff;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid #eee;
}
.topbar .logo { font-size: 22px; font-weight: 700; color: #42bd56; letter-spacing: 1px; white-space: nowrap; }
.topbar .nav { display: flex; gap: 16px; font-size: 15px; color: #333; overflow-x: auto; scrollbar-width: none; }
.topbar .nav::-webkit-scrollbar { display: none; }
.topbar .nav a { white-space: nowrap; padding: 4px 0; }
.topbar .nav a.on { color: #42bd56; font-weight: 600; }

/* ---------- 搜索框 ---------- */
.searchbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; }
.searchbar .box {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #f3f3f3; border-radius: 6px; padding: 8px 12px;
}
.searchbar .box svg { flex: none; }
.searchbar .box input { flex: 1; background: transparent; font-size: 15px; color: #333; min-width: 0; }
.searchbar .box input::placeholder { color: #b0b0b0; }
.searchbar .clear { display: none; width: 18px; height: 18px; border-radius: 50%; background: #ccc; color: #fff; font-size: 12px; line-height: 18px; text-align: center; flex: none; }
.searchbar .cancel { font-size: 16px; color: #42bd56; white-space: nowrap; }

/* ---------- 板块标题 ---------- */
.section { padding: 0 16px; margin-top: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; font-weight: 600; color: #333; }
.section-head .more { font-size: 14px; color: #42bd56; }

/* ---------- 横滑卡片（热映） ---------- */
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }
.mcard { flex: none; width: 100px; }
.mcard .poster { width: 100px; height: 142px; border-radius: 4px; overflow: hidden; background: #f0f0f0; }
.mcard .poster img { width: 100%; height: 100%; object-fit: cover; }
.mcard .t { margin-top: 6px; font-size: 14px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard .r { margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.mcard .r .score { font-size: 12px; color: #ffac2d; }

/* ---------- 榜单入口卡片 ---------- */
.chart-entries { display: flex; gap: 10px; }
.chart-entries a {
  flex: 1; border-radius: 8px; padding: 14px 12px; color: #fff;
  display: flex; flex-direction: column; gap: 4px; min-height: 74px;
}
.chart-entries .t1 { font-size: 16px; font-weight: 700; }
.chart-entries .t2 { font-size: 12px; opacity: .9; }
.ce-1 { background: linear-gradient(135deg, #f5a623, #f76b1c); }
.ce-2 { background: linear-gradient(135deg, #4a90d9, #2b5cb8); }
.ce-3 { background: linear-gradient(135deg, #e05b5b, #b8336a); }

/* ---------- 竖排列表项（Top250/榜单/搜索结果） ---------- */
.mlist li { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.mlist .rank {
  flex: none; width: 26px; text-align: center; font-size: 15px; font-weight: 600;
  color: #bbb; padding-top: 4px; font-style: italic;
}
.mlist .rank.top { color: #ffac2d; }
.mlist .poster { flex: none; width: 66px; height: 94px; border-radius: 3px; overflow: hidden; background: #f0f0f0; }
.mlist .poster img { width: 100%; height: 100%; object-fit: cover; }
.mlist .body { flex: 1; min-width: 0; }
.mlist .title { font-size: 16px; color: #333; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlist .rate { margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.mlist .rate .score { font-size: 13px; color: #ffac2d; font-weight: 600; }
.mlist .rate .votes { font-size: 12px; color: #bbb; }
.mlist .meta { margin-top: 4px; font-size: 13px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlist .quote { margin-top: 4px; font-size: 12px; color: #bbb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 星级评分 ---------- */
.stars { position: relative; display: inline-block; font-size: 12px; line-height: 1; letter-spacing: 1px; color: #ddd; }
.stars::before { content: "★★★★★"; }
.stars .fill { position: absolute; left: 0; top: 0; overflow: hidden; color: #ffac2d; white-space: nowrap; }
.stars .fill::before { content: "★★★★★"; }
.stars.big { font-size: 17px; }

/* ---------- 详情页 ---------- */
.dhead { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid #eee; }
.dhead .back { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.dhead .t { font-size: 16px; font-weight: 600; color: #333; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dhead .share { color: #42bd56; font-size: 14px; }

.detail-hero { display: flex; gap: 14px; padding: 18px 16px; }
.detail-hero .poster { flex: none; width: 110px; height: 156px; border-radius: 4px; overflow: hidden; background: #f0f0f0; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.detail-hero .poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .info { flex: 1; min-width: 0; }
.detail-hero h1 { font-size: 20px; color: #222; line-height: 1.3; }
.detail-hero .aka { margin-top: 4px; font-size: 12px; color: #aaa; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail-hero .meta { margin-top: 8px; font-size: 13px; color: #777; line-height: 1.7; }

.rate-panel { margin: 4px 16px 0; padding: 14px 16px; background: #faf8f4; border-radius: 8px; display: flex; gap: 18px; }
.rate-panel .left { text-align: center; }
.rate-panel .score-big { font-size: 30px; font-weight: 700; color: #494949; line-height: 1.2; }
.rate-panel .votes { margin-top: 4px; font-size: 11px; color: #aaa; }
.rate-panel .right { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.rate-bar { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #bbb; }
.rate-bar .bar { flex: 1; height: 4px; background: #eee; border-radius: 2px; overflow: hidden; }
.rate-bar .bar i { display: block; height: 100%; background: #ffc653; border-radius: 2px; }
.rate-bar .pct { width: 32px; text-align: right; }

.mark-btns { display: flex; gap: 10px; padding: 14px 16px 0; }
.mark-btns a {
  flex: 1; text-align: center; padding: 10px 0; border: 1px solid #ffac2d;
  color: #ffac2d; border-radius: 6px; font-size: 15px;
}

.dsection { padding: 0 16px; margin-top: 24px; }
.dsection h3 { font-size: 15px; color: #999; font-weight: 400; margin-bottom: 12px; }
.intro-text { font-size: 15px; color: #494949; line-height: 1.7; }
.intro-text.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.intro-toggle { margin-top: 6px; font-size: 14px; color: #42bd56; }

.casts { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.casts::-webkit-scrollbar { display: none; }
.cast { flex: none; width: 76px; text-align: center; }
.cast .ava { width: 76px; height: 100px; border-radius: 4px; overflow: hidden; background: #f0f0f0; }
.cast .ava img { width: 100%; height: 100%; object-fit: cover; }
.cast .n { margin-top: 5px; font-size: 12px; color: #494949; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast .role { font-size: 11px; color: #bbb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.photos { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.photos::-webkit-scrollbar { display: none; }
.photos img { flex: none; height: 120px; border-radius: 4px; background: #f0f0f0; }

.dfooter-links { margin-top: 26px; padding: 0 16px; }
.dfooter-links a { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid #f0f0f0; font-size: 15px; color: #494949; }
.dfooter-links a i { font-style: normal; color: #ccc; }

/* ---------- 页脚 ---------- */
.footer { margin-top: 36px; padding: 22px 16px 34px; text-align: center; background: #f7f7f7; }
.footer .flogo { font-size: 20px; font-weight: 700; color: #42bd56; }
.footer .links { margin-top: 8px; font-size: 12px; color: #999; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.footer .copy { margin-top: 6px; font-size: 11px; color: #bbb; }

/* ---------- 骨架屏/加载 ---------- */
.skeleton { padding: 14px 16px; display: flex; gap: 12px; border-bottom: 1px solid #f0f0f0; }
.skeleton .sp { width: 66px; height: 94px; border-radius: 3px; background: linear-gradient(90deg,#f0f0f0 25%,#e6e6e6 37%,#f0f0f0 63%); background-size: 400% 100%; animation: sk 1.2s infinite; }
.skeleton .sl { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.skeleton .sl i { height: 13px; border-radius: 3px; background: linear-gradient(90deg,#f0f0f0 25%,#e6e6e6 37%,#f0f0f0 63%); background-size: 400% 100%; animation: sk 1.2s infinite; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- 搜索页 ---------- */
.hot-tags { padding: 6px 16px 0; }
.hot-tags h4 { font-size: 14px; color: #999; font-weight: 400; margin-bottom: 12px; }
.hot-tags .tags { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-tags .tags a { padding: 7px 14px; background: #f5f5f5; border-radius: 16px; font-size: 14px; color: #494949; }
.search-empty { padding: 60px 0; text-align: center; color: #bbb; font-size: 14px; }

/* ---------- 榜单 tabs ---------- */
.tabs { display: flex; gap: 24px; padding: 12px 16px 0; border-bottom: 1px solid #eee; background: #fff; position: sticky; top: 43px; z-index: 40; }
.tabs a { padding: 8px 0 12px; font-size: 16px; color: #777; position: relative; }
.tabs a.on { color: #333; font-weight: 600; }
.tabs a.on::after { content: ""; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); width: 24px; height: 3px; background: #42bd56; border-radius: 2px; }

/* ---------- 假页面（stub） ---------- */
.stub-hero { padding: 40px 24px 0; text-align: center; }
.stub-hero .slogo { font-size: 28px; font-weight: 700; color: #42bd56; }
.stub-hero p { margin-top: 10px; color: #999; font-size: 14px; line-height: 1.8; }
.login-box { padding: 28px 24px; }
.login-box input { width: 100%; padding: 13px 14px; background: #f5f5f5; border-radius: 6px; font-size: 15px; margin-bottom: 14px; }
.login-box .btn { width: 100%; padding: 13px 0; background: #42bd56; color: #fff; border-radius: 6px; font-size: 16px; text-align: center; }
.login-box .btn.dis { background: #b7e4be; }
.login-box .agree { margin-top: 12px; font-size: 11px; color: #bbb; line-height: 1.6; }
.stub-list { padding: 8px 0; }
.stub-list li { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; font-size: 15px; color: #494949; }
.stub-list li .ic { flex: none; width: 40px; height: 40px; border-radius: 6px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(0,0,0,.75); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 20px; z-index: 99; opacity: 0; transition: opacity .2s;
  pointer-events: none; max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; }

/* ============================================================
   豆瓣 App 版顶部栏（真机一致：绿logo + 搜索 + 图标 + 打开App）
   ============================================================ */
.appbar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: #fff; position: sticky; top: 0; z-index: 60;
}
.appbar .dlogo { color: #2dbd5c; font-size: 21px; font-weight: 700; letter-spacing: .5px; flex: none; }
.appbar .sbox {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  background: #f2f2f2; border-radius: 16px; padding: 7px 12px; color: #b0b0b0; font-size: 14px;
}
.appbar .ibtn { flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; color: #b3b3b3; }
.appbar .openapp {
  flex: none; background: #3ec75a; color: #fff; font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 5px; white-space: nowrap;
}

/* ============================================================
   详情页（1:1 复刻 m.douban.com 电影详情）
   ============================================================ */
.hero { padding: 16px 14px 18px; color: #fff; }
.hero .row1 { display: flex; gap: 12px; }
.hero .poster {
  position: relative; flex: none; width: 92px; height: 130px; border-radius: 5px;
  overflow: hidden; background: rgba(255,255,255,.15);
}
.hero .poster img { width: 100%; height: 100%; object-fit: cover; }
.hero .poster .pbadge {
  position: absolute; right: 0; bottom: 0; background: #e79b2c; color: #fff;
  font-size: 11px; padding: 1px 5px; border-top-left-radius: 6px;
}
.hero .pinfo { flex: 1; min-width: 0; }
.hero h1 { font-size: 21px; font-weight: 600; line-height: 1.25; }
.hero .otitle { margin-top: 3px; font-size: 13px; opacity: .85; }
.hero .honor {
  display: inline-block; margin-top: 8px; background: #e79b2c; color: #fff;
  font-size: 11px; padding: 3px 7px; border-radius: 3px;
}
.hero .hmeta { margin-top: 8px; font-size: 13px; line-height: 1.6; opacity: .92; }

.markbtns { display: flex; gap: 10px; margin-top: 14px; }
.markbtns a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(255,255,255,.94); color: #333; font-size: 15px;
  padding: 9px 0; border-radius: 5px;
}
.markbtns a svg { flex: none; }

/* 豆瓣评分™ 面板 */
.ratecard {
  position: relative; margin: 0 12px; background: rgba(0,0,0,.22); border-radius: 8px;
  padding: 14px 96px 12px 14px; color: #fff; display: flex; gap: 12px;
}
.ratecard .l { flex: none; width: 96px; }
.ratecard .tm { font-size: 11px; opacity: .85; }
.ratecard .big { font-size: 34px; font-weight: 600; line-height: 1.15; margin-top: 2px; }
.ratecard .cnt { font-size: 11px; opacity: .8; margin-top: 4px; }
.ratecard .r { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: flex-start; }
.ratecard .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 16px; }
.rb { display: flex; align-items: center; gap: 5px; }
.rb .lb { font-size: 9px; opacity: .75; width: 18px; flex: none; }
.rb .tk { flex: 1; min-width: 0; height: 3px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.rb .tk i { display: block; height: 100%; background: #e8a33d; border-radius: 2px; }
.ratecard .appbtn {
  position: absolute; right: 12px; top: 14px;
  background: rgba(255,255,255,.9); color: #4a3320;
  font-size: 12px; padding: 6px 10px; border-radius: 5px; white-space: nowrap;
}

/* 豆瓣 App 推广卡 */
.promo {
  margin: 12px; border-radius: 8px; padding: 14px;
  background: linear-gradient(180deg, #fdf3dd, #fbe7bd);
  display: flex; gap: 12px; align-items: flex-start;
}
.promo .pt { flex: 1; }
.promo .pt h4 { font-size: 15px; font-weight: 600; color: #7b5b2e; }
.promo ol { margin-top: 8px; padding-left: 18px; color: #7b5b2e; font-size: 13px; line-height: 1.9; }
.promo .pbtn {
  flex: none; background: #ffd884; color: #6e4c17; font-size: 12px;
  padding: 7px 12px; border-radius: 5px; margin-top: 22px; white-space: nowrap;
}

/* 区块标题 */
.sec { padding: 0 14px; margin-top: 22px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sec-head h3 { font-size: 15px; font-weight: 400; color: #999; }
.sec-head .lk { font-size: 13px; color: #42bd56; }
.sec-title2 { font-size: 15px; color: #888; font-weight: 400; margin-bottom: 10px; }

/* 剧情简介 */
.intro-p { font-size: 15px; color: #333; line-height: 1.75; white-space: pre-wrap; }
.intro-p.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.intro-tg { display: inline-block; margin-top: 6px; font-size: 14px; color: #42bd56; }

/* 演职员卡片（含照片）—— 真机尺寸：约 66x92 竖版照片 + 片名/角色两行小字 */
.castrow { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.castrow::-webkit-scrollbar { display: none; }
.castcard { flex: none; width: 66px; text-align: center; }
.castcard .ph {
  display: block; width: 66px; height: 92px; border-radius: 4px; overflow: hidden; background: #f0f0f0;
}
.castcard .ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.castcard .nm {
  display: block; margin-top: 5px; font-size: 12px; line-height: 1.3; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.castcard .rl {
  display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: #999;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 预告片 / 剧照 */
.media-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.media-row::-webkit-scrollbar { display: none; }
.media-card {
  position: relative; flex: none; display: block; width: 118px; height: 72px; border-radius: 5px;
  overflow: hidden; background: #eee;
}
.media-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-card .tag {
  position: absolute; left: 0; top: 0; background: #e79b2c; color: #fff;
  font-size: 10px; padding: 1px 5px; border-bottom-right-radius: 6px;
}
.media-card .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
}
.media-card .rt {
  position: absolute; right: 5px; bottom: 4px; color: #fff; font-size: 11px;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* 短评 */
.cmt { display: flex; gap: 10px; padding: 16px 0; border-top: 1px solid #f0f0f0; }
.ava { display: block; flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #eee; }
.ava img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cmt .b { flex: 1; min-width: 0; }
.cmt .h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmt .nm { font-size: 15px; color: #333; }
.cmt .dt { font-size: 12px; color: #bbb; }
.starline { color: #ffac2d; font-size: 12px; letter-spacing: 1px; }
.starline .off { color: #ddd; }
.cmt .tx {
  margin-top: 8px; font-size: 15px; color: #333; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cmt .tx.open { -webkit-line-clamp: unset; }
.cmt .ex { color: #42bd56; font-size: 14px; }
.cmt .f { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.cmt .like { display: flex; align-items: center; gap: 5px; color: #999; font-size: 12px; }
.cmt .dots { color: #ccc; font-size: 16px; letter-spacing: 2px; }

/* 影评 */
.rev { display: flex; gap: 10px; padding: 16px 0; border-top: 1px solid #f0f0f0; }
.rev .b { flex: 1; min-width: 0; }
.rev .tt { margin-top: 8px; font-size: 16px; color: #333; font-weight: 500; line-height: 1.4; }
.rev .ab {
  margin-top: 6px; font-size: 14px; color: #666; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.rev .f { margin-top: 10px; font-size: 12px; color: #bbb; }
.rev .thumb { display: block; flex: none; width: 76px; height: 76px; border-radius: 4px; overflow: hidden; background: #f0f0f0; margin-top: 34px; }
.rev .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 喜欢这部片的人也喜欢 */
.recrow { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.recrow::-webkit-scrollbar { display: none; }
.reccard { flex: none; width: 64px; text-align: center; }
.reccard .ph { display: block; width: 64px; height: 90px; border-radius: 4px; overflow: hidden; background: #f0f0f0; }
.reccard .ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.reccard .nm {
  display: block; margin-top: 5px; font-size: 12px; line-height: 1.3; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 荣誉/收藏榜标签行 */
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tagrow span { font-size: 12px; color: #42bd56; background: #eefaf0; padding: 4px 9px; border-radius: 3px; }
