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

:root {
  --primary-dark: #b71c1c;
  --primary-main: #e53935;
  --primary-light: #ff5252;
  --gradient-primary: linear-gradient(135deg, #b71c1c 0%, #e53935 50%, #d32f2f 100%);
  --gradient-overlay: linear-gradient(135deg, #800000 0%, #b71c1c 45%, #e53935 100%);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(183, 28, 28, 0.12);
  --shadow-btn: 0 8px 24px rgba(183, 28, 28, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #fff5f5 0%, #fcf0f0 50%, #f7e8e8 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: var(--font-body);
  min-height: 100vh;
  height: auto;
  padding: 20px 10px;
}

h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
}

h2 {
  font-family: var(--font-heading);
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-dark);
}

p {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #555555;
  margin: 15px 0 25px;
}

span {
  font-size: 13px;
  color: #666666;
  font-weight: 500;
}

a {
  color: var(--primary-dark);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  margin: 12px 0;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-main);
  text-decoration: underline;
}

#signup-btn,
#signin-btn {
  width: 60%;
  margin-top: 15px;
}

button {
  border-radius: 14px;
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  outline: none;
  padding: 12px 26px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(183, 28, 28, 0.42);
}

button:active {
  transform: translateY(0) scale(0.98);
}

button:focus {
  outline: none;
}

button.ghost {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

button.ghost:hover {
  background: #ffffff !important;
  color: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

.overlay-panel h1 {
  color: #ffffff !important;
}

.overlay-panel p {
  color: rgba(255, 255, 255, 0.9) !important;
}

form {
  background-color: rgba(255, 255, 255, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 45px;
  height: 100%;
  text-align: center;
}

.input-group {
  position: relative;
  width: 100%;
  margin: 6px 0;
}

.input-group i {
  position: absolute;
  left: 14px;
  top: 20px;
  transform: translateY(-50%);
  color: var(--primary-dark);
  font-size: 16px;
  pointer-events: none;
  z-index: 2;
  transition: color 0.2s ease;
}

.input-group .password-toggle {
  left: auto;
  right: 14px;
  top: 20px;
  cursor: pointer;
  color: #888888;
  font-size: 16px;
  pointer-events: auto;
  z-index: 3;
}

.input-group .password-toggle:hover {
  color: var(--primary-main);
}

input {
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(229, 57, 53, 0.2);
  border-radius: 12px;
  padding: 0 40px 0 42px;
  margin: 0;
  width: 100%;
  transition: all 0.25s ease;
  font-family: var(--font-body);
  font-weight: 500;
  height: 42px;
  font-size: 13.5px;
  color: #1a1a1a;
}

input[type="password"] {
  padding-right: 42px;
}

input::placeholder {
  color: #888888;
  font-weight: 400;
}

input:focus {
  background: #ffffff;
  border-color: var(--primary-main);
  box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15);
  outline: none;
  color: #1a1a1a;
}

input:focus + i,
.input-group:focus-within > i:not(.password-toggle) {
  color: var(--primary-main);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  --moz-appearance: textfield;
}

.container {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 24px;
  border: 1px solid rgba(229, 57, 53, 0.18);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  width: 780px;
  max-width: 100%;
  min-height: 620px;
}

.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
}

.sign-in-container {
  left: 0;
  width: 50%;
  z-index: 2;
}

.container.right-panel-active .sign-in-container {
  transform: translateX(100%);
}

.sign-up-container {
  left: 0;
  width: 50%;
  opacity: 0;
  z-index: 1;
}

.container.right-panel-active .sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: show 0.6s;
}

@keyframes show {
  0%,
  49.99% {
    opacity: 0;
    z-index: 1;
  }
  50%,
  100% {
    opacity: 1;
    z-index: 5;
  }
}

.overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 100;
}

.container.right-panel-active .overlay-container {
  transform: translateX(-100%);
}

.overlay {
  background: var(--gradient-overlay);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 0 0;
  color: #ffffff;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay {
  transform: translateX(50%);
}

.overlay-panel {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  text-align: center;
  top: 0;
  height: 100%;
  width: 50%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

.overlay-left {
  transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
  transform: translateX(0);
}

.overlay-right {
  right: 0;
  transform: translateX(0);
}

.container.right-panel-active .overlay-right {
  transform: translateX(20%);
}

.home-icon {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 200;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff !important;
  text-decoration: none !important;
  transition: all 0.25s ease;
  background: var(--gradient-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-family: var(--font-heading);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(183, 28, 28, 0.25);
}

.home-link i {
  font-size: 13px;
  padding: 0;
  color: #ffffff;
}

.home-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(183, 28, 28, 0.38);
}

.home-link .fa-arrow-left {
  animation: leftArrowMove 1s infinite alternate;
}

@keyframes leftArrowMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-5px);
  }
}

.errormessages {
  height: 18px;
  margin-top: 2px;
}

.error-message {
  display: none;
  text-align: start;
  color: #d32f2f;
  font-weight: 600;
  font-size: 11.5px;
  padding-left: 4px;
}

.error-message.active {
  display: block;
  animation: errorZoomIn 0.2s;
  height: 18px;
}

@keyframes errorZoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#forgot-password-container {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-radius: 24px !important;
  border: 1px solid rgba(229, 57, 53, 0.18) !important;
  box-shadow: var(--shadow-card) !important;
}

/* Responsive adjustments for screens <= 700px */
@media (max-width: 700px) {
  body {
    padding: 10px;
  }

  .container {
    width: 100%;
    max-width: 440px;
    min-height: 640px;
    border-radius: 20px;
  }

  .form-container form {
    padding: 24px 20px;
  }

  #signup-btn,
  #signin-btn {
    width: 65%;
  }

  .form-container {
    height: 82%;
  }

  .overlay-container {
    height: 18%;
    top: 82%;
  }

  .container.right-panel-active .overlay-container {
    transform: translateY(-455.55%);
  }

  .overlay-panel h1 {
    font-size: 1.3em;
  }

  .overlay-panel p {
    font-size: 11.5px;
    margin: 4px 0 10px;
  }
}

.email-loading {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50px;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  margin-top: 15px;
}

.email-loading img {
  display: block;
  max-width: 75px;
  max-height: 45px;
  object-fit: contain;
  margin: 0 auto;
}