/* ===== 千啦影视 - 全局样式（多主题 + 移动端底部导航） ===== */
:root {
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-card2: #1f2330;
  --bg-input: #12141c;
  --border: #232733;
  --border2: #2a2f3d;
  --text: #e6e8ee;
  --text2: #aab2c5;
  --text3: #8b93a7;
  --text4: #6d7587;
  --accent: #3b6ef5;
  --accent-hover: #2f5cd6;
  --gold: #ffd166;
  --red: #e74c3c;
  --green: #7ee2a8;
}
body.theme-light {
  --bg: #f5f6f8;
  --bg-card: #ffffff;
  --bg-card2: #f0f2f5;
  --bg-input: #ffffff;
  --border: #e4e7ed;
  --border2: #dcdfe6;
  --text: #1f2329;
  --text2: #4e5969;
  --text3: #86909c;
  --text4: #a9aeb8;
  --accent: #3b6ef5;
  --accent-hover: #2f5cd6;
  --gold: #d48806;
  --red: #e74c3c;
  --green: #00b42a;
}
body.theme-red {
  --bg: #140d0d;
  --bg-card: #1f1414;
  --bg-card2: #2a1818;
  --bg-input: #120a0a;
  --border: #332020;
  --border2: #402828;
  --text: #f0e6e6;
  --text2: #c9b0b0;
  --text3: #9a7a7a;
  --text4: #6e5555;
  --accent: #e74c3c;
  --accent-hover: #c0392b;
  --gold: #ffd166;
  --red: #ff6b6b;
  --green: #7ee2a8;
}
body.theme-blue {
  --bg: #0a0e1a;
  --bg-card: #111827;
  --bg-card2: #1a2332;
  --bg-input: #0d1220;
  --border: #1e2a3f;
  --border2: #283650;
  --text: #e8edf5;
  --text2: #a8b5cc;
  --text3: #7a8aa5;
  --text4: #556480;
  --accent: #00b4ff;
  --accent-hover: #0099dd;
  --gold: #ffd166;
  --red: #ff6b6b;
  --green: #7ee2a8;
}
/* ===== 科技主题：未来感 + 玻璃拟态 + 霓虹发光 ===== */
body.theme-tech {
  --bg: #050810;
  --bg-card: rgba(15, 25, 45, 0.55);
  --bg-card2: rgba(25, 45, 75, 0.45);
  --bg-input: rgba(10, 18, 35, 0.7);
  --border: rgba(0, 200, 255, 0.15);
  --border2: rgba(0, 200, 255, 0.28);
  --text: #e8f4ff;
  --text2: #a8c8e8;
  --text3: #6a8cb0;
  --text4: #4a6a8a;
  --accent: #00d4ff;
  --accent-hover: #00f0ff;
  --gold: #ffd166;
  --red: #ff4d6d;
  --green: #00ffaa;
  background: linear-gradient(135deg, #050810 0%, #0a1228 50%, #0d1a35 100%);
  background-attachment: fixed;
}
body.theme-tech .card,
body.theme-tech .d-head,
body.theme-tech .d-intro,
body.theme-tech .d-eps,
body.theme-tech .pp-nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 200, 255, 0.15);
}
body.theme-tech .btn-play,
body.theme-tech .top-search button,
body.theme-tech .eps-list a.cur {
  background: rgba(0, 212, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.12);
  color: #00f0ff;
}
body.theme-tech .btn-play:hover {
  background: rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.45);
}
body.theme-tech .top,
body.theme-tech .foot,
body.theme-tech .bottom-nav {
  background: rgba(8, 14, 28, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.theme-tech .bt i {
  background: linear-gradient(180deg, #00f0ff, #0088ff);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

/* ===== 百度风格主题：白底 + 百度蓝 + 大搜索框 + 卡片阴影 ===== */
body.theme-baidu {
  --bg: #f5f5f6;
  --bg-card: #ffffff;
  --bg-card2: #f0f1f3;
  --bg-input: #ffffff;
  --border: #e5e6eb;
  --border2: #dcdfe6;
  --text: #1f2329;
  --text2: #4e5969;
  --text3: #86909c;
  --text4: #a9aeb8;
  --accent: #4e6ef2;
  --accent-hover: #2932e1;
  --gold: #d48806;
  --red: #f53f3f;
  --green: #00b42a;
}
/* 百度风：顶部纯白 */
body.theme-baidu .top {
  background: #ffffff;
  border-bottom: 1px solid #eee;
}
body.theme-baidu .cat-bar {
  background: #f5f5f6;
  border-top: 1px solid #eee;
}
body.theme-baidu .cat-bar a { color: #333; }
body.theme-baidu .cat-bar a.on { color: #4e6ef2; }
/* 百度风：搜索框 */
body.theme-baidu .top-search {
  border: 2px solid #c4c7ce;
  border-radius: 10px;
}
body.theme-baidu .top-search input {
  padding: 10px 16px;
  font-size: 15px;
}
body.theme-baidu .top-search input:focus {
  border-color: #4e6ef2;
}
body.theme-baidu .top-search button {
  background: #4e6ef2;
  padding: 10px 20px;
}
body.theme-baidu .top-search button:hover { background: #2932e1; }
/* 百度风：卡片白色 + 悬浮阴影 */
body.theme-baidu .card {
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
}
body.theme-baidu .card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
/* 百度风：播放按钮蓝色圆角 */
body.theme-baidu .btn-play {
  background: #4e6ef2;
  border-radius: 6px;
}
body.theme-baidu .btn-play:hover { background: #2932e1; }
/* 百度风：底部纯白 */
body.theme-baidu .foot {
  background: #ffffff;
  border-top: 1px solid #eee;
}
body.theme-baidu .bottom-nav {
  background: #ffffff;
  border-top: 1px solid #eee;
}

/* ===== 蚂蚁影院风格：纯白 + 黑色导航栏 + 简洁卡片 ===== */
body.theme-ant {
  --bg: #ffffff;
  --bg-card: #ffffff;
  --bg-card2: #f7f7f7;
  --bg-input: #f5f5f5;
  --border: #eeeeee;
  --border2: #e5e5e5;
  --text: #1a1a1a;
  --text2: #666666;
  --text3: #999999;
  --text4: #bbbbbb;
  --accent: #ff5b35;
  --accent-hover: #e64a25;
  --gold: #ff9500;
  --red: #ff3b30;
  --green: #34c759;
}
/* 蚂蚁风：顶部纯白 */
body.theme-ant .top {
  background: #ffffff;
  border-bottom: 1px solid #eee;
}
body.theme-ant .logo {
  color: #1a1a1a;
  font-size: 24px;
  font-weight: 900;
}
/* 蚂蚁风：搜索框浅灰圆角 */
body.theme-ant .top-search {
  background: #f5f5f5;
  border: none;
  border-radius: 18px;
}
body.theme-ant .top-search input {
  color: #333;
  font-size: 14px;
}
body.theme-ant .top-search input::placeholder { color: #999; }
body.theme-ant .top-search button {
  background: transparent;
  color: #999;
  padding: 8px 12px;
}
/* 蚂蚁风：黑色导航栏 */
body.theme-ant .cat-bar {
  background: #2b2b2b;
  border-top: none;
}
body.theme-ant .cat-bar a {
  color: #cccccc;
  font-size: 15px;
  padding: 12px 20px;
}
body.theme-ant .cat-bar a:hover { color: #ffffff; }
body.theme-ant .cat-bar a.on {
  color: #ffffff;
  background: #1a1a1a;
  font-weight: normal;
}
body.theme-ant .cat-bar a.on::after { display: none; }
/* 蚂蚁风：提示条 */
body.theme-ant .tips-bar {
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
  color: #666;
}
body.theme-ant .tips-bar span { color: #ff3b30; }
/* 蚂蚁风：区块标题 */
body.theme-ant .bt {
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 700;
}
body.theme-ant .bt i {
  background: #ff5b35;
  width: 5px;
  height: 18px;
}
/* 蚂蚁风：卡片简洁无阴影 */
body.theme-ant .card {
  box-shadow: none;
  border: none;
  border-radius: 4px;
}
body.theme-ant .card .pic {
  border-radius: 4px;
}
body.theme-ant .card .badge {
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 11px;
  border-radius: 0;
  right: 0;
  bottom: 0;
  left: 0;
  text-align: center;
  padding: 3px 0;
}
body.theme-ant .card .info h3 {
  color: #1a1a1a;
  font-size: 13px;
  font-weight: normal;
  text-align: center;
  margin-top: 6px;
}
body.theme-ant .card .info p {
  display: none;
}
/* 蚂蚁风：播放按钮 */
body.theme-ant .btn-play {
  background: #ff5b35;
  border-radius: 4px;
}
body.theme-ant .btn-play:hover { background: #e64a25; }
/* 蚂蚁风：底部 */
body.theme-ant .foot {
  background: #f7f7f7;
  border-top: 1px solid #eee;
  color: #999;
}
body.theme-ant .bottom-nav {
  background: #ffffff;
  border-top: 1px solid #eee;
}
body.theme-ant .bottom-nav a.on { color: #ff5b35; }

*{box-sizing:border-box;margin:0;padding:0}
html{font-size:15px;-webkit-text-size-adjust:100%}
body{background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;line-height:1.6}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%;border:0}
.wrap{max-width:1200px;margin:0 auto;padding:0 12px}

/* 顶部 */
.top{background:var(--bg-card);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:100}
.head-bar{display:flex;align-items:center;gap:10px;padding:10px 12px}
.logo{font-size:22px;font-weight:800;color:var(--text);white-space:nowrap;letter-spacing:-0.5px}
.logo img{height:30px;width:auto}
.top-search{flex:1;display:flex;align-items:center;background:var(--bg-input);border:1px solid var(--border2);border-radius:20px;overflow:hidden;max-width:420px;margin:0 auto}
.top-search input{flex:1;border:0;background:transparent;color:var(--text);padding:8px 14px;font-size:14px;outline:none;min-width:0}
.top-search input::placeholder{color:var(--text3)}
.top-search button{border:0;background:var(--accent);color:#fff;padding:8px 14px;cursor:pointer;font-size:14px}
.head-icon{font-size:22px;color:var(--text2);text-decoration:none;flex-shrink:0;padding:4px}
/* 分类导航栏 */
.cat-bar{background:var(--bg-card2);border-top:1px solid var(--border)}
.cat-inner{display:flex;gap:0;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.cat-inner::-webkit-scrollbar{display:none}
.cat-bar a{flex-shrink:0;padding:11px 18px;color:var(--text2);font-size:15px;text-decoration:none;white-space:nowrap;position:relative;transition:color .2s}
.cat-bar a:hover{color:var(--text)}
.cat-bar a.on{color:var(--accent);font-weight:600}
.cat-bar a.on::after{content:'';position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:24px;height:3px;background:var(--accent);border-radius:2px}
/* 防止走丢提示条 */
.tips-bar{background:var(--bg-card2);padding:8px 0;text-align:center;font-size:13px;color:var(--text3);border-bottom:1px solid var(--border)}
.tips-bar span{color:var(--red);font-weight:600}

/* Banner */
.banner{padding:12px 0}
.slide{display:block;height:160px;border-radius:10px;background-size:cover;background-position:center;position:relative;overflow:hidden}
.slide span{position:absolute;left:12px;bottom:10px;background:rgba(0,0,0,.6);padding:4px 10px;border-radius:6px;font-size:13px;color:#fff}

/* 区块 */
.block{margin:18px 0 8px}
.bt{display:flex;align-items:center;font-size:17px;color:var(--text);margin-bottom:12px}
.bt i{display:inline-block;width:4px;height:16px;background:var(--accent);border-radius:2px;margin-right:8px}
.bt .more{margin-left:auto;font-size:13px;color:var(--text3);font-weight:normal}
.bt .cnt{margin-left:10px;font-size:12px;color:var(--text3);font-weight:normal}

/* 卡片网格 */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:10px}
.card{background:var(--bg-card);border-radius:8px;overflow:hidden;transition:transform .15s}
.card:active{transform:scale(.97)}
.card .pic{position:relative;aspect-ratio:2/3;background:var(--bg-card2);overflow:hidden}
.card .pic img{width:100%;height:100%;object-fit:cover}
.card .badge{position:absolute;right:4px;bottom:4px;background:rgba(0,0,0,.7);color:var(--gold);font-size:11px;padding:1px 6px;border-radius:4px}
.card .info{padding:6px 8px}
.card .info h3{font-size:13px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.card .info p{font-size:11px;color:var(--text3);margin-top:2px}
.card em{color:var(--gold);font-style:normal}

/* 详情 */
.detail{padding-bottom:30px}
.d-head{display:flex;gap:16px;background:var(--bg-card);padding:16px;border-radius:10px}
.d-pic{width:130px;flex-shrink:0}
.d-pic img{width:100%;border-radius:8px;aspect-ratio:2/3;object-fit:cover}
.d-info{flex:1;min-width:0}
.d-info h1{font-size:18px;color:var(--text);margin-bottom:8px}
.d-info .meta{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--text3);margin-bottom:8px}
.d-info .actor,.d-info .director{font-size:13px;color:var(--text2);margin:4px 0}
.btn-play{display:inline-block;margin-top:10px;padding:9px 22px;background:var(--accent);color:#fff;border-radius:20px;font-size:14px}
.d-intro,.d-eps{background:var(--bg-card);padding:14px;border-radius:10px;margin-top:14px}
.d-intro h3,.d-eps h3{font-size:15px;color:var(--text);margin-bottom:8px}
.d-intro p{font-size:13px;color:var(--text2);line-height:1.8;word-break:break-all;overflow-wrap:break-word;max-width:100%}
.d-info .actor,.d-info .director{word-break:break-all;overflow-wrap:break-word}
.eps-group{margin-bottom:10px}
.eps-title{font-size:13px;color:var(--text3);margin:8px 0 6px}
.eps-list{display:flex;flex-wrap:wrap;gap:6px}
.eps-list a{padding:5px 11px;background:var(--bg-card2);border-radius:6px;font-size:12px;color:var(--text2)}
.eps-list a.cur,.eps-list a:hover{background:var(--accent);color:#fff}

/* 播放页 */
.play-page{padding-bottom:30px}
.pp-title{font-size:15px;color:var(--text);margin:10px 0}
.player{width:100%;aspect-ratio:16/9;background:#000;border-radius:10px;overflow:hidden}
.player iframe,.player video{width:100%;height:100%;border:0}
.pp-nav{background:var(--bg-card);padding:12px;border-radius:10px;margin-top:12px}
.pp-info{margin-top:12px;font-size:13px;color:var(--text3);line-height:1.9}
.pp-info a{color:var(--accent)}
.none{padding:40px;text-align:center;color:var(--text3)}

/* 排行 */
.card.rank{position:relative}
.rk{position:absolute;left:0;top:0;background:var(--bg-card2);color:var(--text3);font-size:12px;padding:2px 8px;border-radius:8px 0 8px 0;z-index:2}
.rk.top{background:var(--red);color:#fff}

/* 分页 */
.pages{display:flex;justify-content:center;gap:6px;margin:18px 0;flex-wrap:wrap}
.pages a{padding:6px 12px;background:var(--bg-card);border-radius:6px;font-size:13px;color:var(--text2)}
.pages a.cur{background:var(--accent);color:#fff}

/* 底部 */
.foot{background:var(--bg-card);border-top:1px solid var(--border);margin-top:30px;padding:20px 0;text-align:center;font-size:12px;color:var(--text4);line-height:2}
.foot a{margin:0 6px}

/* ===== 移动端底部悬浮导航（已移除） ===== */
.bottom-nav{display:none!important}

/* 移动端：显示底部导航 */
@media (max-width:768px){
  body{padding-bottom:0}
  .slide{height:160px}
  .d-pic{width:110px}
  .d-info h1{font-size:17px}
  .head-bar{padding:8px 10px;gap:8px}
  .logo{font-size:18px}
  .top-search input{padding:7px 12px;font-size:13px}
  .cat-bar a{padding:8px 14px;font-size:13px}
  .tips-bar{font-size:12px;padding:6px 0}
}

/* 平板/PC */
@media (min-width:768px){
  .grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:14px}
  .slide{height:340px}
  .d-pic{width:200px}
  .d-info h1{font-size:24px}
}
