/* reset / base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f2f2f2;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f2f2f2;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* CSS variables */
:root {
  --page-bg: #fffbf6;
  --orange: #ff6a3d;
  --orange-dark: #e8432f;
  --orange-light: #ffede0;
  --text-main: #2e2620;
  --text-body: #5a5048;
  --text-muted: #97897d;
  --black-section: #181818;
  --shadow-orange: rgba(255, 106, 61, 0.25);
  --button-gradient: linear-gradient(135deg, #ff9a44 0%, #ff5c38 100%);
  --safe-x: 16px;
}

/* layout */
.page {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 4%, rgba(255, 160, 90, 0.18), transparent 26%),
    var(--page-bg);
  box-shadow: 0 0 30px rgba(55, 45, 35, 0.08);
}

.page__content {
  padding-bottom: 104px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  background: var(--button-gradient);
  box-shadow: 0 12px 22px var(--shadow-orange);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn-download:active {
  transform: scale(0.98);
  box-shadow: 0 8px 16px var(--shadow-orange);
}

.icon {
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
}

.icon-download {
  width: 18px;
  height: 18px;
  border-bottom: 3px solid currentColor;
  border-radius: 0 0 3px 3px;
}

.icon-download::before,
.icon-download::after {
  position: absolute;
  content: "";
  left: 50%;
  transform: translateX(-50%);
}

.icon-download::before {
  top: 0;
  width: 3px;
  height: 12px;
  border-radius: 3px;
  background: currentColor;
}

.icon-download::after {
  top: 7px;
  width: 10px;
  height: 10px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.download-icon {
  display: block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: #fff;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* hero */
.hero {
  position: relative;
  min-height: 292px;
  padding: 28px var(--safe-x) 18px;
  overflow: hidden;
}

.hero__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__reel {
  position: absolute;
  top: 36px;
  right: 16px;
  width: 96px;
  height: 96px;
  border: 10px solid rgba(255, 132, 63, 0.34);
  border-radius: 50%;
  opacity: 0.88;
  transform: rotate(18deg);
}

.hero__reel::before {
  position: absolute;
  inset: 16px;
  content: "";
  border: 8px dotted rgba(255, 132, 63, 0.54);
  border-radius: 50%;
  background: rgba(255, 233, 215, 0.44);
}

.hero__film {
  position: absolute;
  top: 126px;
  right: -18px;
  width: 152px;
  height: 42px;
  border-radius: 24px;
  background: repeating-linear-gradient(90deg, rgba(255, 180, 125, 0.34) 0 18px, rgba(255, 255, 255, 0.62) 18px 27px);
  filter: blur(0.2px);
  opacity: 0.55;
  transform: rotate(8deg);
}

.hero__brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero__logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 12px 22px rgba(232, 67, 47, 0.18);
}

.hero__text h1 {
  color: #ff4f22;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.08;
}

.hero__text p {
  margin-top: 8px;
  color: #ff512b;
  font-size: 14px;
  font-weight: 600;
}

.hero-tags {
  position: relative;
  z-index: 1;
  display: inline-block;
  max-width: 100%;
  margin: 38px auto 20px;
  padding: 8px 15px;
  color: #ff542e;
  font-size: clamp(11px, 3vw, 12px);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(255, 125, 70, 0.08);
}

.hero__cta-wrap {
  position: relative;
  z-index: 1;
  text-align: center;
}

.btn-download-main {
  min-width: 272px;
  min-height: 52px;
  padding: 0 34px;
  border-radius: 999px;
  font-size: 17px;
}

.hero__hint {
  margin-top: 13px;
  color: #f0522d;
  font-size: 13px;
  font-weight: 700;
}

/* movie grid */
.movie-section {
  padding: 0 var(--safe-x);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 10px;
}

.movie-grid--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  gap: 12px;
}

.movie-card {
  min-width: 0;
  color: var(--text-main);
  text-align: center;
}

.movie-card__poster {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f3dfd0;
  box-shadow: 0 8px 18px rgba(52, 32, 20, 0.08);
}

.movie-card--vertical .movie-card__poster {
  aspect-ratio: 2 / 3;
}

.movie-card--horizontal .movie-card__poster {
  aspect-ratio: 3 / 2;
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card__tag {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 20px;
  padding-top: 2px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #ff9a44, #ff5c38);
  transform: translate(-10px, 5px) rotate(-45deg);
  transform-origin: center;
}

.movie-card__title {
  display: block;
  margin-top: 9px;
  overflow: hidden;
  color: #191512;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* promo banners */
.banner-hot,
.promo-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  margin: 28px var(--safe-x) 0;
  overflow: hidden;
  border-radius: 12px;
}

.banner-hot {
  padding: 20px;
  color: #ff512b;
  background: linear-gradient(110deg, #fff4ea 0%, #ffd8bd 100%);
}

.banner-hot h2 {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.banner-hot p {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
}

.banner-hot__reel {
  position: absolute;
  right: 16px;
  bottom: 11px;
  width: 70px;
  height: 70px;
  border: 8px solid rgba(255, 110, 55, 0.35);
  border-radius: 50%;
  transform: rotate(22deg);
}

.banner-hot__reel::before {
  position: absolute;
  inset: 12px;
  content: "";
  border: 7px dotted rgba(255, 110, 55, 0.55);
  border-radius: 50%;
}

.promo-card {
  min-height: 104px;
  padding: 18px 20px;
  text-align: center;
  background: linear-gradient(120deg, #fff0e7 0%, #ffd9c5 100%);
}

.promo-card__title {
  color: var(--text-main);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.promo-card__subtitle {
  margin-top: 7px;
  color: #ff4c25;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
}

.promo-card__play {
  position: absolute;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.35);
}

.promo-card__play::before {
  position: absolute;
  top: 13px;
  left: 18px;
  content: "";
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid rgba(255, 255, 255, 0.85);
}

/* intro card */
.intro-card {
  margin: 18px var(--safe-x) 0;
  padding: 22px 16px;
  border: 1px solid #f4e4d8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 22px rgba(88, 56, 32, 0.04);
}

.intro-card h2 {
  color: #ff4f22;
  font-size: 21px;
  font-weight: 800;
}

.intro-card p {
  margin-top: 14px;
  color: #332d28;
  font-size: 14px;
  font-weight: 500;
  line-height: 2;
}

/* download expanded */
.download-expanded {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(calc(100vw - 32px), 398px);
  height: 256px;
  max-height: 300px;
  padding: 48px 24px 18px;
  overflow: visible;
  border: 1px solid rgba(255, 110, 55, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(255, 106, 61, 0.26), 0 6px 30px rgba(33, 22, 16, 0.12);
  transform: translateX(-50%);
  transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease;
}

.is-scrolled .download-expanded {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(18px);
}

.download-expanded__logo {
  position: absolute;
  top: -28px;
  left: 50%;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  box-shadow: 0 12px 25px rgba(232, 67, 47, 0.18);
  transform: translateX(-50%);
}

.download-expanded__name {
  margin-top: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.download-expanded__meta {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.download-expanded__meta span {
  padding: 6px 12px;
  color: #514942;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: #fff3eb;
}

.download-expanded__badges {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
  margin-top: 8px;
}

.download-expanded__badge {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #4f4038;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
}

.download-expanded__badge svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #16a34a;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-expanded__badge span {
  color: inherit;
}

.download-expanded__cta {
  width: 100%;
  min-height: 50px;
  margin-top: auto;
  border-radius: 999px;
  font-size: 16px;
}

.link-separator {
  color: #c7bdb4;
}

/* download sticky */
.download-sticky {
  position: fixed;
  z-index: 45;
  right: max(16px, calc((100vw - 430px) / 2 + 16px));
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: max(16px, calc((100vw - 430px) / 2 + 16px));
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 11px 12px;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  border: 1px solid rgba(255, 106, 61, 0.4);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 32px rgba(255, 106, 61, 0.23), 0 6px 18px rgba(40, 27, 18, 0.12);
  transform: translateY(18px);
  transition: opacity 240ms ease, visibility 240ms ease, transform 240ms ease;
}

.is-scrolled .download-sticky {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.download-sticky__logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.download-sticky__info {
  flex: 1 1 auto;
  min-width: 0;
}

.download-sticky__name,
.download-sticky__meta {
  display: block;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-sticky__name {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 800;
}

.download-sticky__meta {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.download-sticky__cta {
  flex: 0 0 auto;
  min-height: 38px;
  max-width: 148px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 13px;
}

.download-sticky__cta .icon-download {
  width: 14px;
  height: 14px;
}

/* feature grid */
.feature-grid-section {
  margin: 22px var(--safe-x) 0;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, #161817, #0f100f);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-item {
  min-height: 108px;
  padding: 18px 12px 15px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.feature-item:nth-child(2n) {
  border-right: 0;
}

.feature-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.feature-item h3 {
  margin-top: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.feature-item p {
  margin-top: 8px;
  color: #b6b6b6;
  font-size: 11px;
  line-height: 1.35;
}

.feature-icon {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  color: #ff8a24;
}

.feature-icon::before,
.feature-icon::after {
  position: absolute;
  content: "";
}

.feature-icon--film::before {
  inset: 3px;
  border: 4px solid currentColor;
  border-radius: 50%;
}

.feature-icon--film::after {
  inset: 10px;
  border: 4px dotted currentColor;
  border-radius: 50%;
}

.feature-icon--hot::before {
  left: 8px;
  top: 3px;
  width: 18px;
  height: 28px;
  border: 4px solid currentColor;
  border-radius: 14px 14px 16px 16px;
  transform: rotate(12deg);
}

.feature-icon--grid::before {
  inset: 4px;
  background:
    linear-gradient(currentColor 0 0) 0 0 / 11px 11px,
    linear-gradient(currentColor 0 0) 100% 0 / 11px 11px,
    linear-gradient(currentColor 0 0) 0 100% / 11px 11px,
    linear-gradient(currentColor 0 0) 100% 100% / 11px 11px;
  background-repeat: no-repeat;
  border-radius: 3px;
}

.feature-icon--sync::before {
  inset: 6px;
  border: 4px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.feature-icon--sync::after {
  right: 3px;
  top: 6px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
}

.feature-icon--search::before {
  left: 4px;
  top: 4px;
  width: 19px;
  height: 19px;
  border: 4px solid currentColor;
  border-radius: 50%;
}

.feature-icon--search::after {
  right: 5px;
  bottom: 5px;
  width: 14px;
  height: 4px;
  border-radius: 4px;
  background: currentColor;
  transform: rotate(45deg);
}

.feature-icon--play::before {
  inset: 5px;
  border: 4px solid currentColor;
  border-radius: 4px;
}

.feature-icon--play::after {
  left: 14px;
  top: 11px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.feature-icon--shield::before {
  left: 5px;
  top: 2px;
  width: 24px;
  height: 28px;
  border: 3px solid var(--orange);
  border-radius: 12px 12px 15px 15px;
}

.feature-icon--shield::after {
  left: 13px;
  top: 10px;
  width: 9px;
  height: 14px;
  border-right: 3px solid var(--orange);
  border-bottom: 3px solid var(--orange);
  transform: rotate(40deg);
}

/* footer */
.footer {
  padding: 20px var(--safe-x) 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.75;
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 3px;
}

/* responsive */
@media (max-width: 374px) {
  :root {
    --safe-x: 14px;
  }

  .hero__text h1 {
    font-size: 27px;
  }

  .btn-download-main {
    min-width: 258px;
  }

  .download-expanded {
    padding-right: 20px;
    padding-left: 20px;
  }

  .download-sticky {
    gap: 9px;
    padding: 10px;
  }

  .download-sticky__meta {
    font-size: 10px;
  }

  .download-sticky__cta {
    max-width: 132px;
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (min-width: 431px) {
  .download-expanded {
    width: 398px;
  }
}

/* animation */
.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 108px;
  padding: 10px 15px;
  visibility: hidden;
  color: #fff;
  font-size: 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* open browser guide */
.open-browser-guide {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 18px;
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 154, 68, 0.16), transparent 28%),
    #fffbf6;
}

body.is-open-browser-guide {
  overflow: hidden;
}

body.is-open-browser-guide .open-browser-guide {
  display: flex;
}

body.is-open-browser-guide .page,
body.is-open-browser-guide .download-expanded,
body.is-open-browser-guide .download-sticky {
  display: none !important;
}

.open-browser-guide__arrow {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 136px;
  color: #ff5c38;
  font-size: 15px;
  font-weight: 700;
  z-index: 2;
}

.open-browser-guide__arrow-svg {
  width: 72px;
  height: 36px;
  overflow: visible;
  color: #ff5c38;
}

.open-browser-guide__arrow-line,
.open-browser-guide__arrow-head {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.open-browser-guide__card {
  width: 100%;
  max-width: 360px;
  padding: 34px 24px 28px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(255, 108, 61, 0.1);
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(255, 106, 61, 0.18);
}

.open-browser-guide__logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(220, 50, 70, 0.2);
}

.open-browser-guide__title {
  margin: 0;
  color: var(--brand-red);
  font-size: 24px;
  line-height: 1.2;
}

.open-browser-guide__desc {
  margin: 14px 0 0;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}

.open-browser-guide__steps {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  text-align: left;
}

.open-browser-guide__step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 12px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  background: #fff7f0;
  border-radius: 14px;
}

.open-browser-guide__step-num {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #fff;
  font-size: 12px;
  background: var(--button-gradient);
  border-radius: 50%;
}

.open-browser-guide__copy {
  width: 100%;
  height: 48px;
  margin-top: 24px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  background: var(--button-gradient);
  border: none;
  border-radius: 999px;
  box-shadow: 0 12px 22px var(--shadow-orange);
}

.open-browser-guide__copy:active {
  transform: scale(0.98);
}

.open-browser-guide__tips {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}
