* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-width: 300px;
  min-height: 100%;
  background: #1a1a1a;
}

body {
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}

button,
img {
  -webkit-tap-highlight-color: transparent;
}

.cbody {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #1a1a1a;
}

#container {
  position: relative;
  display: flex;
  width: min(95vw, 500px);
  min-width: 300px;
  max-width: 500px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bg-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-track {
  display: flex;
  width: 100%;
  height: 200%;
  flex-direction: column;
  animation: background-scroll 28s linear infinite;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.bg-item {
  width: 100%;
  height: 50vh;
  height: 50dvh;
  flex: 0 0 50%;
}

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

.language-switch {
  position: fixed;
  z-index: 12;
  top: 14px;
  left: 50%;
  display: flex;
  width: min(100%, 500px);
  justify-content: flex-end;
  gap: 6px;
  padding: 0 14px;
  direction: ltr;
  transform: translateX(-50%);
}

.language-switch button {
  min-width: 58px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  background: rgba(20, 20, 20, 0.68);
  color: #fff;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(4px);
}

.language-switch button[aria-pressed="true"] {
  border-color: #fe4e60;
  background: #fe4e60;
}

.content {
  position: fixed;
  z-index: 9;
  top: 20px;
  left: 50%;
  display: flex;
  width: min(100%, 500px);
  max-width: 500px;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  transform: translateX(calc(5px - 50%));
}

.font-style {
  width: 300px;
  margin: 70px auto 10px 30px;
  color: #fe4e60;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 42px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
}

.main-text {
  display: flex;
  width: 100%;
  padding: 0 20px;
  align-items: center;
  gap: 15px;
}

.left-img {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  overflow: hidden;
  border-radius: 8px;
}

.left-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.right-text {
  flex: 1;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

html[dir="rtl"] .right-text {
  font-family: "Noto Nastaliq Urdu", "Noto Sans Arabic", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  text-align: right;
}

.carousel {
  position: fixed;
  z-index: 1;
  bottom: 65px;
  left: 50%;
  width: min(92vw, 520px);
  overflow: hidden;
  border-radius: 18px;
  transform: translateX(-50%);
}

.carousel-track {
  display: flex;
  width: max-content;
  animation: carousel-scroll 22s linear infinite;
}

.carousel-item {
  width: 180px;
  height: 240px;
  padding: 8px;
  flex: none;
}

.carousel-item img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.download-button {
  position: fixed;
  z-index: 10;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  min-width: 300px;
  height: 95px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 30px;
  background: #fe4e60;
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.22;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  white-space: normal;
  transform: translateX(-50%);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6);
}

html[dir="rtl"] .download-button {
  font-family: "Noto Nastaliq Urdu", "Noto Sans Arabic", Arial, sans-serif;
  font-size: 24px;
  line-height: 1.55;
}

.download-button:hover {
  filter: brightness(1.06);
}

.download-button:active {
  filter: brightness(0.94);
}

.download-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.download-button[disabled] {
  cursor: wait;
  opacity: 0.88;
}

@keyframes carousel-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@keyframes background-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -50%, 0); }
}

@media (min-width: 500px) {
  .font-style {
    font-size: 28px;
  }
}

@media (max-height: 620px) {
  .content {
    top: 0;
  }

  .font-style {
    margin-top: 38px;
  }

  .carousel-item {
    width: 155px;
    height: 207px;
  }

  .download-button {
    height: 82px;
    font-size: 25px;
  }
}
