* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #061b10;
  font-family: Arial, Helvetica, sans-serif;
}

.chess-login-page {
  width: 100%;
  min-height: 100svh;
}

.chess-login-hero {
  width: 100vw;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,18,8,.08)),
    url('/chess/assets/img/chess-login-background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.chess-login-card {
  width: min(86vw, 420px);
  margin-top: clamp(20px, 3svh, 40px);
  padding: 28px 22px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.60);
  background: rgba(255,255,255,.24);
  -webkit-backdrop-filter: blur(22px) saturate(1.22);
  backdrop-filter: blur(22px) saturate(1.22);
  box-shadow:
    0 26px 70px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.50);
  color: #071326;
  text-align: center;
}

.chess-login-card h1 {
  margin: 0;
  font-size: clamp(28px, 6.2vw, 38px);
  line-height: 1.1;
  font-weight: 900;
  color: #071326;
  letter-spacing: -.02em;
}

.login-subtitle {
  margin: 7px 0 20px;
  color: rgba(7,19,38,.88);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

.login-error {
  margin: 0 0 13px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(154, 18, 18, .88);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(0,0,0,.20);
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.login-icon {
  position: absolute;
  left: 18px;
  z-index: 2;
  min-width: 25px;
  text-align: center;
  font-size: 23px;
  line-height: 1;
  color: #071326;
  opacity: .92;
  pointer-events: none;
}

.lock-icon {
  font-size: 21px;
}

.login-input {
  width: 100%;
  height: 54px;
  padding: 0 54px 0 58px;
  border: 1.5px solid rgba(7,19,38,.18);
  border-radius: 15px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,.80);
  color: #071326 !important;
  -webkit-text-fill-color: #071326 !important;
  caret-color: #071326;
  font-size: 18px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 7px 16px rgba(0,0,0,.10);
}

.login-input::placeholder {
  color: rgba(7,19,38,.58);
  opacity: 1;
  font-weight: 700;
}

.login-input:focus {
  border-color: rgba(201,150,78,.84);
  background: rgba(255,255,255,.90);
  box-shadow:
    0 0 0 4px rgba(201,150,78,.18),
    0 8px 18px rgba(0,0,0,.12);
}

.password-eye {
  position: absolute;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #071326;
  font-size: 17px;
  cursor: pointer;
  opacity: .74;
}

.login-button {
  width: 100%;
  height: 56px;
  margin-top: 2px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(180deg, #ffd15d 0%, #d89619 52%, #a86604 100%);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  box-shadow:
    0 11px 22px rgba(117,74,9,.28),
    inset 0 1px 0 rgba(255,255,255,.48),
    inset 0 -2px 0 rgba(83,49,2,.25);
}

.login-button span {
  margin-right: 9px;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  color: #071326;
  font-size: 15px;
  margin: 5px 0 0;
}

.login-divider span {
  height: 1px;
  background: rgba(7,19,38,.23);
}

.login-divider b {
  font-weight: 800;
}

.login-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-size: 16px;
  font-weight: 900;
}

.login-links i {
  display: block;
  width: 1px;
  height: 21px;
  background: rgba(7,19,38,.28);
}

.login-links a {
  color: #8a5a0d;
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

/* remove legacy elements from older cached HTML/CSS combinations */
.login-card-brand,
.mini-logo,
.mini-book,
.mini-text,
.mini-title,
.login-hidden-preload,
.login-options,
.remember-line,
.create-button {
  display: none !important;
}

@media (max-width: 430px) {
  .chess-login-hero {
    padding-left: 14px;
    padding-right: 14px;
    background-position: center center;
  }

  .chess-login-card {
    width: min(88vw, 402px);
    margin-top: 205px;
    padding: 24px 18px 22px;
    border-radius: 25px;
  }

  .chess-login-card h1 {
    font-size: 30px;
  }

  .login-subtitle {
    margin-bottom: 16px;
    font-size: 14px;
  }

  .login-form {
    gap: 12px;
  }

  .login-input {
    height: 51px;
    font-size: 16px;
    border-radius: 13px;
  }

  .login-button {
    height: 52px;
    font-size: 19px;
    border-radius: 13px;
  }

  .login-links {
    font-size: 14px;
    gap: 12px;
  }
}

@media (max-width: 380px) {
  .chess-login-card {
    margin-top: 195px;
    transform: scale(.94);
    transform-origin: top center;
  }
}

@media (max-height: 720px) {
  .chess-login-card {
    margin-top: 195px;
    transform: scale(.90);
    transform-origin: top center;
  }
}

@media (max-height: 640px) {
  .chess-login-card {
    margin-top: 185px;
    transform: scale(.82);
    transform-origin: top center;
  }
}

.login-links {
  display: none !important;
}

.login-divider {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 20px 0 13px !important;
  color: rgba(7, 19, 38, 0.78) !important;
  font-weight: 900 !important;
  font-size: 16px !important;
}

.login-divider::before,
.login-divider::after {
  content: '' !important;
  height: 1px !important;
  flex: 1 !important;
  background: rgba(7, 19, 38, 0.25) !important;
}

.login-divider span,
.login-divider b {
  display: none !important;
}

.login-create-account {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  padding: 15px 14px !important;
  border-radius: 18px !important;
  text-align: center !important;
  text-decoration: none !important;
  color: #071326 !important;
  font-size: 19px !important;
  font-weight: 900 !important;
  border: 2px solid #d9a72b !important;
  background: rgba(255, 255, 255, 0.28) !important;
  box-shadow:
    0 0 18px rgba(255, 203, 38, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.login-create-account::before {
  content: '+' !important;
  display: inline-block !important;
  margin-right: 12px !important;
  color: #d59a11 !important;
  font-size: 38px !important;
  font-weight: 900 !important;
  line-height: 0 !important;
  vertical-align: -6px !important;
}

.login-create-account span {
  color: #8a5a0d !important;
}

.login-create-account:hover {
  color: #071326 !important;
  background: rgba(255, 247, 224, 0.46) !important;
  box-shadow:
    0 0 24px rgba(255, 203, 38, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

.login-forgot-password {
  display: block !important;
  margin: 17px 0 0 !important;
  text-align: center !important;
  color: #071326 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  text-decoration: underline !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45) !important;
}

@media (max-width: 430px) {
  .login-create-account {
    font-size: 16px !important;
    padding: 13px 10px !important;
    border-radius: 15px !important;
  }

  .login-forgot-password {
    margin-top: 13px !important;
    font-size: 16px !important;
  }

  .login-divider {
    margin: 17px 0 11px !important;
  }
}