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

:root {
  --primary: #663399;
  --primary-900: #4d2673;
  --outline: rgba(0, 0, 0, 0.12);
  --label: rgba(0, 0, 0, 0.6);
  --input: rgba(0, 0, 0, 0.87);
  --panel: #f5f5f5;
  --banner-bg: #ffeab3;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #000;
  background: #fff;
}

a {
  color: var(--primary);
  text-decoration: none;
}

h1,
p {
  margin: 0;
}

/* Downtime banner */
.downtime-banner {
  position: sticky;
  top: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--banner-bg);
  font-size: 16px;
  line-height: 24px;
  color: #000;
}

.downtime-banner svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  fill: #ca8a04;
}

/* Page grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 100vh;
  background: var(--panel);
}

.left {
  background: #fff;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  display: flex;
  justify-content: space-between;
  padding: 24px 32px;
}

.header img {
  display: block;
  width: 96px;
}

.header .hint {
  font-size: 14px;
  font-weight: 300;
}

.header .hint a {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.form-wrap {
  width: 100%;
  max-width: 512px;
  margin: auto;
  padding: 0 16px;
}

.screen-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screen-center .form-wrap {
  padding-bottom: 80px;
}

h1 {
  text-align: center;
  font-size: 36px;
  line-height: 40px;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtitle {
  text-align: center;
  font-size: 14px;
  margin-bottom: 32px;
}

.subtitle.mb-5 {
  margin-bottom: 20px;
}

/* Google button (GSI "large / outline / rectangular" look) */
.google-wrap {
  height: 48px;
  padding-top: 8px;
}

.google-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 400px;
  max-width: 100%;
  height: 40px;
  margin: 0 auto;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.25px;
  color: #3c4043;
  cursor: pointer;
  transition: background-color 0.218s, border-color 0.218s;
}

.google-btn:hover {
  background: rgba(66, 133, 244, 0.04);
  border-color: #d2e3fc;
}

.google-btn svg {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
}

/* OR divider */
.or-line {
  position: relative;
  margin: 16px 0;
  text-align: center;
  font-weight: 600;
}

.or-line::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  border-bottom: 1px solid #ddd;
}

.or-line.mb-1 {
  margin-bottom: 4px;
}

.or-line span {
  position: relative;
  display: inline-block;
  width: 56px;
  background: #fff;
}

/* Material outlined form field */
.mf {
  height: 66px;
}

.mf-box {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  cursor: text;
}

.mf-box.has-prefix {
  padding-left: 0;
}

.mf-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--outline);
  border-radius: 8px;
  pointer-events: none;
  transition: border-color 0.15s;
}

.mf-box:hover::before {
  border-color: var(--input);
}

.mf-box:focus-within::before {
  border: 2px solid var(--primary);
}

.mf-prefix {
  padding-right: 4px;
  white-space: pre;
  font-size: 14px;
  color: #000;
}

.mf-box input {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  line-height: 24px;
  color: var(--input);
  caret-color: var(--primary);
}

.mf-box input::placeholder {
  color: transparent;
}

.mf-box label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
  padding: 0;
  font-size: 14px;
  line-height: normal;
  color: var(--label);
  white-space: nowrap;
  pointer-events: none;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s, top 0.15s;
}

.mf-box.has-prefix label {
  left: 33px;
}

.mf-box label.required::after {
  content: '*';
}

.mf-box input:focus + label,
.mf-box input:not(:placeholder-shown) + label {
  top: 0;
  left: 12px;
  padding: 0 4px;
  background: #fff;
  transform: translateY(-50%) scale(0.75);
}

.mf-box input:focus + label {
  color: var(--primary);
}

.mf-hint {
  position: relative;
  height: 18px;
}

.mf-hint span {
  position: absolute;
  right: 4px;
  top: -4px;
  font-size: 10.5px;
  line-height: 12px;
  padding-top: 4px;
  color: var(--label);
}

/* Links and buttons */
.text-right {
  text-align: right;
}

.forgot-link {
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  cursor: pointer;
  outline: none;
  text-decoration: none;
}

.btn span {
  display: inline-block;
  padding: 12px 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-900);
}

.btn-basic {
  color: #000;
}

.btn-basic:hover {
  background: #eee;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-5 {
  margin-top: 20px;
}

.mt-6 {
  margin-top: 24px;
}

.mb-4 {
  margin-bottom: 16px;
}

.recaptcha-note {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: #767676;
}

/* Material checkbox */
.mcb {
  display: flex;
  align-items: center;
  height: 40px;
  cursor: pointer;
  color: var(--input);
}

.mcb-touch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
}

.mcb-touch:hover {
  background: rgba(0, 0, 0, 0.04);
}

.mcb input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid rgba(0, 0, 0, 0.54);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 90ms, border-color 90ms;
}

.mcb input:checked {
  border-color: var(--primary);
  background: var(--primary)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.12' d='M1.73 12.91l6.37 6.37L22.79 4.59'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

.mcb-label {
  padding-left: 4px;
  font-size: 14px;
  line-height: 20px;
}

/* Support launcher */
.support-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147483647;
  width: 60px;
  height: 60px;
  padding: 16px;
  border: 0;
  border-radius: 9999px;
  background: var(--primary);
  cursor: pointer;
}

/* Login right panel */
.right-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 80px;
  overflow: hidden;
}

.welcome {
  width: 100%;
  text-align: center;
}

.welcome svg {
  display: block;
  width: 100%;
  max-width: 448px;
  margin: 0 auto;
}

.welcome .caption {
  margin: 12px 0 24px;
  font-size: 14px;
}

.welcome .tag {
  font-size: 24px;
  line-height: 32px;
  font-weight: 800;
}

.fade-in-bottom {
  animation: fadeInBottom 0.4s ease-out both;
}

@keyframes fadeInBottom {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Register right panel (onboarding animation) */
.right-register {
  text-align: center;
}

.ob {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 24px;
  overflow: hidden;
}

.anime-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: auto;
}

.anime-canvas {
  position: relative;
  padding-top: 100%;
}

.anime-layer {
  position: absolute;
  inset: 0;
}

.anime-layer.stars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.anime-layer.stars svg {
  width: 100%;
  max-width: 100%;
}

.a-item-block {
  position: absolute;
  left: 1%;
  top: 1%;
  width: 98%;
  height: 98%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.a-item-block svg {
  display: block;
  width: 100%;
  max-width: 512px;
  margin: 0 auto;
}

#ufo-bubbles > * {
  opacity: 0;
}

#ob-ufo-msg-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 320px;
  margin: -24px auto 0;
}

.ob-an-desc {
  margin-top: 20px;
  font-size: 14px;
}

.ob-an-title {
  margin-top: 8px;
  font-size: 30px;
  line-height: 36px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .grid {
    display: block;
  }

  .right-login,
  .right-register,
  .header {
    display: none;
  }

  .downtime-banner {
    font-size: 14px;
    line-height: 20px;
    padding: 12px 16px;
  }

  .page {
    min-height: auto;
  }

  .form-wrap {
    padding-top: 32px;
  }

  .screen-center {
    min-height: auto;
  }
}
