:root {
  --color-BasicBg: #181a20;
  --color-SecondaryBg: #0b0e11;
  --color-PrimaryText: #eaecef;
  --color-SecondaryText: #929aa5;
  --color-IconNormal: #707a8a;
  --color-Line: #333b47;
  --color-InputLine: #434c5a;
  --color-TextLink: #f0b90b;
  --color-PrimaryYellow: #f0b90b;
  --color-BtnBg: #fcd535;
  --color-BadgeBg: rgba(240, 185, 11, 0.1);
  --header-height: 64px;
  --max-width: 1200px;
  --font: "BinancePlex", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-BasicBg);
  color: var(--color-PrimaryText);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ===== Telegram banner ===== */
.telegram-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 16px;
  background: var(--color-BadgeBg);
  color: var(--color-PrimaryText);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: opacity 0.15s ease;
}

.telegram-banner:hover {
  opacity: 0.85;
}

.telegram-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2babee;
  color: #fff;
  flex-shrink: 0;
}

.telegram-icon svg {
  width: 14px;
  height: 14px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(24, 26, 32, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.site-header .header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 28px;
  width: auto;
  display: block;
}

/* ===== Hero ===== */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 120px 24px 60px;
  display: flex;
  align-items: center;
  gap: 80px;
}

.hero-content {
  width: 540px;
  flex-shrink: 0;
}

.hero-title {
  font-size: 40px;
  font-weight: 600;
  line-height: 48px;
  color: var(--color-PrimaryText);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--color-SecondaryText);
  min-height: 64px;
  margin-bottom: 24px;
}

.download-row {
  display: flex;
  gap: 24px;
}

.download-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  width: 220px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--color-PrimaryText);
  color: var(--color-BasicBg);
  transition: opacity 0.15s ease;
  cursor: pointer;
}

.download-btn:hover {
  opacity: 0.8;
}

.download-btn svg.platform-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.download-btn .label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-align: left;
}

.download-btn svg.qr-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.version {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--color-IconNormal);
}

.hero-image {
  flex: 1;
  min-width: 0;
}

.hero-image img {
  width: 100%;
}

/* ===== Desktop section ===== */
.desktop-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
  display: flex;
  align-items: center;
  gap: 180px;
}

.desktop-section .desktop-image {
  flex: 1;
  min-width: 0;
}

.desktop-section .desktop-content {
  min-width: 540px;
  flex-shrink: 0;
}

.section-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 38px;
  color: var(--color-PrimaryText);
  margin-bottom: 36px;
}

.desktop-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.link-history {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-TextLink);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.link-history:hover {
  opacity: 0.8;
}

/* ===== Authenticator & API ===== */
.bottom-section {
  background: var(--color-SecondaryBg);
  padding: 60px 24px;
  text-align: center;
}

.bottom-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bottom-section .section-title {
  margin-bottom: 24px;
  justify-content: center;
  display: flex;
}

.outline-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 56px;
  min-width: 240px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--color-InputLine);
  color: var(--color-PrimaryText);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s ease;
  cursor: pointer;
  background: transparent;
}

.outline-btn:hover {
  border-color: var(--color-PrimaryText);
}

.outline-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.divider {
  width: 100%;
  max-width: 800px;
  height: 1px;
  background: var(--color-Line);
  margin: 40px auto;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-SecondaryBg);
  border-top: 1px solid var(--color-Line);
  padding: 40px 24px 48px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 280px;
}

.footer-brand p {
  font-size: 12px;
  color: var(--color-SecondaryText);
  line-height: 18px;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-PrimaryText);
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--color-SecondaryText);
  margin-bottom: 12px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--color-PrimaryYellow);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--color-Line);
  font-size: 12px;
  color: var(--color-IconNormal);
}

/* ===== QR tooltip ===== */
.btn-wrap {
  position: relative;
  display: inline-flex;
}

.qr-popup {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  padding: 16px;
  background: var(--color-BasicBg);
  border: 1px solid var(--color-Line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 20;
  text-align: center;
}

.btn-wrap:hover .qr-popup {
  display: block;
}

.qr-popup::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--color-BasicBg);
  border-left: 1px solid var(--color-Line);
  border-top: 1px solid var(--color-Line);
}

.qr-popup canvas,
.qr-popup .qr-placeholder {
  width: 148px;
  height: 148px;
  margin: 0 auto 8px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-popup p {
  font-size: 12px;
  color: var(--color-SecondaryText);
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .hero {
    flex-direction: column;
    padding-top: 64px;
    gap: 48px;
  }

  .hero-content {
    width: 100%;
    max-width: 540px;
  }

  .desktop-section {
    flex-direction: column-reverse;
    gap: 48px;
  }

  .desktop-section .desktop-content {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .telegram-banner {
    font-size: 12px;
  }

  .hero {
    padding: 40px 16px;
  }

  .hero-title {
    font-size: 28px;
    line-height: 36px;
  }

  .hero-subtitle {
    min-height: 0;
    font-size: 14px;
  }

  .download-row {
    flex-direction: column;
    gap: 16px;
  }

  .download-btn {
    width: 100%;
    max-width: 280px;
  }

  .desktop-section {
    padding: 40px 16px;
  }

  .section-title {
    font-size: 24px;
    line-height: 32px;
    margin-bottom: 24px;
  }

  .outline-btn {
    min-width: 100%;
  }
}

/* Disabled controls (no download file available) */
.download-btn.is-disabled,
.outline-btn.is-disabled,
.link-history.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  user-select: none;
}
