* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== rem flexible: 1rem = 37.5px on 375px viewport ===== */
html {
  font-size: 37.5px;
}

/* ===== CSS Variables ===== */
:root {
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;
  --fw-900: 900;
  --string-font: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --number-font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --fs-10: 0.26667rem;
  --fs-12: 0.32rem;
  --fs-14: 0.37333rem;
  --fs-16: 0.42667rem;
  --fs-20: 0.53333rem;
  --fs-24: 0.64rem;
  --fs-28: 0.74667rem;
  --fs-32: 0.85333rem;
  --fs-40: 1.06667rem;
  --fs-48: 1.28rem;
  --lh-display-58: 1.54667rem;
  --lh-display-48: 1.28rem;
  --lh-display-40: 1.06667rem;
  --lh-headline-36: 0.96rem;
  --lh-headline-32: 0.85333rem;
  --lh-headline-28: 0.74667rem;
  --lh-title-28: 0.74667rem;
  --lh-title-24: 0.64rem;
  --lh-title-20: 0.53333rem;
  --lh-body-24: 0.64rem;
  --lh-body-20: 0.53333rem;
  --lh-body-18: 0.48rem;
  --lh-label-18: 0.48rem;
  --lh-label-16: 0.42667rem;
  --lh-label-14: 0.37333rem;
}

body {
  background: linear-gradient(180deg, #ff4e3b 0%, #491161 100%);
  min-height: 100vh;
  width: 100vw;
}

/* ====== Toast ====== */
#toast {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#toast.show {
  opacity: 1;
}

/* ====== Desktop Layout (.for-web) ====== */
.for-web {
  width: 100%;
  min-height: 100vh;
  position: relative;
}

.for-web .bg1 {
  width: 100%;
  max-width: 1440px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
}

.for-web .bg2 {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
}

.for-web .main {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1440px;
  min-height: 1100px;
  margin: 0 auto;
  padding-top: 103px;
}

.for-web .main .title {
  width: 100%;
  color: #fff;
  font-family: var(--string-font);
  font-size: 48px;
  font-weight: var(--fw-700);
  line-height: 58px;
  text-align: center;
}

.for-web .main .code {
  width: 100%;
  text-align: center;
  margin-top: 24px;
}

.for-web .main .code-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 4px;
  background: #ae2836;
  backdrop-filter: blur(17px);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--string-font);
  font-size: 24px;
  font-weight: var(--fw-400);
  line-height: 32px;
  cursor: pointer;
}

.for-web .main .code-copy .code-lbl {
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 4px;
}

.for-web .main .code-copy .code-val {
  display: flex;
  padding: 8px 12px;
  margin: 0 12px;
  justify-content: center;
  align-items: center;
  border-radius: 2px;
  background: #971735;
  white-space: nowrap;
  flex-shrink: 0;
}

.for-web .main .code-copy img.copy-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.for-web .main .link {
  margin-top: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.for-web .main .link-item {
  margin: 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.for-web .main .link-top {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--string-font);
  font-size: 32px;
  font-weight: var(--fw-700);
  line-height: 40px;
}

.for-web .main .link-top img.app-logo {
  width: 88px;
  height: 88px;
  margin: 0 12px;
}

.for-web .main .link-store {
  width: 245px;
  margin-top: 40px;
}

.for-web .main .link-store img {
  width: 100%;
  cursor: pointer;
}

.for-web .bottom {
  position: absolute;
  left: 0;
  bottom: 35px;
  z-index: 13;
  width: 100%;
}

.for-web .bottom .text1 {
  width: 100%;
  padding: 0 16px;
  text-align: center;
  color: #fff;
  font-family: var(--string-font);
  font-size: 14px;
  font-weight: var(--fw-700);
  line-height: 20px;
}

.for-web .bottom .text2 {
  width: 100%;
  padding: 0 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--string-font);
  font-size: 14px;
  font-weight: var(--fw-400);
  line-height: 20px;
}

/* ====== Mobile Layout (.for-mobile) ====== */
.for-mobile {
  display: none;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

.for-mobile .bg1 {
  width: 100%;
  max-width: 1440px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
}

.for-mobile .bg2 {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
}

.for-mobile .main {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding-top: 1.97333rem; /* 74px */
}

.for-mobile .main .title {
  width: 100%;
  color: #fff;
  font-family: var(--string-font);
  font-size: var(--fs-40);
  font-weight: var(--fw-700);
  line-height: var(--lh-display-48);
  text-align: center;
}

.for-mobile .main .code {
  margin-top: 0.64rem;
  width: 100%;
  text-align: center;
}

.for-mobile .main .code-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 2rem);
  padding: 0.32rem 0.48rem;
  border-radius: 0.10667rem;
  background: #ae2836;
  backdrop-filter: blur(17px);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--string-font);
  font-size: var(--fs-16);
  font-weight: var(--fw-400);
  line-height: var(--lh-title-28);
  cursor: pointer;
}

.for-mobile .main .code-copy .code-lbl {
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 0.16rem;
}

.for-mobile .main .code-copy .code-val {
  display: flex;
  padding: 0.18667rem 0.32rem;
  margin: 0 0.21333rem;
  justify-content: center;
  align-items: center;
  border-radius: 0.05333rem;
  background: #971735;
  white-space: nowrap;
  flex-shrink: 0;
}

.for-mobile .main .code-copy img.copy-icon {
  width: 0.56rem;
  height: 0.56rem;
  flex-shrink: 0;
}

.for-mobile .main .link {
  margin-top: 0.64rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.for-mobile .main .link-item {
  margin-top: 0.85333rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.for-mobile .main .link-top {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--string-font);
  font-size: var(--fs-24);
  font-weight: var(--fw-700);
  line-height: var(--lh-headline-32);
}

.for-mobile .main .link-top img.app-logo {
  width: 1.76rem;
  height: 1.76rem;
  border-radius: 0.32rem;
  margin-right: 0.24rem;
}

.for-mobile .main .link-store {
  width: 4.88rem;
  margin-top: 0.64rem;
}

.for-mobile .main .link-store img {
  width: 100%;
  cursor: pointer;
}

.for-mobile .main .still-block {
  width: 100%;
  height: 5.86667rem;
}

.for-mobile .bottom {
  position: absolute;
  left: 0;
  bottom: 0.4rem;
  z-index: 13;
  width: 100%;
}

.for-mobile .bottom .text1 {
  width: 100%;
  padding: 0 0.42667rem;
  text-align: center;
  color: #fff;
  font-family: var(--string-font);
  font-size: var(--fs-14);
  font-weight: var(--fw-700);
  line-height: var(--lh-body-20);
}

.for-mobile .bottom .text2 {
  width: 100%;
  padding: 0 0.69333rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--string-font);
  font-size: var(--fs-12);
  font-weight: var(--fw-400);
  line-height: var(--lh-body-18);
}

/* ====== Responsive ====== */
@media screen and (max-width: 767px) {
  .for-web {
    display: none;
  }

  .for-mobile {
    display: block;
  }
}

/* ====== RTL (ar, fa, he) ====== */
html[dir="rtl"] .for-web .main .code-copy span,
html[dir="rtl"] .for-mobile .main .code-copy span {
  margin: 0 12px;
}
