@font-face {
  font-family: "F1 Display";
  src: url("../fonts/f1-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "F1 Display";
  src: url("../fonts/f1-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

@font-face {
  font-family: "F1 Wide";
  src: url("../fonts/f1-wide.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #070707;
  --surface: #111215;
  --text: #f7f7f5;
  --muted: #a3a5aa;
  --line: rgba(255,255,255,.13);
  --red: #e10600;
  --red-dark: #b80602;
  --yellow: #ffd43b;
  --container: 1140px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: "F1 Display", "PingFang SC", "Microsoft YaHei", sans-serif; font-synthesis: none; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

.download-container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }

.download-header { height: 72px; position: absolute; inset: 0 0 auto; z-index: 20; border-bottom: 1px solid var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 "F1 Wide", "PingFang SC", sans-serif; }
.brand img { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #d3d4d6; font-size: 14px; }
.back-link svg { width: 18px; height: 18px; }

.download-hero { min-height: 820px; padding: 124px 0 80px; overflow: hidden; background: #070707; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); align-items: center; gap: 70px; }
.app-identity { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.app-identity > img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); }
.app-identity div { display: flex; flex-direction: column; gap: 6px; }
.app-identity span,
.feature-heading > span,
.platform-label { color: var(--red); font-family: "F1 Wide", "PingFang SC", sans-serif; font-size: 11px; font-weight: 700; }
.app-identity strong { font: 700 24px/1 "F1 Wide", "PingFang SC", sans-serif; }

h1 { margin: 0; font-size: 56px; line-height: 1.15; font-weight: 900; }
.intro { max-width: 610px; margin: 22px 0 0; color: #bbbcc0; font-size: 16px; line-height: 1.8; }

.platform-switcher { width: min(100%, 440px); display: grid; grid-template-columns: 1fr 1fr; margin-top: 34px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: #0d0e10; }
.platform-switcher button { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 4px; background: transparent; color: #9c9ea4; font-weight: 700; cursor: pointer; }
.platform-switcher button[aria-selected="true"] { background: #2a2c31; color: white; }
.platform-switcher svg { width: 19px; height: 19px; }

.platform-panels { width: min(100%, 620px); min-height: 336px; margin-top: 18px; }
.platform-panel { padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.platform-panel[hidden] { display: none; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.platform-panel h2 { margin: 7px 0 0; font-size: 22px; }
.platform-panel > p { margin: 12px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.recommend-badge { flex: none; padding: 5px 8px; border-radius: 4px; background: rgba(225,6,0,.14); color: #ff4b46; font-size: 11px; font-weight: 700; }

.platform-download-grid { display: grid; grid-template-columns: minmax(0, 1fr) 164px; gap: 24px; align-items: center; }
.download-actions-column { min-width: 0; }
.android-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.store-button { min-height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid transparent; border-radius: 5px; transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.store-button:hover { transform: translateY(-2px); }
.store-button.primary { background: var(--red); color: white; }
.store-button.primary:hover { background: var(--red-dark); }
.store-button.secondary { border-color: #3d4047; background: #1d1f23; }
.store-button.secondary:hover { border-color: #72757d; }
.store-button svg { width: 22px; height: 22px; flex: none; }
.store-button > svg:last-child { width: 17px; height: 17px; margin-left: auto; }
.store-button span { display: flex; flex-direction: column; gap: 2px; }
.store-button small { color: rgba(255,255,255,.7); font-size: 10px; }
.store-button strong { font-size: 15px; }
.store-button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }

.download-qr { width: 164px; margin: 0; text-align: center; }
.download-qr > a { display: block; border-radius: 5px; background: white; transition: transform 160ms ease; }
.download-qr > a:hover { transform: translateY(-2px); }
.download-qr img { width: 164px; height: 164px; border: 1px solid rgba(255,255,255,.18); border-radius: 5px; }
.download-qr figcaption { margin-top: 10px; }
.download-qr figcaption strong,
.download-qr figcaption span { display: block; }
.download-qr figcaption strong { color: #f2f2ef; font-size: 13px; }
.download-qr figcaption span { margin-top: 4px; color: #7e8086; font-size: 10px; }

.platform-panel .apk-status { min-height: 0; margin: 10px 0 0; color: #d0a936; font-size: 11px; }
.safety-note { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: #7e8086; font-size: 11px; }
.safety-note svg { width: 16px; height: 16px; }

.product-preview { position: relative; height: 620px; }
.preview-track { position: absolute; top: 70px; left: -10%; width: 120%; display: flex; flex-direction: column; gap: 20px; overflow: hidden; color: #17181b; font: 700 72px/1 "F1 Wide", sans-serif; white-space: nowrap; transform: rotate(-8deg); }
.preview-phone { position: absolute; z-index: 2; width: 270px; height: 585px; top: 10px; left: 50%; overflow: hidden; border: 1px solid #35373d; border-radius: 30px; background: black; box-shadow: 0 34px 80px rgba(0,0,0,.58); transform: translateX(-50%) rotate(3deg); }
.preview-phone img { width: 100%; height: 100%; object-fit: cover; }
.preview-stat { position: absolute; z-index: 3; min-width: 170px; padding: 14px 16px; border-left: 4px solid var(--red); background: rgba(18,19,22,.96); box-shadow: 0 16px 36px rgba(0,0,0,.35); }
.preview-stat strong,
.preview-stat span { display: block; }
.preview-stat strong { font-size: 14px; }
.preview-stat span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.stat-top { top: 110px; right: 0; }
.stat-bottom { bottom: 62px; left: 0; }

.download-features { padding: 86px 0; background: #e7e7e3; color: #111215; }
.feature-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 44px; }
.feature-heading h2 { max-width: 680px; margin: 0; font-size: 34px; }
.feature-list { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid #b9bab8; border-bottom: 1px solid #b9bab8; }
.feature-list article { min-height: 210px; padding: 30px; border-right: 1px solid #b9bab8; }
.feature-list article:last-child { border-right: 0; }
.feature-list svg { width: 28px; height: 28px; color: var(--red); }
.feature-list h3 { margin: 44px 0 8px; font-size: 19px; }
.feature-list p { margin: 0; color: #65676b; font-size: 13px; line-height: 1.7; }

.download-footer { padding: 28px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #7f8186; font-size: 12px; }
.footer-inner nav { display: flex; gap: 24px; }
.footer-inner a:hover { color: white; }

@media (max-width: 900px) {
  .hero-layout { grid-template-columns: minmax(0,1fr) 360px; gap: 30px; }
  h1 { font-size: 46px; }
  .product-preview { height: 560px; }
  .preview-phone { width: 240px; height: 520px; }
  .stat-top { right: -10px; }
}

@media (max-width: 720px) {
  .download-container { width: min(calc(100% - 32px), var(--container)); }
  .download-header { height: 64px; }
  .brand img { width: 38px; height: 38px; }
  .brand { font-size: 17px; }
  .back-link span { display: none; }
  .download-hero { padding: 104px 0 64px; }
  .hero-layout { display: flex; flex-direction: column; align-items: stretch; gap: 50px; }
  .app-identity { margin-bottom: 26px; }
  .app-identity > img { width: 66px; height: 66px; }
  h1 { font-size: 38px; }
  .intro { font-size: 15px; }
  .platform-switcher,
  .platform-panels { width: 100%; }
  .platform-panels { min-height: 0; }
  .platform-panel { padding: 20px; }
  .panel-heading { flex-direction: column-reverse; }
  .platform-download-grid { grid-template-columns: 1fr; gap: 24px; }
  .android-actions { grid-template-columns: 1fr; }
  .download-qr { width: 156px; margin-inline: auto; }
  .download-qr img { width: 156px; height: 156px; }
  .product-preview { height: 520px; margin-top: 10px; margin-bottom: 0; }
  .preview-phone { width: 226px; height: 490px; }
  .preview-track { font-size: 50px; }
  .stat-top { top: 92px; right: 0; }
  .stat-bottom { bottom: 44px; left: 0; }
  .feature-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .feature-heading h2 { font-size: 28px; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-list article { min-height: 160px; border-right: 0; border-bottom: 1px solid #b9bab8; }
  .feature-list article:last-child { border-bottom: 0; }
  .feature-list h3 { margin-top: 30px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-inner nav { flex-wrap: wrap; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
