/* ==========================================================================
   51短剧福利 · 通用样式表
   适用页面：首页落地页 index.html、专用下载页 down/index.html
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --c-red: #ff2d55;
  --c-red-deep: #e60023;
  --c-orange: #ff6b00;
  --c-amber: #ff9500;
  --c-gold: #ffc800;
  --c-ink: #1a1a2e;
  --c-ink-2: #5a5a6e;
  --c-bg: #fff6ef;
  --c-card: #ffffff;
  --c-line: #ffe3d3;
  --grad-cta: linear-gradient(135deg, #ff2d55 0%, #ff6b00 100%);
  --grad-hl: linear-gradient(135deg, #ff1744 0%, #ff6d00 100%);
  --shadow-cta: 0 12px 28px rgba(255, 45, 85, .34);
  --shadow-card: 0 10px 30px rgba(26, 26, 46, .08);
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1180px;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font-family: inherit; }

/* ---------- 布局工具 ---------- */
.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.section { padding: 72px 0; }
.section__head { text-align: center; margin-bottom: 44px; }
.section__kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--c-red);
  background: #ffe9e0; padding: 6px 16px; border-radius: 999px; margin-bottom: 14px;
}
.section__title { font-size: clamp(26px, 4vw, 40px); font-weight: 900; line-height: 1.25; letter-spacing: .5px; }
.section__sub { margin-top: 12px; color: var(--c-ink-2); font-size: 16px; }

/* 红橙高对比突出「福利」 */
.hl {
  display: inline-block;
  background: var(--grad-hl);
  color: #fff;
  padding: 0 .3em;
  margin: 0 .05em;
  border-radius: .32em;
  box-shadow: 0 6px 16px rgba(255, 45, 85, .35);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 800; border: none; cursor: pointer; border-radius: 999px;
  padding: 14px 30px; font-size: 16px; letter-spacing: .5px;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
  white-space: nowrap;
}
.btn--lg { padding: 17px 40px; font-size: 18px; }
.btn--primary {
  background: var(--grad-cta); color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(255, 45, 85, .45); }
.btn--primary:active { transform: translateY(-1px); }
.btn--secondary {
  background: rgba(255, 255, 255, .92); color: var(--c-red);
  border: 2px solid var(--c-red);
}
.btn--secondary:hover { background: #fff0ec; transform: translateY(-3px); }
.btn--ios {
  background: #1a1a2e; color: #fff;
  box-shadow: 0 10px 24px rgba(26, 26, 46, .25);
}
.btn--ios:hover { transform: translateY(-3px); }
.btn--block { width: 100%; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  padding: 18px 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--grad-cta); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 20px;
  box-shadow: var(--shadow-cta);
}
.brand__name { font-weight: 900; font-size: 20px; color: #fff; letter-spacing: .5px; }
.header__cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad-cta); color: #fff; font-weight: 800;
  padding: 10px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow-cta); transition: transform .2s ease;
}
.header__cta:hover { transform: translateY(-2px); }

/* ---------- 首屏 Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  overflow: hidden; padding: 120px 16px 60px;
}
.hero__collage {
  position: absolute; inset: 0; z-index: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr);
}
.hero__collage img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(20, 12, 30, .55) 0%, rgba(255, 45, 85, .28) 42%, rgba(20, 12, 30, .86) 100%);
}
.hero__content { position: relative; z-index: 2; color: #fff; max-width: 820px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(6px); color: #fff; font-weight: 700;
  padding: 8px 18px; border-radius: 999px; font-size: 14px; margin-bottom: 24px;
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-gold); animation: blink 1.2s infinite; }
.hero__title {
  font-size: clamp(42px, 8vw, 82px); font-weight: 900; line-height: 1.08;
  letter-spacing: 1px; text-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.hero__title .hl { text-shadow: none; transform: rotate(-2deg); }
.hero__sub {
  margin: 22px auto 0; font-size: clamp(17px, 2.6vw, 22px);
  color: rgba(255, 255, 255, .92); font-weight: 600;
}
.hero__actions { margin-top: 34px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- 福利卖点区 ---------- */
.welfare { background: var(--c-bg); }
.welfare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.welfare-card {
  background: var(--c-card); border-radius: var(--radius-lg); padding: 28px 24px;
  box-shadow: var(--shadow-card); text-align: center; position: relative; overflow: hidden;
  border: 1px solid var(--c-line);
  transition: transform .25s ease, box-shadow .25s ease;
}
.welfare-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(255, 45, 85, .14); }
.welfare-card__icon {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px;
  background: var(--grad-cta); color: #fff; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-cta);
}
.welfare-card__title { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.welfare-card__desc { color: var(--c-ink-2); font-size: 14px; }

/* 限时限量紧迫感条 */
.urgency {
  margin-top: 30px; background: #1a1a2e; color: #fff; border-radius: var(--radius-lg);
  padding: 24px 28px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  box-shadow: 0 16px 40px rgba(26, 26, 46, .28);
}
.urgency__label { font-weight: 800; font-size: 18px; }
.urgency__label b { color: var(--c-amber); }
.countdown {
  font-family: "SF Mono", Menlo, Consolas, monospace; font-weight: 800; font-size: 22px;
  color: var(--c-gold); letter-spacing: 1px;
}
.progress { flex: 1 1 200px; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.progress__bar { height: 100%; width: 0%; background: var(--grad-cta); border-radius: 999px; transition: width .4s ease; }

/* ---------- 热门短剧推荐 ---------- */
.drama { background: linear-gradient(180deg, #fff6ef 0%, #ffe9de 100%); }
.drama__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.drama-card {
  background: var(--c-card); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card); border: 1px solid var(--c-line);
  transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column;
}
.drama-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(26, 26, 46, .16); }
.drama-card__poster { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.drama-card__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.drama-card:hover .drama-card__poster img { transform: scale(1.06); }
.drama-card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--grad-cta); color: #fff; font-weight: 800; font-size: 12px;
  padding: 5px 12px; border-radius: 999px; box-shadow: 0 6px 16px rgba(255, 45, 85, .4);
}
.drama-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.drama-card__title { font-size: 18px; font-weight: 900; line-height: 1.3; }
.drama-card__meta { display: flex; align-items: center; gap: 8px; color: var(--c-ink-2); font-size: 13px; }
.drama-card__meta .tag { background: #ffe9e0; color: var(--c-red); font-weight: 700; padding: 2px 10px; border-radius: 6px; font-size: 12px; }
.drama-card__btn {
  margin-top: auto; background: var(--grad-cta); color: #fff; border: none; cursor: pointer;
  font-weight: 800; font-size: 14px; padding: 11px 0; border-radius: 999px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.drama-card__btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-cta); }

/* ---------- 下载引导大模块 ---------- */
.download { background: var(--c-bg); }
.download__box {
  position: relative; background: var(--c-card); border-radius: 32px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(26, 26, 46, .12); border: 1px solid var(--c-line);
  padding: 48px 40px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
}
.download__box::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: var(--grad-cta);
}
.download__left { text-align: left; }
.download__icon {
  width: 96px; height: 96px; border-radius: 24px; overflow: hidden; margin-bottom: 22px;
  box-shadow: var(--shadow-cta);
}
.download__icon img { width: 100%; height: 100%; object-fit: cover; }
.download__title { font-size: clamp(24px, 3.6vw, 34px); font-weight: 900; line-height: 1.3; margin-bottom: 16px; }
.download__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 22px 0 26px; }
.download__list li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.download__list li::before {
  content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad-cta); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900;
}
.download__right { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.download__qr {
  width: 240px; height: 240px; border-radius: 20px; overflow: hidden;
  border: 8px solid #fff; box-shadow: var(--shadow-card); background: #fff;
}
.download__qr img { width: 100%; height: 100%; object-fit: cover; }
.download__note { text-align: center; color: var(--c-ink-2); font-size: 14px; }
.download__actions { width: 100%; display: flex; flex-direction: column; gap: 12px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #1a1a2e; color: rgba(255, 255, 255, .72); padding: 56px 0 30px; }
.trust { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-bottom: 36px; }
.trust__item { text-align: center; }
.trust__num { font-size: 30px; font-weight: 900; color: #fff; }
.trust__num span { color: var(--c-amber); }
.trust__label { font-size: 13px; margin-top: 4px; }
.footer__cta { text-align: center; margin-bottom: 30px; }
.footer__disclaimer {
  text-align: center; font-size: 12px; line-height: 1.8; color: rgba(255, 255, 255, .45);
  max-width: 720px; margin: 0 auto; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px;
}

/* ---------- 友情链接 ---------- */
.friends { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); }
.friends__title { font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, .8); margin-bottom: 12px; }
.friends__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.friends__list a { font-size: 13px; color: rgba(255, 255, 255, .5); transition: color .2s ease; }
.friends__list a:hover { color: #fff; }

/* ---------- 悬浮下载按钮 ---------- */
.float-btn {
  position: fixed; right: 18px; bottom: 24px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  background: var(--grad-cta); color: #fff; font-weight: 800;
  padding: 13px 20px; border-radius: 999px; font-size: 15px;
  box-shadow: 0 14px 34px rgba(255, 45, 85, .5);
  transition: transform .22s ease;
}
.float-btn:hover { transform: translateY(-3px) scale(1.03); }
.float-btn__icon { font-size: 18px; }
.float-btn__pulse {
  position: absolute; inset: 0; border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(255, 45, 85, .6); animation: pulse 2s infinite;
}

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal__mask { position: absolute; inset: 0; background: rgba(10, 8, 18, .72); backdrop-filter: blur(4px); }
.modal__panel {
  position: relative; z-index: 2; width: min(92%, 420px); margin: 12vh auto 0;
  background: #fff; border-radius: 24px; padding: 30px 26px; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4); animation: popIn .35s ease;
}
.modal__close {
  position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: none;
  background: #f2f2f5; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--c-ink-2);
  transition: background .2s ease;
}
.modal__close:hover { background: #ffe3d3; }
.modal__icon { width: 72px; height: 72px; border-radius: 18px; overflow: hidden; margin: 0 auto 16px; box-shadow: var(--shadow-cta); }
.modal__icon img { width: 100%; height: 100%; object-fit: cover; }
.modal__title { font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.modal__sub { color: var(--c-ink-2); font-size: 14px; margin-bottom: 18px; }
.modal__qr { width: 180px; height: 180px; margin: 0 auto 16px; border-radius: 14px; overflow: hidden; border: 6px solid #fff; box-shadow: var(--shadow-card); }
.modal__qr img { width: 100%; height: 100%; object-fit: cover; }
.modal__list { text-align: left; margin: 0 auto 20px; max-width: 260px; }
.modal__list li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.modal__list li::before { content: "✓"; color: var(--c-red); font-weight: 900; }

/* ---------- 下载页专用 ---------- */
.down-hero {
  position: relative; text-align: center; padding: 140px 16px 70px; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, #ff2d55 0%, #ff6b00 100%);
}
.down-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .25), transparent 45%),
              radial-gradient(circle at 80% 10%, rgba(255, 200, 0, .35), transparent 40%);
}
.down-hero .container { position: relative; z-index: 2; }
.down-hero__icon { width: 110px; height: 110px; border-radius: 26px; overflow: hidden; margin: 0 auto 22px; box-shadow: 0 18px 44px rgba(0, 0, 0, .3); }
.down-hero__icon img { width: 100%; height: 100%; object-fit: cover; }
.down-hero__title { font-size: clamp(34px, 6vw, 60px); font-weight: 900; line-height: 1.15; }
.down-hero__sub { margin-top: 16px; font-size: clamp(16px, 2.4vw, 20px); font-weight: 600; color: rgba(255, 255, 255, .95); }
.down-hero__actions { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.down-hero .btn--secondary { background: #fff; border-color: #fff; }

.down-panel { margin-top: -40px; position: relative; z-index: 3; }
.down-panel__box {
  background: #fff; border-radius: 28px; padding: 36px; box-shadow: 0 24px 60px rgba(26, 26, 46, .16);
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
}
.down-panel__qr { width: min(280px, 100%); margin: 0 auto; }
.down-panel__qr img { width: 100%; border-radius: 18px; box-shadow: var(--shadow-card); }
.down-panel__note { text-align: center; color: var(--c-ink-2); font-size: 13px; margin-top: 12px; }
.down-panel__actions { display: flex; flex-direction: column; gap: 14px; }

/* ---------- 滚动浮现动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 关键帧动画 ---------- */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 45, 85, .55); }
  70% { box-shadow: 0 0 0 16px rgba(255, 45, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0); }
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(30px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .welfare-grid, .drama__grid { grid-template-columns: repeat(2, 1fr); }
  .download__box { grid-template-columns: 1fr; text-align: center; padding: 40px 24px; }
  .download__left { text-align: center; }
  .download__icon { margin-inline: auto; }
  .download__list { justify-content: center; text-align: left; max-width: 360px; margin-inline: auto; }
  .down-panel__box { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .section { padding: 52px 0; }
  .hero__collage { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
  .welfare-grid, .drama__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .urgency { flex-direction: column; text-align: center; gap: 14px; }
  .trust { gap: 24px; }
  .float-btn { right: 14px; bottom: 18px; padding: 12px 18px; }
  .download__qr { width: 210px; height: 210px; }
}
