/* Duolingo-inspired login */

.login-screen {
  min-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  background: #f7f7f7;
}

.login-panel {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.login-hero {
  margin-bottom: 1.5rem;
}

/* Speech bubble → mascot (row); tail points at mascot on the right */
.login-hero-mascot-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
}

.login-hero-mascot-slot {
  flex: 0 0 auto;
  line-height: 0;
}

.login-hero-mascot-slot .mascot {
  margin-bottom: 0;
}

.login-speech-bubble {
  position: relative;
  flex: 0 1 auto;
  background: linear-gradient(168deg, #ffffff 0%, #f0fdf4 45%, #ffffff 100%);
  border: 2px solid rgba(88, 204, 2, 0.38);
  border-radius: 1.75rem 1.35rem 1.65rem 1.45rem;
  padding: 1rem 1.25rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 10px rgba(88, 204, 2, 0.14),
    0 12px 32px rgba(28, 25, 23, 0.07);
  max-width: 13.5rem;
  text-align: center;
  transform: rotate(-1.15deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.45, 0.64, 1), box-shadow 0.35s ease;
}

.login-speech-bubble:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 4px 16px rgba(88, 204, 2, 0.2),
    0 16px 40px rgba(28, 25, 23, 0.09);
}

/* Tail points right toward mascot (border + fill) */
.login-speech-bubble::before {
  content: "";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 11px 0 11px 14px;
  border-color: transparent transparent transparent rgba(88, 204, 2, 0.38);
  z-index: 0;
}

.login-speech-bubble::after {
  content: "";
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 9px 0 9px 12px;
  border-color: transparent transparent transparent #f4fdf7;
  z-index: 1;
}

.login-speech-bubble__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.login-hero__icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #58cc02 0%, #46a302 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
  box-shadow: 0 8px 0 #3d8f02;
}

/* Title now lives in .login-speech-bubble__title; keep class for any legacy hooks */
.login-page__title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.login-page__subtitle {
  margin: 0.75rem auto 0;
  max-width: 320px;
  font-size: 1rem;
  line-height: 1.5;
  color: #58cc71;
  font-weight: 500;
  text-align: center;
}

.login-form {
  margin-top: 1.75rem;
}

.login-form__group {
  margin-bottom: 0.95rem;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"],
.login-form__input {
  width: 100%;
  height: 54px;
  padding: 0 1rem;
  border: 2px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  color: #3c3c3c;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}

.login-form input::placeholder,
.login-form__input::placeholder {
  color: #9ca3af;
  font-weight: 600;
}

.login-form input:focus,
.login-form__input:focus {
  outline: none;
  border-color: #84d8ff;
  background: #fff;
}

.password-field {
  position: relative;
}

.password-field .login-form__input,
.password-field input[type="password"],
.password-field input[type="text"] {
  padding-right: 3.25rem;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #8b8b8b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle-btn:hover {
  background: #f3f4f6;
  color: #555;
}

.login-form__errors {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border: 2px solid #ffd4d4;
  border-radius: 16px;
  background: #fff1f1;
  color: #c53030;
  text-align: left;
  font-size: 0.92rem;
}

.login-form__errors p {
  margin: 0;
}

.login-form__inline-error {
  margin: 0.45rem 0 0;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 700;
  color: #d14343;
}

.login-form__submit {
  width: 100%;
  height: 54px;
  margin-top: 0.5rem;
  border: none;
  border-radius: 16px;
  background: #58cc02;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 5px 0 #ffd001;
  cursor: pointer;
  transition: transform 0.05s ease, filter 0.15s ease, box-shadow 0.05s ease;
}

.login-form__submit:hover {
  filter: brightness(1.02);
}

.login-form__submit:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #46a302;
}

.login-links {
  margin-top: 1.4rem;
}

.login-links__primary {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1cb0f6;
  text-decoration: none;
  margin-bottom: 1rem;
}

.login-links__primary:hover {
  text-decoration: underline;
}

.login-links__secondary {
  margin: 0;
  font-size: 0.95rem;
  color: #777;
}

.login-links__secondary a {
  color: #1cb0f6;
  font-weight: 700;
  text-decoration: none;
}

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

@media (max-width: 480px) {
  .login-screen {
    align-items: flex-start;
    padding-top: 1.5rem;
  }

  .login-hero__icon {
    width: 84px;
    height: 84px;
    font-size: 2.1rem;
  }

  .login-page__title {
    font-size: 1.75rem;
  }

  .login-hero-mascot-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .login-speech-bubble {
    transform: none;
  }

  .login-speech-bubble:hover {
    transform: scale(1.02);
  }

  /* Tail points down at mascot */
  .login-speech-bubble::before {
    right: auto;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-width: 13px 11px 0 11px;
    border-color: rgba(88, 204, 2, 0.38) transparent transparent transparent;
  }

  .login-speech-bubble::after {
    right: auto;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: -2px;
    border-width: 11px 9px 0 9px;
    border-color: #f4fdf7 transparent transparent transparent;
  }

  .login-speech-bubble__title {
    font-size: 0.98rem;
  }
}

.login-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}