/* ================= RealShort · 首页 ================= */
:root {
  --bg: #000;
  --txt: #fff;
  --dim: rgba(255, 255, 255, .62);
  --dim2: rgba(255, 255, 255, .42);
  --red: #e5121e;
  --card: #141416;
  --line: rgba(255, 255, 255, .09);
  --pad: 60px;
  --radius: 8px;
  --hdr: 72px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2a2a2c; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ================= 顶部导航 ================= */
#nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--hdr);
  background: linear-gradient(180deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.72) 70%, rgba(0,0,0,0) 100%);
  backdrop-filter: blur(8px);
  transition: background .25s;
}
#nav.solid { background: rgba(0,0,0,.96); }
.nav-inner {
  height: 100%; max-width: 100%; padding: 0 var(--pad);
  display: flex; align-items: center; gap: 36px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(145deg, #ff2b3d, #c00d18);
  color: #fff; font-weight: 800; font-size: 19px;
  display: grid; place-items: center; letter-spacing: -.5px;
  box-shadow: 0 2px 10px rgba(229,18,30,.35);
}
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.nav-links { display: flex; align-items: center; gap: 28px; flex: 0 0 auto; }
.nav-link {
  font-size: 17px; font-weight: 600; color: var(--dim);
  transition: color .18s; white-space: nowrap;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: var(--red); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  color: #fff; opacity: .92; transition: opacity .18s, transform .18s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { opacity: 1; transform: scale(1.06); }
.lang-wrap { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 600; color: #fff; padding: 6px 4px;
}
.lang-btn svg { width: 19px; height: 19px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 190px; max-height: 420px; overflow-y: auto;
  background: #131315; border: 1px solid var(--line);
  border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,.7);
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: .18s;
}
.lang-menu.open { opacity: 1; pointer-events: auto; transform: none; }
.lang-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; color: var(--dim);
}
.lang-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.lang-item.on { color: var(--red); font-weight: 700; }
.burger { display: none; width: 34px; height: 34px; place-items: center; }
.burger svg { width: 24px; height: 24px; }

/* ================= Banner ================= */
#banner {
  position: relative;
  height: 62vh; min-height: 420px; max-height: 640px;
  overflow: hidden; margin-top: calc(-1 * var(--hdr));
}
.banner-track { position: absolute; inset: 0; }
.banner-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .75s ease;
  pointer-events: none;
}
.banner-slide.on { opacity: 1; pointer-events: auto; }
.banner-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 22%;
  transform: scale(1.06);
}
.banner-slide.on .banner-bg { animation: bzoom 9s ease-out forwards; }
@keyframes bzoom { from { transform: scale(1.06); } to { transform: scale(1.14); } }
.banner-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.96) 0%, rgba(0,0,0,.82) 38%, rgba(0,0,0,.15) 68%, rgba(0,0,0,.55) 100%),
    linear-gradient(0deg, #000 0%, rgba(0,0,0,.35) 34%, rgba(0,0,0,0) 62%);
}
.banner-body {
  position: relative; z-index: 2;
  height: 100%; padding: 0 var(--pad);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 62px; width: 100%; max-width: 720px;
  overflow: hidden;
}
.banner-title {
  font-size: clamp(30px, 3.2vw, 52px); line-height: 1.12; font-weight: 800;
  margin: 0 0 16px; letter-spacing: -.6px;
  width: 100%; max-width: 100%; white-space: normal; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 3px 24px rgba(0,0,0,.75);
}
.banner-tags { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.b-tag {
  font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 20px;
  background: rgba(255,255,255,.16); backdrop-filter: blur(4px);
}
.b-tag.first { background: #fff; color: #000; }
.banner-desc {
  font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,.72);
  margin: 0 0 26px; max-width: 620px; width: 100%;
  overflow-wrap: anywhere; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.banner-play {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; color: #000;
  font-size: 16px; font-weight: 700;
  padding: 13px 34px; border-radius: 40px;
  width: fit-content; transition: transform .18s, box-shadow .18s;
}
.banner-play:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,255,255,.22); }
.banner-play svg { width: 17px; height: 17px; }
.banner-dots {
  position: absolute; left: var(--pad); bottom: 26px; z-index: 3;
  display: flex; gap: 6px;
}
.b-dot { width: 22px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.25); transition: .2s; }
.b-dot.on { background: #fff; }
.banner-thumbs {
  position: absolute; right: var(--pad); bottom: 34px; z-index: 3;
  display: flex; gap: 10px; align-items: center;
}
.b-thumb {
  width: 52px; height: 70px; border-radius: 6px; overflow: hidden;
  border: 2px solid transparent; opacity: .5; transition: .2s;
  background: #1a1a1c; flex: 0 0 auto;
}
.b-thumb img { width: 100%; height: 100%; object-fit: cover; }
.b-thumb.on { opacity: 1; border-color: #fff; transform: scale(1.06); }

/* ================= 书架 ================= */
main { padding: 34px 0 40px; position: relative; z-index: 4; background: #000; }
.shelf { margin-bottom: 42px; }
.shelf-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad); margin-bottom: 16px;
}
.shelf-title { font-size: 22px; font-weight: 800; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; }
.shelf-more {
  font-size: 14px; color: var(--dim); display: inline-flex; align-items: center; gap: 4px;
  transition: color .18s;
}
.shelf-more:hover { color: #fff; }
.shelf-more svg { width: 15px; height: 15px; }
.shelf-rail-wrap { position: relative; }
.shelf-rail {
  display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth;
  padding: 4px var(--pad) 10px;
  scrollbar-width: none;
}
.shelf-rail::-webkit-scrollbar { display: none; }
.rail-nav {
  position: absolute; top: 50%; transform: translateY(-60%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(18,18,20,.92); border: 1px solid var(--line);
  display: grid; place-items: center; z-index: 6;
  opacity: 0; transition: opacity .2s, background .2s;
  backdrop-filter: blur(6px);
}
.rail-nav svg { width: 20px; height: 20px; }
.rail-nav.left { left: 14px; }
.rail-nav.right { right: 14px; }
.shelf:hover .rail-nav { opacity: 1; }
.rail-nav:hover { background: rgba(40,40,44,.95); }

/* 卡片 */
.card { width: 208px; flex: 0 0 auto; cursor: pointer; }
.card-cover {
  position: relative; width: 100%; aspect-ratio: 3 / 4;
  border-radius: var(--radius); overflow: hidden; background: var(--card);
  transition: transform .22s, box-shadow .22s;
}
.card:hover .card-cover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,.6); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
  position: absolute; left: 8px; bottom: 8px;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 5px;
  background: rgba(0,0,0,.72); backdrop-filter: blur(4px);
  display: inline-flex; align-items: center; gap: 4px;
}
.card-badge svg { width: 11px; height: 11px; }
.card-badge.hot { background: #e5121e; }
.card-badge.new { background: #ff7a00; }
.card-badge.orig { background: #6b2bd9; }
.card-title {
  margin: 10px 0 4px; font-size: 14.5px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 39px;
}
.card-tags {
  font-size: 12px; color: var(--dim2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-rank {
  position: absolute; left: 6px; top: 0; z-index: 2;
  font-size: 62px; font-weight: 900; line-height: 1;
  color: #fff; -webkit-text-stroke: 3px #fff;
  text-shadow: 0 4px 18px rgba(0,0,0,.85);
  font-family: "Arial Black", Impact, sans-serif;
  letter-spacing: -4px;
}
.card-rank.r1 { color: #ffcf4d; -webkit-text-stroke: 3px #ffcf4d; }
.card-rank.r2 { color: #dfe3ea; -webkit-text-stroke: 3px #dfe3ea; }
.card-rank.r3 { color: #ffa15c; -webkit-text-stroke: 3px #ffa15c; }
.rank-shelf .card-cover { overflow: visible; }
.rank-shelf .card-cover img { border-radius: var(--radius); }

/* ================= 搜索层 ================= */
.search-layer {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.86); backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none; transition: opacity .22s;
  padding-top: 120px;
}
.search-layer.open { opacity: 1; pointer-events: auto; }
.search-box {
  max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  background: #141416; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px;
}
.search-box .s-ico { width: 22px; height: 22px; color: var(--dim); flex: 0 0 auto; }
#searchInput {
  flex: 1; background: none; border: 0; outline: none;
  color: #fff; font-size: 17px; font-family: inherit;
}
.s-close { width: 30px; height: 30px; display: grid; place-items: center; color: var(--dim); }
.s-close svg { width: 20px; height: 20px; }
.search-result {
  max-width: 760px; margin: 22px auto 0; padding: 0 4px;
  max-height: 62vh; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px;
}

/* ================= 观看历史（下拉框） ================= */
.hist-mask {
  position: fixed; inset: 0; z-index: 190;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.hist-mask.open { opacity: 1; pointer-events: auto; }

.hist-drop {
  position: fixed; z-index: 191;
  top: 60px; right: var(--pad);
  width: 340px; max-height: 460px;
  background: #131315; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,.75);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s, transform .18s;
}
.hist-drop.open { opacity: 1; pointer-events: auto; transform: none; }

.hd-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.hd-head span {
  flex: 1 1 auto; font-size: 13.5px; font-weight: 700; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hd-clear {
  font-size: 12px; color: var(--dim2); padding: 3px 9px;
  border-radius: 6px; flex: 0 0 auto;
  transition: background .16s, color .16s;
}
.hd-clear:hover { background: rgba(255,255,255,.09); color: #fff; }

.hd-list { overflow-y: auto; flex: 1 1 auto; padding: 6px; }
.hd-list::-webkit-scrollbar { width: 4px; }
.hd-list::-webkit-scrollbar-thumb { background: #2c2c30; border-radius: 3px; }

.hd-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px; border-radius: 9px; cursor: pointer;
  transition: background .15s;
}
.hd-item:hover { background: rgba(255,255,255,.07); }
.hd-thumb {
  position: relative; width: 42px; height: 56px; flex: 0 0 auto;
  border-radius: 6px; overflow: hidden; background: var(--card);
}
.hd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hd-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px;
  background: rgba(0,0,0,.5);
}
.hd-fill { height: 100%; background: var(--red); }
.hd-meta { flex: 1 1 auto; min-width: 0; }
.hd-name {
  font-size: 13px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 3px;
}
.hd-sub { font-size: 11.5px; color: var(--dim2); }
.hd-del {
  width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; color: var(--dim2);
  opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.hd-item:hover .hd-del { opacity: 1; }
.hd-del:hover { color: #fff; background: rgba(255,255,255,.1); }
.hd-del svg { width: 12px; height: 12px; }

.hd-empty {
  padding: 32px 16px; text-align: center;
  font-size: 13px; color: var(--dim2); line-height: 1.6;
}

@media (max-width: 900px) {
  .hist-drop { width: calc(100vw - 24px); right: 12px; top: 54px; max-height: 62vh; }
}

/* ================= App 下载二维码弹层（悬停手机图标） ================= */
.app-wrap { position: relative; display: flex; align-items: center; }
.app-pop {
  position: absolute; top: calc(100% + 12px); right: -44px;
  width: 392px;
  display: flex; align-items: center; gap: 18px;
  padding: 18px 20px;
  background: #1c1c1e;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  box-shadow: 0 20px 56px rgba(0,0,0,.82);
  opacity: 0; pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s, transform .18s;
  z-index: 120;
}
.app-pop::before {
  content: ""; position: absolute; top: -7px; right: 56px;
  width: 13px; height: 13px; background: #1c1c1e;
  border-left: 1px solid rgba(255,255,255,.08);
  border-top: 1px solid rgba(255,255,255,.08);
  transform: rotate(45deg);
}
.app-wrap:hover .app-pop,
.app-pop:hover { opacity: 1; pointer-events: auto; transform: none; }

.ap-left { flex: 1 1 auto; min-width: 0; }
.ap-title {
  font-size: 14px; font-weight: 700; color: #fff;
  margin-bottom: 14px; line-height: 1.35;
}
.ap-os { display: flex; gap: 12px; margin-bottom: 10px; }
.ap-ico { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; }
.ap-ico svg { width: 26px; height: 26px; }
.ap-hint {
  font-size: 12px; color: var(--dim2); line-height: 1.4; white-space: nowrap;
}
.ap-right {
  flex: 0 0 auto; width: 128px; height: 128px;
  background: #fff; border-radius: 10px; padding: 5px;
  display: grid; place-items: center;
}
.ap-right img { width: 100%; height: 100%; object-fit: contain; }

/* ================= 页脚 ================= */
#footer { border-top: 1px solid var(--line); padding: 52px var(--pad) 60px; background: #030303; }
.ft-inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr .9fr; gap: 44px;
  align-items: start;
}
.ft-brand .brand { margin-bottom: 18px; }
.ft-copy { font-size: 13px; color: var(--dim2); margin: 0 0 20px; }
.ft-social { display: flex; gap: 12px; }
.soc {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  display: grid; place-items: center; color: #fff;
  cursor: default; pointer-events: none;   /* 只显示，不可点 */
}
.soc svg { width: 19px; height: 19px; }
.ft-col h4 { font-size: 13px; letter-spacing: .8px; margin: 0 0 18px; color: #fff; font-weight: 700; }
.ft-link {
  display: block; font-size: 14px; margin-bottom: 14px; color: var(--dim);
  cursor: default; pointer-events: none;   /* 只显示，不可点 */
}
.ft-link.dim { color: var(--dim2); }
.ft-hours { font-size: 12.5px; color: var(--dim2); line-height: 1.5; margin: 4px 0 0; }
.qr-card {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  background: #121214; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.qr-card img { width: 110px; height: 110px; object-fit: contain; background: #fff; border-radius: 6px; padding: 5px; }
.qr-card span { font-size: 12px; color: var(--dim); text-align: center; }

/* ================= 移动端抽屉 ================= */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 200;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; left: 0; top: 0; bottom: 0; width: 274px;
  background: #0c0c0e; z-index: 201; transform: translateX(-101%);
  transition: transform .28s cubic-bezier(.22,.75,.2,1);
  padding: 22px 20px; overflow-y: auto;
  border-right: 1px solid var(--line);
}
.drawer.open { transform: none; }
.dw-head { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.dw-item {
  display: block; width: 100%; text-align: left;
  font-size: 16px; font-weight: 600; color: var(--dim);
  padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.dw-item.active { color: var(--red); }
.dw-sep { height: 20px; }
.dw-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dw-lang { font-size: 13px; color: var(--dim); padding: 9px 6px; border-radius: 7px; text-align: left; }
.dw-lang.on { color: var(--red); font-weight: 700; }

/* ================= 响应式 ================= */
@media (max-width: 1200px) {
  :root { --pad: 28px; }
  .card { width: 176px; }
  .ft-inner { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
  .ft-dl { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  :root { --hdr: 58px; --pad: 16px; }
  .nav-links { display: none; }
  .only-desktop { display: none !important; }
  .burger { display: grid; }
  .brand-icon { width: 30px; height: 30px; font-size: 17px; border-radius: 8px; }
  .brand-name { font-size: 18px; }
  .lang-wrap { display: none; }
  .nav-inner { gap: 12px; }
  .nav-right { gap: 10px; }

  #banner { height: auto; min-height: 0; max-height: none; aspect-ratio: 1 / 1.14; }
  .banner-body { padding-bottom: 74px; max-width: 100%; width: 100%; }
  .banner-title {
    font-size: 22px; -webkit-line-clamp: 2; line-height: 1.2;
    max-width: 100%; overflow-wrap: anywhere; word-break: break-word;
  }
  .banner-desc { font-size: 13px; -webkit-line-clamp: 2; margin-bottom: 18px; max-width: 100%; width: 100%; }
  .banner-play { padding: 11px 26px; font-size: 15px; }
  .banner-thumbs, .banner-dots { display: none; }

  .nav-inner { padding: 0 var(--pad); }
  .nav-right { gap: 6px; }
  .icon-btn { width: 32px; height: 32px; }
  .icon-btn svg { width: 21px; height: 21px; }

  main { padding-top: 24px; }
  .shelf { margin-bottom: 28px; }
  .shelf-title { font-size: 18px; }
  .shelf-more { font-size: 13px; }
  .shelf-rail { gap: 12px; }
  .card { width: 106px; }
  .card-title { font-size: 12.5px; min-height: 34px; margin-top: 8px; }
  .card-tags { font-size: 11px; }
  .card-rank { font-size: 38px; -webkit-text-stroke: 2px #fff; }
  .rail-nav { display: none; }
  .qr-card img { width: 92px; height: 92px; }
  .ft-inner { grid-template-columns: 1fr 1fr; gap: 26px; }
  .ft-brand { grid-column: 1 / -1; }
  #footer { padding: 34px var(--pad) 40px; }
  .search-layer { padding-top: 80px; }
  .search-result { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
}
