*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: #f9fafb;
  padding: 0 0 20px 0;
  min-height: 100vh;
  font-family: Inter, sans-serif;
  color: #0f0f23;
  overflow-x: hidden;
}

p {
  margin: 0;
}

a {
  cursor: pointer;
}

#otp_div br,
#otp-wrapper br,
#div3 br {
  display: none;
}

/* Layout */
.center {
  position: relative;
}

#maindiv {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  padding: 10px;
  position: relative;
  box-sizing: border-box;
  overflow-x: hidden;
}

@media only screen and (min-width: 1025px) {
  .center {
    margin: auto;
    width: 30%;
    padding: 10px;
  }
}

@media (max-width: 640px) {
  #maindiv {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 12px 22px 28px;
  }

  #mideldisc {
    margin-top: auto;
    padding-top: 72px;
  }

  #div3 {
    margin-top: 0 !important;
  }
}

/* Header wrapper */
#header-background-wrapper {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Close / ads */
#closediv {
  display: none;
}

#closediv a {
  color: black;
  font-size: 15px;
  margin: 10px;
  text-decoration: none;
  display: inline-block;
  line-height: 1.1;
}

#closediv p {
  color: #0f0f23 !important;
  margin: 10px 0;
  background-color: transparent !important;
}

/* Top bar */
#uppergrid {
  display: grid;
  grid-template-columns: 32px 1fr 48px;
  align-items: center;
  width: 100%;
  margin: 0;
  column-gap: 4px;
}

#upperdiv p {
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
  padding: 0 2px;
}

#tagline-text {
  margin: 28px 0 40px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f0f23;
}

#upperdiv > *,
#upperdiv p,
#upperdiv span,
#upperdiv b {
  color: #0f0f23cc !important;
}

.menu-btn {
  position: relative !important;
  top: unset !important;
  right: unset !important;
  left: unset !important;
  width: 32px;
  padding: 4px;
  margin: 0 !important;
  cursor: pointer;
  background: transparent;
  border: none;
  grid-column: 1 / 2;
}

.menu-btn div {
  height: 4px;
  background: #0f0f23 !important;
  border-radius: 2px;
}

.menu-btn div + div {
  margin-top: 4px;
}

.lang {
  grid-column: 3 / 4;
  text-align: right;
  margin-right: 0;
}

.lang #langbar {
  font-size: 16px !important;
  color: #0f0f23 !important;
  background: transparent;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  width: 48px;
  max-width: 48px;
  padding: 2px 0;
  text-align: center;
}

#maindiv #langbar option {
  font-size: 20px;
  color: #0f0f23 !important;
}

/* Off-canvas */
.offcanvas {
  position: fixed;
  top: 0;
  left: -340px;
  width: 300px;
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  z-index: 1000;
  padding: 20px;
  overflow: hidden;
}

.offcanvas.active {
  left: 0;
}

html[dir="rtl"] .offcanvas {
  left: auto;
  right: -340px;
  transition: right 0.3s ease;
}

html[dir="rtl"] .offcanvas.active {
  right: 0;
}

#offcanvas .close-offcanvas {
  font-size: 30px;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-bottom: 20px;
  text-align: right;
  width: 100%;
}

#offcanvas nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#offcanvas nav li {
  margin: 15px 0;
}

#offcanvas nav li a {
  color: black;
  text-decoration: none;
}

#displayphotologo {
  display: none;
  width: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Form */
#otp_div,
#vcode_div {
  width: 100%;
  text-align: center;
}

#otp_div .label {
  margin-bottom: 0;
}

.label,
.label b,
.label p {
  color: #0f0f23cc !important;
  font-size: 16px;
}

.field {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 2px solid #40008e;
  color: black !important;
  border-radius: 16px;
  position: relative;
  background: white;
  width: calc(100% - 24px) !important;
  max-width: 100%;
  min-width: 0;
  margin: 8px auto 10px;
  box-sizing: border-box;
  height: 64px;
  overflow: hidden;
  animation: shake 3s, heartbeat 1.75s ease-in-out infinite both;
}

#maindiv > *,
#otp_div > * {
  transition: filter 0.28s ease, opacity 0.28s ease;
}

body.is-phone-focus #maindiv > *:not(#otp_div) {
  filter: blur(7px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

body.is-phone-focus #otp_div > *:not(.field) {
  filter: blur(7px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

body.is-phone-focus .field {
  z-index: 5;
  animation: none;
  transform: none;
  box-shadow: 0 10px 28px rgba(64, 0, 142, 0.18);
}

.field .phone-icon {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 0 0 0 12px;
  height: 100%;
  align-items: center;
}

.field .checkmark-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 12px 0 0;
  height: 100%;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.field .checkmark-icon.visible {
  opacity: 1;
  transform: scale(1);
}

.field .checkmark-icon svg {
  width: 24px;
  height: 24px;
}

#countrycode,
#phone,
#pincode {
  border: none;
  outline: none;
  height: 100% !important;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent !important;
  color: #0f0f23 !important;
  font-family: Inter, sans-serif;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

#countrycode {
  flex: 0 0 4.6rem;
  width: 4.6rem !important;
  padding: 0 8px;
  direction: ltr;
  border-right: 1px solid #363d491a;
}

#otp_div #phone {
  flex: 1 1 0;
  width: 0 !important;
  height: 100% !important;
  padding: 0 10px;
  text-align: left;
}

#pincode {
  flex: 1 1 0;
  width: 0 !important;
  min-width: 0;
  padding: 0 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

/* 4-slot PIN placeholder: light gray "_ _ _ _" (spacing comes from the
   en-spaces in the placeholder text, so drop letter-spacing/indent while empty) */
#pincode:placeholder-shown {
  letter-spacing: 0;
  text-indent: 0;
}

#pincode::placeholder {
  color: #d2d2da;
  opacity: 1;
  letter-spacing: 0;
}

html[dir="rtl"] #otp_div #phone {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] #otp_div #phone::placeholder {
  direction: rtl;
  text-align: right;
  unicode-bidi: bidi-override;
}

html[dir="rtl"] #countrycode {
  border-right: none;
  border-left: 1px solid #363d491a;
}

html[dir="rtl"] .field .phone-icon {
  padding: 0 12px 0 0;
}

html[dir="rtl"] .field .checkmark-icon {
  padding: 0 0 0 12px;
}

/* Buttons */
.btn-hint {
  width: 100% !important;
  display: inline-block;
  text-align: center;
  text-transform: uppercase;
  padding: 1rem 0 !important;
  box-shadow: none !important;
  font-size: 20px !important;
  border-radius: 50px;
  font-weight: bold;
  background: linear-gradient(90deg, #9810fa 0%, #e60076 50%, #155dfc 100%);
  color: white !important;
  margin-top: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

#maindiv .btn {
  padding: 1rem 0 !important;
  box-shadow: none !important;
  font-size: 20px !important;
  border-radius: 50px;
  text-transform: uppercase;
  font-weight: bold;
  width: 100% !important;
  background: linear-gradient(90deg, #9810fa 0%, #e60076 50%, #155dfc 100%);
  color: white !important;
  margin-top: 10px;
}

#maindiv .btn[disabled],
.btn[disabled] {
  background: rgba(0, 0, 0, 0.1) !important;
  color: rgba(0, 0, 0, 0.3) !important;
  box-shadow: none !important;
  pointer-events: none;
}

#errortext,
#errortext2 {
  color: red;
  font-weight: bold;
  min-height: 0;
  margin: 0;
}

#errortext2.is-success {
  color: #0f0f23cc;
  font-weight: 600;
}

/* Step indicator */
.flow-steps {
  display: flex;
  align-items: flex-start;
  list-style: none;
  margin: 22px auto 6px;
  padding: 0 4px;
  width: calc(100% - 8px);
  max-width: 100%;
}

.flow-step {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.flow-step-mark {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #e4e7ec;
  color: #98a2b3;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.flow-step-check {
  display: none;
  width: 18px;
  height: 18px;
}

.flow-step.is-current .flow-step-mark {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #9810fa 0%, #e60076 70%, #155dfc 140%);
  box-shadow: 0 0 0 5px rgba(152, 16, 250, 0.12), 0 8px 16px rgba(230, 0, 118, 0.28);
}

.flow-step.is-done .flow-step-mark {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #9810fa 0%, #e60076 100%);
  box-shadow: none;
}

.flow-step.is-done .flow-step-num {
  display: none;
}

.flow-step.is-done .flow-step-check {
  display: block;
}

.flow-step-label {
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: #98a2b3;
  max-width: 92px;
}

.flow-step.is-current .flow-step-label {
  color: #e60076;
}

.flow-step.is-done .flow-step-label {
  color: #0f0f23cc;
}

.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 24px);
  width: calc(100% - 48px);
  height: 2px;
  border-radius: 2px;
  background: #e4e7ec;
  z-index: 0;
  transition: background 0.25s ease;
}

.flow-step.is-done:not(:last-child)::after {
  background: linear-gradient(90deg, #9810fa 0%, #e60076 100%);
}

html[dir="rtl"] .flow-step:not(:last-child)::after {
  left: auto;
  right: calc(50% + 24px);
  background: #e4e7ec;
}

html[dir="rtl"] .flow-step.is-done:not(:last-child)::after {
  background: linear-gradient(270deg, #9810fa 0%, #e60076 100%);
}

/* Disclaimers */
#div2,
#div3,
#div33,
#mmc,
#mideldisc,
#upperdiv > *,
.label > *,
#div3 a[href] {
  color: #0f0f23cc !important;
}

#div3 {
  font-size: 12px !important;
  margin-top: 20px !important;
  line-height: 1.45;
}

#div3 p,
#div3 span,
#div3 font,
#div3 div {
  text-align: center;
  color: #0f0f23cc !important;
}

.disclaimer-block {
  text-align: center;
  font-size: 12px;
  color: #0f0f23cc;
  margin: 0;
  line-height: 1.45;
}

#p-p,
#t-c {
  color: #0f0f23cc !important;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-decoration: underline;
}

.legal-links {
  text-align: center;
  margin: 6px 0 4px;
}

/* FAQ */
#faq-section {
  max-width: 800px;
  margin: auto;
  padding: 15px 0;
  background: #f9fafb;
}

#faq-section h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: bold;
  color: black;
}

.faq-item {
  margin-bottom: 10px;
  border: 1px solid #dedede;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-question {
  padding: 12px 15px;
  background: #ffffff0d;
  color: black;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  text-align: left;
  gap: 8px;
}

html[dir="rtl"] .faq-question {
  flex-direction: row-reverse;
  text-align: right;
}

.faq-toggle {
  display: inline-block;
  transition: transform 0.3s ease;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.faq-toggle img {
  width: 100%;
  height: 100%;
  display: block;
}

.faq-item.open .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 15px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #ffffff0d;
  color: black;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
}

html[dir="rtl"] .faq-answer {
  text-align: right;
}

.faq-answer p {
  padding: 12px 0;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal.open {
  display: block;
}

.modal-dialog {
  height: 90vh;
  max-width: 90%;
  margin: 1.75rem auto;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  height: 100%;
}

.modal-header a {
  font-size: 30px;
  color: #111;
  text-decoration: none;
}

.modal-body {
  height: calc(100% - 120px);
  overflow-y: auto;
  text-align: left;
  color: #161a1d;
  font-size: 14px;
  line-height: 1.5;
}

html[dir="rtl"] .modal-body {
  text-align: right;
}

.modal-body h1 {
  font-size: 28px;
  margin-top: 12px;
}

.modal-body h2 {
  font-size: 22px;
  margin-top: 20px;
}

.modal-body p {
  margin: 0 0 10px;
}

.modal-body ul {
  padding-left: 20px;
  margin: 0 0 12px;
}

html[dir="rtl"] .modal-body ul {
  padding-left: 0;
  padding-right: 20px;
}

.modal-footer .btn-secondary {
  background: #6c757d !important;
  color: #fff !important;
  width: auto !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  border-radius: 6px;
  text-transform: none;
  display: inline-block;
}

#displayiframe {
  height: 100%;
  width: 100%;
}

/* Lang visibility */
[data-lang-block] {
  display: none;
}

html[lang="en"] [data-lang-block="en"],
html[lang="ar"] [data-lang-block="ar"] {
  display: block;
}

html[lang="en"] [data-lang-inline="en"],
html[lang="ar"] [data-lang-inline="ar"] {
  display: inline;
}

[data-lang-inline] {
  display: none;
}

body.doc-page {
  background: #fff;
}

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 22px 72px;
}

.doc-nav {
  margin: 0 0 18px;
}

.doc-back {
  color: #40008e;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.doc h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 12px;
}

.doc h2 {
  font-size: 18px;
  line-height: 1.35;
  margin: 28px 0 10px;
}

.doc p,
.doc li {
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 12px;
  color: #0f0f23;
}

.doc ul {
  margin: 0 0 12px;
  padding-inline-start: 22px;
}

.doc a {
  color: #40008e;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-10px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(10px);
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14.3%,
  42.9% {
    transform: scale(1.1);
  }
  28.6%,
  57.1% {
    transform: scale(1);
  }
}
