/* ============================================================
   ReelShort 短剧引流落地页样式
   风格：白色 / 浅粉亮色时尚主题 + ReelShort 红 (#e73857)
   - 电影海报三行横向无限滚动墙（偶数行反向，交错流动）
   - 热播短剧海报卡片水平轮播
   - 看剧任务积分模块 + VIP 解锁进度条
   - 红色 CTA 四联动动画（渐变流动 / 光泽扫过 / 脉冲光圈 / 呼吸缩放）
   ============================================================ */

:root {
  --red: #e73857;          /* ReelShort 品牌主色 */
  --red-light: #ff5a70;
  --red-dark: #c81f42;
  --red-soft: #fff0f3;     /* 浅粉底 */
  --red-soft-2: #ffe3e9;
  --gold: #ffb020;
  --ink: #241a20;          /* 暖黑标题 */
  --ink-2: #6f5f66;        /* 次要文字 */
  --ink-3: #a0909a;        /* 弱化文字 */
  --card: rgba(255, 255, 255, .92);
  --card-border: rgba(231, 56, 87, .10);
  --shadow-card: 0 10px 34px rgba(231, 56, 87, .10);
  --shadow-btn: 0 8px 22px rgba(231, 56, 87, .38);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff5f7;
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
  padding-bottom: 96px; /* 给底部固定引流条留位 */
}

/* ============================================================
   海报背景墙：fixed 全屏，三行横向 marquee，内容复制两份 -> ±50% 无缝
   ============================================================ */
.poster-wall {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #fff5f7 0%, #ffeef2 45%, #fff8fa 100%);
  pointer-events: none;
}

.poster-row {
  overflow: hidden;
  width: 100%;
}

.poster-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: wallScroll 40s linear infinite;
  will-change: transform;
}

/* 三行速度与方向交错：1、3 行向左，2 行向右（反向 + 略快） */
.poster-row:nth-child(1) .poster-track { animation-duration: 46s; }
.poster-row:nth-child(2) .poster-track { animation-duration: 34s; animation-direction: reverse; }
.poster-row:nth-child(3) .poster-track { animation-duration: 40s; }

.poster-item {
  flex: 0 0 auto;
  width: 104px;
  margin: 0 9px;
  transition: transform .35s ease;
}

.poster-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(80, 20, 40, .18);
  display: block;
  border: 3px solid rgba(255, 255, 255, .85);
}

@keyframes wallScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* 浅色纱幕：海报隐约可见，保证白卡与文字可读 */
.wall-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .35) 45%, rgba(255, 255, 255, .15) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .66) 0%, rgba(255, 255, 255, .44) 30%, rgba(255, 255, 255, .52) 68%, rgba(255, 255, 255, .8) 100%);
}

/* ============================================================
   内容容器
   ============================================================ */
.app-container {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ============================================================
   头部（白色毛玻璃）
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 0 -14px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(231, 56, 87, .08);
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
}
.logo-1 { color: var(--ink); }
.logo-2 { color: var(--red); }

/* ---- 语言下拉（自定义菜单：国旗图片 + 语言名） ---- */
.lang-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--red-soft-2);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(231, 56, 87, .10);
  cursor: pointer;
  user-select: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.lang-select-wrap:hover { box-shadow: 0 6px 16px rgba(231, 56, 87, .2); transform: translateY(-1px); }
.lang-globe { font-size: 14px; }
.lang-flag { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.lang-current-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.lang-caret { font-size: 11px; color: var(--ink-2); transition: transform .2s ease; }
.lang-select-wrap.open .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 172px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(80, 20, 40, .18);
  border: 1px solid var(--red-soft-2);
  padding: 6px;
  display: none;
  z-index: 50;
}
.lang-select-wrap.open .lang-menu {
  display: block;
  animation: langMenuIn .18s ease;
}
@keyframes langMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease;
}
.lang-option:hover { background: var(--red-soft); }
.lang-option.active { background: var(--red-soft); color: var(--red); font-weight: 700; }
.lang-option-flag { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.lang-option-flag-fallback { width: 24px; height: 18px; line-height: 18px; text-align: center; font-size: 15px; flex: 0 0 auto; }
.lang-option-name { white-space: nowrap; }

/* ============================================================
   主视觉 Hero
   ============================================================ */
.hero {
  text-align: center;
  padding: 46px 18px 30px;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--red-soft-2);
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(231, 56, 87, .12);
  margin-bottom: 20px;
}
.online-pill .fire {
  font-size: 14px;
  animation: fireFlicker 1.4s ease-in-out infinite;
}
@keyframes fireFlicker {
  0%, 100% { transform: scale(1) rotate(-4deg); }
  50%      { transform: scale(1.18) rotate(5deg); }
}

.hero h1 {
  font-size: 34px;
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: -.8px;
  color: var(--ink);
  margin-bottom: 14px;
}

.hero p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 520px;
  margin: 0 auto;
}

/* ============================================================
   通用白卡 section
   ============================================================ */
.live-section,
.points-module,
.footer {
  background: var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 24px 18px;
  margin-bottom: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}
.section-head h2 {
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
}
.live-sub {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-3);
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ============================================================
   热播短剧水平轮播
   ============================================================ */
.rail-viewport {
  overflow: hidden;
  margin: 0 -6px;
  padding: 6px 2px;
}
.rail-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: railScroll 30s linear infinite;
  will-change: transform;
}
.rail-viewport:hover .rail-track { animation-play-state: paused; }

@keyframes railScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.movie-card {
  flex: 0 0 auto;
  width: 152px;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease;
}
.movie-card:hover { transform: translateY(-5px); }

.movie-poster {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(80, 20, 40, .18);
  border: 3px solid #fff;
}
.movie-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.badge-eps {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(20, 12, 16, .68);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.badge-hot {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #ff7a3d, var(--red));
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(231, 56, 87, .45);
  animation: hotPulse 1.4s ease-in-out infinite;
}
@keyframes hotPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

.movie-info { padding: 10px 4px 2px; }
.movie-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
}
.movie-rating {
  font-size: 12.5px;
  font-weight: 800;
  color: #c98a00;
}
.movie-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-soft);
  padding: 2.5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ============================================================
   积分任务模块
   ============================================================ */
.points-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.points-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red-light), var(--red));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: var(--shadow-btn);
}
.points-icon.pop { animation: iconPop .4s ease; }
@keyframes iconPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.28) rotate(-8deg); }
  100% { transform: scale(1); }
}
.points-text h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 3px;
}
.points-text p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}

.points-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.stat-box {
  flex: 1;
  background: var(--red-soft);
  border: 1px solid var(--red-soft-2);
  border-radius: 14px;
  text-align: center;
  padding: 12px 6px;
}
.stat-label {
  font-size: 11.5px;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.stat-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--red);
  line-height: 1.1;
}

/* VIP 解锁进度条 */
.vip-progress { margin-bottom: 18px; }
.vip-bar {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: var(--red-soft-2);
  overflow: visible;
  margin-bottom: 10px;
}
.vip-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red-light), var(--red), var(--red-dark));
  background-size: 200% 100%;
  animation: vipShimmer 2.4s linear infinite;
  transition: width .5s cubic-bezier(.22, 1, .36, 1);
  box-shadow: 0 2px 8px rgba(231, 56, 87, .4);
}
@keyframes vipShimmer {
  from { background-position: 0% 0; }
  to   { background-position: 200% 0; }
}
.vip-crown {
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  font-size: 20px;
  filter: grayscale(1) opacity(.45);
  transition: filter .3s ease;
}
.vip-crown.lit {
  filter: none;
  animation: crownBounce 1.1s ease-in-out infinite;
}
@keyframes crownBounce {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%      { transform: translateY(-66%) scale(1.18); }
}
.vip-text {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.vip-text.ready {
  color: var(--red);
  font-weight: 800;
  animation: readyBlink 1.2s ease-in-out infinite;
}
@keyframes readyBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .65; }
}

/* 做任务按钮 */
.btn-claim {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  padding: 16px 20px;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--red-light), var(--red), var(--red-dark), var(--red));
  background-size: 260% 100%;
  box-shadow: var(--shadow-btn);
  animation: ctaGradient 3s linear infinite;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease;
}
.btn-claim:hover { transform: translateY(-2px); }
.btn-claim:active { transform: scale(.98); }
.btn-claim:disabled {
  background: #e3d7dc;
  box-shadow: none;
  animation: none;
  color: #fff;
  cursor: not-allowed;
  transform: none;
}
.btn-claim:disabled::after { display: none; }

/* 光泽扫过 */
.btn-claim::after,
.btn-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 100%);
  transform: translateX(-160%) skewX(-18deg);
  animation: ctaShine 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ctaShine {
  0%   { transform: translateX(-160%) skewX(-18deg); }
  55%  { transform: translateX(320%) skewX(-18deg); }
  100% { transform: translateX(320%) skewX(-18deg); }
}

.recent-claims {
  margin-top: 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}
#recentList { color: var(--red); font-weight: 700; letter-spacing: 1px; }

/* ============================================================
   页脚转化区
   ============================================================ */
.footer { text-align: center; }

.footer-cta h3 {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 8px;
}
.footer-cta p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 20px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 14px;
  font-size: 13px;
  color: var(--ink-2);
}
.trust-dot { color: var(--red-soft-2); }

.footer-lang {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.lang-quick {
  color: var(--red);
  font-weight: 700;
  cursor: pointer;
  margin: 0 4px;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .15s ease;
}
.lang-quick:hover { background: var(--red-soft); }

.site-notice {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 8px;
}
.footer-copy {
  font-size: 12px;
  color: #c2b3ba;
}

/* ============================================================
   CTA 按钮（红色渐变 + 四联动动画）
   ============================================================ */
.btn-cta {
  position: relative;
  display: inline-block;
  text-decoration: none;
  text-align: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .5px;
  padding: 13px 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red-light), var(--red), var(--red-dark), var(--red));
  background-size: 260% 100%;
  overflow: hidden;
  animation:
    ctaGradient 3s linear infinite,
    ctaBounce 1.7s ease-in-out infinite,
    ctaPulse 2.1s ease-out infinite;
  transition: transform .15s ease;
}
.btn-cta:hover { transform: translateY(-2px) scale(1.03); }
.btn-cta:active { transform: scale(.97); }

.btn-cta-lg {
  font-size: 18px;
  padding: 17px 44px;
  border-radius: 18px;
}

/* 渐变流动 */
@keyframes ctaGradient {
  from { background-position: 0% 50%; }
  to   { background-position: 260% 50%; }
}
/* 呼吸缩放 */
@keyframes ctaBounce {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.055); }
}
/* 脉冲光圈（按钮自身 box-shadow 扩散，不受 overflow:hidden 裁剪） */
@keyframes ctaPulse {
  0%   { box-shadow: 0 8px 22px rgba(231, 56, 87, .38), 0 0 0 0 rgba(231, 56, 87, .5); }
  70%  { box-shadow: 0 8px 22px rgba(231, 56, 87, .38), 0 0 0 16px rgba(231, 56, 87, 0); }
  100% { box-shadow: 0 8px 22px rgba(231, 56, 87, .38), 0 0 0 16px rgba(231, 56, 87, 0); }
}

/* ============================================================
   底部固定引流条（白色毛玻璃）
   ============================================================ */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(231, 56, 87, .1);
  box-shadow: 0 -6px 24px rgba(80, 20, 40, .08);
}
.bottom-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.bar-logo {
  font-size: 26px;
  flex: 0 0 auto;
}
.bar-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.bar-tip {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
  white-space: nowrap;
}
.bottom-bar .btn-cta {
  flex: 0 0 auto;
  font-size: 14px;
  padding: 11px 20px;
}

/* ============================================================
   阿拉伯语等 RTL 语言适配
   ============================================================ */
body.rtl {
  direction: rtl;
  text-align: right;
}
body.rtl .hero,
body.rtl .live-sub,
body.rtl .footer,
body.rtl .vip-text,
body.rtl .recent-claims {
  text-align: center;
}
body.rtl .points-header { flex-direction: row; }
body.rtl .lang-menu { right: auto; left: 0; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 480px) {
  .hero h1 { font-size: 27px; }
  .hero { padding: 34px 10px 24px; }
  .poster-item { width: 86px; margin: 0 7px; }
  .movie-card { width: 138px; }
  .live-section,
  .points-module,
  .footer { padding: 20px 14px; border-radius: 18px; }
  .bar-tip { display: none; }
  .bar-name { font-size: 13.5px; }
  .bottom-bar .btn-cta { font-size: 13px; padding: 10px 16px; }
  .btn-cta-lg { font-size: 16px; padding: 15px 30px; }
  .stat-value { font-size: 20px; }
}

/* ============================================================
   减弱动效偏好：暂停所有滚动/呼吸动画
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .poster-track,
  .rail-track,
  .btn-cta,
  .btn-claim,
  .vip-bar-fill,
  .badge-hot,
  .online-pill .fire,
  .vip-crown.lit,
  .vip-text.ready,
  .btn-claim::after,
  .btn-cta::after {
    animation: none !important;
  }
}
