:root {
  --ex-primary-color: #abe127;
  --ex-default-background-color: #000;
  --ex-route-background: #0d1117;
  --ex-panel-background: #121212;
  --ex-panel-background-soft: #171a20;
  --ex-default-font-color: #fff;
  --ex-muted-font-color: #9b9b9e;
  --ex-border-color: #4c4e53;
  --ex-danger-color: #ca3f64;
  --ex-max-width: 375px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at top center, rgba(171, 225, 39, 0.14) 0%, rgba(171, 225, 39, 0.04) 18%, rgba(0, 0, 0, 0) 42%),
    radial-gradient(circle at 15% 18%, rgba(39, 132, 225, 0.14) 0%, rgba(39, 132, 225, 0.04) 20%, rgba(0, 0, 0, 0) 40%),
    linear-gradient(180deg, #050608 0%, #090b10 26%, #050608 100%),
    var(--ex-default-background-color);
  color: var(--ex-default-font-color);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

button,
input,
select,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.download-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.phone-frame {
  width: 100%;
  max-width: var(--ex-max-width);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 18%),
    var(--ex-route-background);
}

.brand-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 94px;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #050608;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  font-size: 19px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-subtitle {
  margin-top: 5px;
  color: var(--ex-primary-color);
  font-size: 12px;
  line-height: 1.2;
}

.locale-wrap {
  position: relative;
  width: 94px;
}

.locale-wrap::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--ex-muted-font-color);
  border-bottom: 1px solid var(--ex-muted-font-color);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

#localeSelect {
  width: 100%;
  height: 36px;
  padding: 0 26px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #000;
  color: var(--ex-default-font-color);
  appearance: none;
  outline: none;
  font-size: 12px;
}

.hero-copy {
  margin-top: 42px;
}

.hero-copy h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 14px 0 0;
  color: var(--ex-muted-font-color);
  font-size: 14px;
  line-height: 1.55;
}

.panel,
.notice-box,
.qr-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: var(--ex-panel-background);
}

.lock-panel {
  margin-top: 28px;
  padding: 18px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--ex-default-font-color);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
}

#passwordInput {
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #000;
  color: var(--ex-default-font-color);
  outline: none;
  font-size: 14px;
}

#passwordInput:focus {
  border-color: rgba(171, 225, 39, 0.75);
}

.primary-button {
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--ex-primary-color);
  color: #101410;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button:active {
  transform: translateY(1px);
}

.error-text {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--ex-danger-color);
  font-size: 12px;
  line-height: 1.4;
}

.muted-line {
  margin: 8px 0 0;
  color: #7c7e82;
  font-size: 12px;
  line-height: 1.45;
}

.download-panel {
  margin-top: 26px;
}

.ready-copy {
  margin-bottom: 14px;
}

.ready-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
}

.ready-subtitle {
  margin-top: 6px;
  color: var(--ex-muted-font-color);
  font-size: 13px;
  line-height: 1.45;
}

.download-list {
  display: grid;
  gap: 10px;
}

.download-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: var(--ex-panel-background);
}

.download-item:active {
  border-color: rgba(171, 225, 39, 0.6);
}

.ghost-item {
  background: var(--ex-panel-background-soft);
}

.platform-icon {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(171, 225, 39, 0.12);
  color: var(--ex-primary-color);
}

.android-icon,
.ios-icon {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 23px 24px;
}

.android-icon {
  background-image: url("./android.png");
}

.ios-icon {
  background-image: url("./apple.png");
}

.web-icon::before,
.web-icon::after {
  content: "";
  position: absolute;
  border-color: currentColor;
}

.web-icon::before {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.web-icon::after {
  width: 20px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.platform-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.platform-copy strong {
  overflow: hidden;
  color: var(--ex-default-font-color);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-copy small {
  color: var(--ex-muted-font-color);
  font-size: 12px;
  line-height: 1.35;
}

.download-action {
  min-width: 64px;
  padding: 8px 9px;
  border-radius: 8px;
  background: var(--ex-primary-color);
  color: #101410;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
}

.qr-block {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
}

.qr-block img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #fff;
}

.qr-block strong,
.qr-block span {
  display: block;
}

.qr-block strong {
  font-size: 14px;
  line-height: 1.25;
}

.qr-block span {
  margin-top: 5px;
  color: var(--ex-muted-font-color);
  font-size: 12px;
  line-height: 1.4;
}

.notice-box {
  margin-top: 14px;
  padding: 13px;
}

.notice-box strong {
  display: block;
  color: var(--ex-primary-color);
  font-size: 13px;
  line-height: 1.3;
}

.notice-box p {
  margin: 7px 0 0;
  color: var(--ex-muted-font-color);
  font-size: 12px;
  line-height: 1.45;
}

.page-footer {
  margin-top: 28px;
  color: #7c7e82;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.is-unlocked .lock-panel {
  display: none;
}

@media (max-width: 360px) {
  .phone-frame {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-head {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .locale-wrap {
    grid-column: 1 / -1;
    width: 100%;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .download-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .download-action {
    grid-column: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
