/* 基础样式 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: touch;
}

html {
  overflow: hidden;
}

img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

/* 移动端落地页（index.html）
   以 750 设计稿为基准：1rem = 屏宽 / 7.5（最大 480px），由页面内脚本设置 */

html,
body {
  background: #0c0c0d;
}

#app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  transform: translateZ(0); /* 让内部 fixed 元素相对 #app 定位 */
}

/* ---------- 页面骨架 ---------- */
.page {
  --header-h: 1.34rem;
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(2.0097560976rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(179.36deg, #0c0c0d 10.63%, #0c062f 168.46%);
  color: #fff;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- 顶部栏 ---------- */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 0.3395121951rem 0 0.260097561rem;
  background: #200203;
}

.brand {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.1073170732rem;
  min-width: 0;
}

.logo {
  display: block;
  flex-shrink: 0;
  width: 0.7609756098rem;
  height: 0.7609756098rem;
  border-radius: 0.16rem;
  object-fit: cover;
}

.brand-text {
  min-width: 0;
  overflow: hidden;
}

.brand-text p {
  margin: 0;
  overflow: hidden;
  font-family: Inter, "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.3280390244rem;
  line-height: 0.4097560976rem;
  letter-spacing: 0.0328039024rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-name {
  font-weight: 600;
}

.brand-sub {
  font-weight: 400;
}

.entries {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  gap: 0.28rem;
  margin-left: 0.156097561rem;
}

.entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.04rem;
  width: 0.48rem;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.entry img {
  display: block;
  width: 0.48rem;
  height: 0.48rem;
}

.entry span {
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 0.2rem;
  line-height: 1.2;
  letter-spacing: 0.016rem;
  white-space: nowrap;
}

/* ---------- Banner ---------- */
.banner {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 100%;
  height: 3.4361756098rem;
}

.banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.banner::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0.7414634146rem;
  background: linear-gradient(86.73deg, #0000 17.1%, #000 90.08%);
  pointer-events: none;
}

/* ---------- 列表面板 ---------- */
.panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 6.9073170732rem;
  min-height: 0;
  margin: 0.1736585366rem auto 0;
  padding: 0.1404878049rem 0.1229268293rem 0.2341463415rem;
  overflow: hidden;
  background: #040425;
  border: 0.02rem solid #230c6f;
  border-radius: 0.42rem;
}

.tabs {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.4rem;
  height: 0.6790243902rem;
  padding: 0 0.0583414634rem;
  background: linear-gradient(90deg, #6d45f1, #1a6cf1);
  border: 0.0194146341rem solid #2d78f7;
  border-radius: 19.3951219512rem;
}

.tab {
  flex-shrink: 0;
  width: 0.9708487805rem;
  height: 0.5630829268rem;
  padding: 0 0 0 0.0466341463rem;
  background: transparent;
  border: 0;
  border-radius: 18.087804878rem;
  color: #fff;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 0.232995122rem;
  font-weight: 500;
  line-height: 0.5630829268rem;
  letter-spacing: 0.046595122rem;
  text-align: center;
  cursor: pointer;
}

.tab.active {
  background: #fff;
  color: #1c6bf0;
}

.list {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.grid {
  display: grid;
}

.grid[hidden] {
  display: none;
}

.card {
  min-width: 0;
}

.card img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.card p {
  overflow: hidden;
  color: #fff;
  font-family: Inter, "PingFang SC", sans-serif;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 短剧：三列 */
.drama-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2331317073rem 0.0971317073rem;
  padding-top: 0.163902439rem;
}

.drama-grid img {
  height: 3.1862243902rem;
  border-radius: 0.1554341463rem;
}

.drama-grid p {
  margin: 0.1942829268rem 0 0;
  font-size: 0.2331317073rem;
  line-height: 0.3497170732rem;
}

/* 精选 / 热门：两列 */
.pick-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0.1756097561rem 0.1326829268rem;
  padding: 0.2341463415rem 0.1853658537rem 0;
}

.pick-grid img {
  height: 1.7546731707rem;
  border-radius: 0.156097561rem;
}

.pick-grid p {
  margin: 0.1827707317rem 0 0;
  font-size: 0.1828292683rem;
  line-height: 0.308195122rem;
}

/* ---------- 底部下载条 ---------- */
.cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: block;
  width: 100%;
  height: calc(2.0097560976rem + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #0c062f;
}

.cta img {
  display: block;
  width: 100%;
  height: 2.0097560976rem;
  object-fit: cover;
}
