:root {
  --bg: #030506;
  --panel: rgba(5, 10, 12, .91);
  --panel-deep: rgba(3, 7, 9, .96);
  --gold: #e5c360;
  --gold-light: #fff0ad;
  --cyan: #54e8df;
  --red: #f16a5f;
  --green: #63e4a2;
  --text: #f6f7f4;
  --muted: #a3adae;
  --line: rgba(229, 195, 96, .35);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  height: auto;
  margin: 0;
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(0, 2, 3, .08), rgba(0, 2, 3, .26)),
    url("img/ipay-login-promo-bg-v2.png") center / cover fixed no-repeat,
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 15%, rgba(84, 232, 223, .08), transparent 23%),
    linear-gradient(90deg, rgba(0, 0, 0, .34), transparent 27%, transparent 73%, rgba(0, 0, 0, .34));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(84, 232, 223, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 195, 96, .07) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(90deg, #000, transparent 34%, transparent 66%, #000);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.ipay-login-stage {
  position: relative;
  z-index: 1;
  width: min(1860px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(290px, 370px) minmax(400px, 520px) minmax(310px, 410px);
  justify-content: space-between;
  align-items: center;
  gap: clamp(18px, 2vw, 34px);
  margin: 0 auto;
  padding: 22px 0;
}

.promo-rail {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.rail-heading {
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--line);
}

.rail-heading span {
  display: block;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
}

.rail-heading h2 {
  margin: 3px 0 0;
  color: var(--gold-light);
  font-size: 20px;
  line-height: 1.2;
  text-shadow: 0 0 18px rgba(229, 195, 96, .24);
}

.promo-card {
  position: relative;
  overflow: hidden;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(8, 15, 17, .96), rgba(24, 21, 13, .91)),
    var(--panel);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .04);
}

.promo-card::before {
  content: "";
  position: absolute;
  top: -70%;
  left: -70%;
  width: 34%;
  height: 240%;
  pointer-events: none;
  transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 240, 173, .15), transparent);
  animation: cardSweep 7s ease-in-out infinite;
}

.promo-card:nth-of-type(3)::before {
  animation-delay: 1.8s;
}

.promo-card:nth-of-type(4)::before {
  animation-delay: 3.4s;
}

.promo-card header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.promo-card header > i {
  color: rgba(84, 232, 223, .72);
  font-size: 12px;
}

.promo-card header .cash,
.promo-card header strong {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1;
}

.promo-card header strong {
  justify-content: flex-end;
  color: var(--gold-light);
  text-align: right;
}

.promo-card header small {
  color: var(--muted);
  font-family: Tahoma, Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
}

.bonus-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 5px;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
}

.bonus-label i {
  color: var(--gold);
}

.promo-card ul {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promo-card li {
  position: relative;
  min-width: 0;
  padding-left: 9px;
  color: #d5dbda;
  font-size: 10px;
  line-height: 1.35;
}

.promo-card li::before {
  content: "";
  position: absolute;
  top: .52em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(84, 232, 223, .52);
}

.promo-card.featured {
  border-color: rgba(84, 232, 223, .42);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .36), 0 0 20px rgba(84, 232, 223, .07);
}

.promo-card.royal {
  border-color: rgba(229, 195, 96, .62);
  background:
    linear-gradient(135deg, rgba(32, 24, 10, .94), rgba(6, 13, 15, .95)),
    var(--panel);
}

.promo-card.legend {
  border-color: rgba(241, 106, 95, .58);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .38), 0 0 24px rgba(241, 106, 95, .09);
}

.legend-ribbon {
  position: absolute;
  top: 5px;
  right: 6px;
  z-index: 2;
  padding: 3px 6px;
  border: 1px solid rgba(241, 106, 95, .58);
  border-radius: 4px;
  color: #ffd4cf;
  background: rgba(151, 44, 37, .36);
  font-size: 7px;
  font-weight: 800;
  animation: rewardBlink 1.35s ease-in-out infinite;
}

.login-center {
  min-width: 0;
  align-self: start;
  padding-top: clamp(32px, 7vh, 76px);
}

.ipay-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .54));
}

.ipay-brand img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(229, 195, 96, .42));
}

.ipay-brand span,
.ipay-brand strong,
.ipay-brand small {
  display: block;
}

.ipay-brand span {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 800;
}

.ipay-brand strong {
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.1;
  text-shadow: 0 0 19px rgba(229, 195, 96, .30);
}

.ipay-brand small {
  margin-top: 4px;
  color: #c6cecd;
  font-size: 10px;
}

.login-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(229, 195, 96, .56);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(4, 10, 12, .97), rgba(26, 23, 14, .95)),
    var(--panel-deep);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .64),
    0 0 32px rgba(229, 195, 96, .12),
    inset 0 1px rgba(255, 255, 255, .05);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--gold-light), transparent);
  animation: loginLine 2.8s ease-in-out infinite;
}

.login-security {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.login-security span,
.login-security em {
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.login-security span {
  color: var(--cyan);
}

.login-security em {
  color: var(--green);
}

.login-security em i {
  font-size: 5px;
  animation: statusBlink 1.3s ease-in-out infinite;
}

.login-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0 14px;
}

.login-emblem {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(229, 195, 96, .48);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(229, 195, 96, .07);
  box-shadow: 0 0 18px rgba(229, 195, 96, .08);
}

.login-title small {
  display: block;
  color: var(--cyan);
  font-size: 8px;
  font-weight: 800;
}

.login-title h1 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 21px;
  line-height: 1.2;
}

.login-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.login-card form,
.login-card .rd-login-form {
  display: grid;
  gap: 7px;
}

.login-card label {
  color: #c8cfce;
  font-size: 9px;
  font-weight: 700;
}

.login-input {
  min-height: 45px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid rgba(84, 232, 223, .27);
  border-radius: 5px;
  background: rgba(2, 8, 10, .86);
}

.login-input > i {
  color: var(--cyan);
  text-align: center;
}

.login-input input {
  min-width: 0;
  height: 43px;
  padding: 0 9px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 12px;
}

.login-input input::placeholder {
  color: #687576;
}

.login-input button {
  width: 38px;
  height: 34px;
  margin-right: 5px;
  border: 1px solid rgba(229, 195, 96, .30);
  border-radius: 4px;
  color: var(--gold-light);
  background: rgba(229, 195, 96, .06);
}

.login-submit {
  min-height: 46px;
  margin-top: 8px;
  border: 1px solid #fff0ad;
  border-radius: 5px;
  color: #111006;
  background: linear-gradient(135deg, #be932d, #f0d16f);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 22px rgba(229, 195, 96, .18);
}

.login-submit:disabled,
.login-submit.is-loading {
  cursor: wait;
  opacity: .66;
  filter: saturate(.62);
  box-shadow: none;
}

.login-card footer {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: #7f8a8a;
  font-size: 7px;
  font-weight: 700;
  text-align: center;
}

.login-card footer i {
  color: var(--gold);
}

.center-promo {
  margin: 10px auto 0;
  padding: 10px 12px;
  border: 1px solid rgba(84, 232, 223, .22);
  border-radius: 5px;
  text-align: center;
  background: rgba(2, 8, 10, .72);
  backdrop-filter: blur(5px);
}

.center-promo span,
.center-promo strong,
.center-promo small {
  display: block;
}

.center-promo span {
  color: var(--red);
  font-size: 7px;
  font-weight: 800;
}

.center-promo strong {
  margin: 2px 0;
  color: var(--gold-light);
  font-size: 12px;
}

.center-promo small {
  color: var(--muted);
  font-size: 8px;
}

@keyframes cardSweep {
  0%, 55% {
    left: -70%;
  }
  78%, 100% {
    left: 145%;
  }
}

@keyframes rewardBlink {
  0%, 100% {
    opacity: .72;
    box-shadow: 0 0 0 rgba(241, 106, 95, 0);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(241, 106, 95, .38);
  }
}

@keyframes loginLine {
  0%, 100% {
    opacity: .42;
    transform: scaleX(.35);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes statusBlink {
  0%, 100% {
    opacity: .45;
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 8px var(--green);
  }
}

@media (max-width: 1260px) {
  .ipay-login-stage {
    grid-template-columns: minmax(260px, 330px) minmax(360px, 450px) minmax(280px, 350px);
    gap: 14px;
  }

  .promo-card {
    padding: 9px;
  }

  .promo-card header .cash,
  .promo-card header strong {
    font-size: 19px;
  }

  .promo-card li {
    font-size: 8px;
  }
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

  .ipay-login-stage {
    width: min(760px, calc(100% - 18px));
    grid-template-columns: 1fr;
    grid-template-areas:
      "login"
      "left"
      "right";
    align-items: start;
    padding: 12px 0 28px;
  }

  .login-center {
    grid-area: login;
    width: min(100%, 500px);
    justify-self: center;
    padding-top: 0;
  }

  .promo-left {
    grid-area: left;
  }

  .promo-right {
    grid-area: right;
  }

  .promo-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rail-heading {
    grid-column: 1 / -1;
  }
}

@media (max-width: 580px) {
  body::after {
    display: none;
  }

  .ipay-login-stage {
    width: calc(100% - 14px);
    gap: 10px;
    padding-top: 7px;
  }

  .ipay-brand img {
    width: 62px;
    height: 62px;
  }

  .ipay-brand strong {
    font-size: 20px;
  }

  .login-card {
    padding: 14px;
  }

  .promo-rail {
    grid-template-columns: 1fr;
  }

  .rail-heading {
    grid-column: auto;
  }

  .promo-card li {
    font-size: 9px;
  }

  .promo-card header .cash,
  .promo-card header strong {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .promo-card::before,
  .legend-ribbon,
  .login-card::before,
  .login-security em i {
    animation: none;
  }
}
