:root {
  --bg: #08111f;
  --panel: rgba(16, 30, 52, .78);
  --panel-strong: #12233d;
  --border: rgba(121, 154, 210, .2);
  --text: #f2f6ff;
  --muted: #8b9dbc;
  --faint: #5f718f;
  --blue: #8192ff;
  --cyan: #5ed8ca;
  --green: #63d9a0;
  --orange: #f6bd70;
  --red: #f38490;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  color-scheme: dark;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(circle at 77% 2%, rgba(88, 113, 222, .23), transparent 27%), radial-gradient(circle at 15% 80%, rgba(40, 180, 172, .08), transparent 28%), var(--bg); }
button, a { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid #aab5ff; outline-offset: 3px; }
[hidden] { display: none !important; }

.download-shell { width: min(100% - 48px, 1080px); min-height: 100vh; display: flex; flex-direction: column; margin: 0 auto; padding: 28px 0 24px; }
.download-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.download-brand { display: inline-flex; align-items: center; gap: 11px; }
.download-brand strong, .download-brand small { display: block; }
.download-brand strong { font-size: 14px; letter-spacing: -.01em; }
.download-brand small { margin-top: 3px; color: var(--faint); font-size: 10px; letter-spacing: .08em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: linear-gradient(145deg, #7b8cff, #5265df); border-radius: 12px; box-shadow: 0 8px 24px rgba(94, 113, 255, .3); }
.brand-shield { width: 21px; height: 24px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); clip-path: polygon(50% 0, 91% 15%, 87% 59%, 50% 100%, 13% 59%, 9% 15%); font-size: 14px; font-weight: 800; }
.header-state, .route-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.header-state { padding: 8px 11px; background: rgba(17, 34, 59, .62); border: 1px solid var(--border); border-radius: 999px; }
.state-dot, .route-badge i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(246, 189, 112, .1); }
.header-state[data-state="ready"] .state-dot, .route-card[data-state="ready"] .route-badge i { background: var(--green); box-shadow: 0 0 0 4px rgba(99, 217, 160, .1); }
.header-state[data-state="error"] .state-dot, .route-card[data-state="error"] .route-badge i { background: var(--red); box-shadow: 0 0 0 4px rgba(243, 132, 144, .1); }

.download-hero { position: relative; min-height: 430px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); align-items: center; gap: 34px; padding: 70px 4.5% 58px; overflow: hidden; }
.download-hero::before { content: ""; position: absolute; z-index: -1; inset: 12% 15% 5% 0; background: linear-gradient(120deg, rgba(41, 65, 116, .23), transparent 72%); filter: blur(16px); border-radius: 50%; }
.eyebrow { margin: 0 0 12px; color: #8e9eff; font-size: 9px; font-weight: 750; letter-spacing: .2em; }
.hero-copy h1 { margin: 0; color: #f4f7ff; font-size: clamp(41px, 6vw, 67px); font-weight: 730; line-height: .99; letter-spacing: -.07em; }
.hero-copy h1 span { color: #8d9dff; }
.hero-description { max-width: 460px; margin: 22px 0 28px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; }
.download-button { min-width: 260px; display: inline-flex; align-items: center; gap: 12px; padding: 12px 14px 12px 13px; color: white; background: linear-gradient(135deg, #7184ff, #5869e7); border-radius: 12px; box-shadow: 0 13px 28px rgba(86, 105, 231, .28); text-align: left; transition: transform .18s, filter .18s, opacity .18s; }
.download-button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-2px); }
.download-button:active:not(:disabled) { transform: translateY(0); }
.download-button:disabled { cursor: wait; opacity: .58; }
.button-icon { width: 33px; height: 33px; display: grid; place-items: center; color: #cbd3ff; background: rgba(15, 25, 68, .32); border-radius: 9px; font-size: 23px; line-height: 1; }
.button-copy { flex: 1; min-width: 0; }
.button-copy strong, .button-copy small { display: block; }
.button-copy strong { font-size: 12px; font-weight: 700; }
.button-copy small { margin-top: 3px; overflow: hidden; color: #c6ceff; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.button-arrow { color: #dce1ff; font-size: 20px; }
.text-action { padding: 5px 0; color: #aab5ff; background: transparent; font-size: 10px; }
.text-action:hover { color: #e0e5ff; }
.download-error { max-width: 430px; margin: 13px 0 0; color: var(--red); font-size: 10px; line-height: 1.55; }

.hero-visual { position: relative; min-height: 300px; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
.orb-large { width: 260px; height: 260px; background: radial-gradient(circle at 35% 28%, rgba(131, 148, 255, .22), rgba(53, 75, 162, .08) 45%, transparent 70%); box-shadow: inset -14px -18px 40px rgba(57, 188, 187, .07), 0 0 90px rgba(89, 107, 234, .14); }
.orb-small { width: 130px; height: 130px; background: radial-gradient(circle at 36% 26%, rgba(121, 240, 212, .17), transparent 66%); }
.shield-card { position: relative; z-index: 1; width: 142px; height: 166px; display: grid; place-items: center; background: linear-gradient(145deg, rgba(111, 133, 255, .3), rgba(38, 65, 124, .42)); border: 1px solid rgba(177, 189, 255, .4); border-radius: 48% 48% 43% 43% / 31% 31% 60% 60%; box-shadow: 0 0 65px rgba(102, 128, 255, .28), inset 0 0 38px rgba(164, 178, 255, .1); transform: rotate(-8deg); }
.shield-glow { position: absolute; inset: 20px; border-radius: inherit; background: radial-gradient(circle, rgba(151, 165, 255, .27), transparent 63%); filter: blur(10px); }
.shield-symbol { position: relative; z-index: 1; width: 55px; height: 55px; display: grid; place-items: center; color: #d8edff; background: linear-gradient(145deg, #65dccc, #528fdd); clip-path: polygon(50% 0, 92% 16%, 87% 60%, 50% 100%, 13% 60%, 8% 16%); font-size: 27px; font-weight: 800; text-shadow: 0 2px 10px rgba(5, 39, 75, .45); }
.orbit { position: absolute; border: 1px solid rgba(114, 143, 240, .22); border-radius: 50%; transform: rotate(-24deg); }
.orbit-one { width: 315px; height: 112px; }
.orbit-two { width: 260px; height: 91px; transform: rotate(49deg); border-color: rgba(89, 214, 199, .15); }

.status-panel, .download-options { padding: 22px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 55px rgba(0, 0, 0, .14); backdrop-filter: blur(15px); }
.download-options { margin-top: 18px; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.panel-heading .eyebrow { margin-bottom: 7px; }
.panel-heading h2 { margin: 0; color: #dfe7f9; font-size: 15px; letter-spacing: -.02em; }
.refresh-label { color: var(--faint); font-size: 9px; }
.route-card { display: flex; align-items: center; gap: 13px; margin-top: 19px; padding: 13px 14px; background: rgba(6, 15, 29, .34); border: 1px solid rgba(101, 133, 188, .18); border-radius: 11px; }
.route-card[data-state="ready"] { border-color: rgba(91, 210, 157, .2); }
.route-card[data-state="error"] { border-color: rgba(242, 124, 138, .25); }
.route-icon { width: 32px; height: 32px; display: grid; place-items: center; color: #aab6ff; background: rgba(105, 124, 255, .15); border-radius: 9px; font-size: 19px; }
.route-copy { flex: 1; min-width: 0; }
.route-copy span, .route-copy strong, .route-copy small { display: block; }
.route-copy span { color: var(--faint); font-size: 9px; }
.route-copy strong { margin-top: 4px; overflow: hidden; color: #dfe7fa; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.route-copy small { margin-top: 4px; overflow: hidden; color: #7184a4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.route-badge { padding: 5px 8px; color: var(--green); background: rgba(93, 212, 157, .09); border-radius: 999px; white-space: nowrap; }
.route-card[data-state="loading"] .route-badge { color: var(--orange); background: rgba(246, 189, 112, .08); }
.route-card[data-state="error"] .route-badge { color: var(--red); background: rgba(243, 132, 144, .08); }
.status-footnote { display: flex; align-items: center; gap: 7px; margin-top: 15px; color: var(--faint); font-size: 9px; }
.info-icon { width: 14px; height: 14px; display: inline-grid; place-items: center; flex: 0 0 auto; color: #9eacff; border: 1px solid rgba(144, 158, 255, .42); border-radius: 50%; font-size: 9px; }
.options-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 18px; }
.option-card { display: flex; align-items: center; gap: 10px; padding: 12px; background: rgba(6, 15, 29, .31); border: 1px solid rgba(101, 133, 188, .18); border-radius: 10px; }
.option-icon { width: 30px; height: 30px; display: grid; place-items: center; color: #b8c1ff; background: rgba(106, 124, 255, .14); border-radius: 8px; font-size: 11px; font-weight: 750; }
.option-copy { flex: 1; min-width: 0; }
.option-copy strong, .option-copy small { display: block; }
.option-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.option-copy small { margin-top: 4px; color: var(--faint); font-size: 9px; }
.option-select { padding: 6px 8px; color: #abb6ff; background: rgba(104, 122, 255, .12); border-radius: 6px; font-size: 9px; }
.download-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 35px; color: #586986; font-size: 9px; }
.download-footer a { color: #8292bb; }
.download-footer a:hover { color: #bdc7ff; }
.footer-spacer { flex: 1; }

@media (max-width: 720px) {
  .download-shell { width: min(100% - 32px, 560px); padding-top: 20px; }
  .download-hero { min-height: 0; grid-template-columns: 1fr; gap: 5px; padding: 67px 0 38px; }
  .hero-copy h1 { font-size: clamp(39px, 13vw, 58px); }
  .hero-visual { min-height: 245px; order: -1; opacity: .78; }
  .orb-large { width: 220px; height: 220px; }
  .orbit-one { width: 285px; }
  .orbit-two { width: 240px; }
  .hero-description { font-size: 12px; }
}
@media (max-width: 460px) {
  .download-shell { width: min(100% - 24px, 440px); }
  .download-header { align-items: flex-start; }
  .header-state { padding: 7px 8px; font-size: 9px; }
  .download-hero { padding-top: 48px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .download-button { width: 100%; min-width: 0; }
  .text-action { align-self: flex-start; }
  .status-panel, .download-options { padding: 16px; }
  .route-card { align-items: flex-start; }
  .route-badge { margin-left: auto; }
  .status-footnote { align-items: flex-start; line-height: 1.5; }
  .download-footer { flex-wrap: wrap; }
}
