@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&display=swap');

*, *::after, *::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  font-family: 'Montserrat', sans-serif;
}

:root {
  --neu-1: #ecf0f3;
  --neu-2: #d1d9e6;
  --white: #f9f9f9;
  --gray: #a0a5a8;
  --black: #181818;
  --purple: #4B70E2;
  --transition: 1.25s;
}

body {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--neu-1);
  color: var(--gray);
  font-size: 12px;
}

/* ── Lang switcher (fixed top-right) ── */
#langSwitcher {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 9999;
}

/* ── Main card ── */
.main {
  position: relative;
  width: 1000px;
  min-width: 1000px;
  min-height: 600px;
  height: 600px;
  padding: 25px;
  background-color: var(--neu-1);
  box-shadow:
    10px 10px 10px var(--neu-2),
    -10px -10px 10px var(--white);
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 1200px) { .main { transform: scale(.85); } }

/* ── Mobile layout ── */
@media (max-width: 760px) {
  body {
    align-items: stretch;
    padding: 0;
  }

  .main {
    width: 100%;
    min-width: unset;
    height: auto;
    min-height: 100dvh;
    border-radius: 0;
    padding: 0;
    transform: none !important;
    box-shadow: none;
    position: relative;
    display: block;
  }

  /* Hide sliding panel entirely */
  .switch { display: none !important; }

  /* Reset both containers to normal flow */
  .container {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100dvh;
    padding: 60px 28px 48px;
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
    z-index: auto !important;
    display: flex;
  }

  /* Sign-in hidden by default on mobile, sign-up shown */
  .b-container { display: none !important; }
  .b-container.mobile-active { display: flex !important; }
  .a-container.mobile-hidden { display: none !important; }

  .form_title { font-size: 26px; line-height: 1.5; margin-bottom: 12px; }

  .form__google,
  .form__divider,
  .form__input { width: 100%; max-width: 300px; }

  .button { width: 200px; margin-top: 20px; }

  /* Mobile switch link */
  .mobile-switch {
    display: block !important;
    margin-top: 20px;
    font-size: 12px;
    color: var(--gray);
    text-align: center;
  }

  .mobile-switch a {
    color: var(--purple);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
  }
}

.mobile-switch { display: none; }

/* ── Form containers ── */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  width: 600px;
  height: 100%;
  padding: 25px;
  background-color: var(--neu-1);
  transition: var(--transition);
}

.a-container {
  z-index: 100;
  left: calc(100% - 600px);
}

.b-container {
  left: calc(100% - 600px);
  z-index: 0;
}

/* ── Form ── */
.form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.form_title {
  font-size: 34px;
  font-weight: 700;
  line-height: 2.4;
  color: var(--black);
}

.form__span {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--gray);
}

.form__input {
  width: 350px;
  height: 40px;
  margin: 4px 0;
  padding-left: 25px;
  font-size: 13px;
  letter-spacing: .15px;
  border: none;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  background-color: var(--neu-1);
  color: var(--black);
  transition: .25s ease;
  border-radius: 8px;
  box-shadow:
    inset 2px 2px 4px var(--neu-2),
    inset -2px -2px 4px var(--white);
}

.form__input:focus {
  box-shadow:
    inset 4px 4px 4px var(--neu-2),
    inset -4px -4px 4px var(--white);
}

.form__input::placeholder { color: var(--gray); }

.form__link {
  color: var(--black);
  font-size: 13px;
  margin-top: 20px;
  border-bottom: 1px solid var(--gray);
  line-height: 2;
  text-decoration: none;
}

/* ── Google button ── */
.form__google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 280px;
  height: 40px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  background-color: var(--neu-1);
  box-shadow:
    4px 4px 8px var(--neu-2),
    -4px -4px 8px var(--white);
  transition: .2s;
}

.form__google:hover {
  box-shadow:
    2px 2px 5px var(--neu-2),
    -2px -2px 5px var(--white);
}

.form__google svg { flex-shrink: 0; }

/* ── Divider ── */
.form__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 350px;
  margin: 8px 0 4px;
  color: var(--gray);
  font-size: 11px;
}

.form__divider::before,
.form__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--neu-2);
}

/* ── Buttons ── */
.button {
  width: 180px;
  height: 50px;
  border-radius: 25px;
  margin-top: 30px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.15px;
  background-color: var(--purple);
  color: var(--white);
  box-shadow:
    8px 8px 16px var(--neu-2),
    -8px -8px 16px var(--white);
  border: none;
  outline: none;
  cursor: pointer;
  transition: .25s;
}

.button:hover {
  box-shadow:
    6px 6px 10px var(--neu-2),
    -6px -6px 10px var(--white);
  transform: scale(.985);
}

.button:active {
  box-shadow:
    2px 2px 6px var(--neu-2),
    -2px -2px 6px var(--white);
  transform: scale(.97);
}

/* ── Code block ── */
#codeBlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ── Messages ── */
#su_msg, #si_msg {
  margin-top: 8px;
  font-size: 12px;
  min-height: 16px;
  text-align: center;
}

/* ── Switch panel ── */
.switch {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 400px;
  padding: 50px;
  z-index: 200;
  transition: var(--transition);
  background-color: var(--neu-1);
  overflow: hidden;
  box-shadow:
    4px 4px 10px var(--neu-2),
    -4px -4px 10px var(--white);
}

.switch__circle {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background-color: var(--neu-1);
  box-shadow:
    inset 8px 8px 12px var(--neu-2),
    inset -8px -8px 12px var(--white);
  bottom: -60%;
  left: -60%;
  transition: var(--transition);
}

.switch__circle--t {
  top: -30%;
  left: 60%;
  width: 300px;
  height: 300px;
  bottom: auto;
}

.switch__container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: absolute;
  width: 400px;
  padding: 50px 55px;
  text-align: center;
  transition: var(--transition);
}

.switch__title {
  font-size: 30px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  margin-bottom: 12px;
}

.switch__description {
  font-size: 13px;
  letter-spacing: .25px;
  text-align: center;
  line-height: 1.6;
}

.switch__button {
  cursor: pointer;
  margin-top: 40px;
}

/* ── Animation classes ── */
.is-txr {
  left: calc(100% - 400px);
  transition: var(--transition);
}

.is-txl {
  left: 0;
  transition: var(--transition);
}

.is-z200 {
  z-index: 200;
  transition: var(--transition);
}

.is-hidden {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  transition: var(--transition);
}

.is-gx {
  animation: is-gx var(--transition);
}

@keyframes is-gx {
  0%, 10%, 100% { width: 400px; }
  30%, 50%      { width: 500px; }
}
