/* Глобальные стили и сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html, body {
    height: 100%;
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #f0f0f0;
    padding: 20px;
  }
  
  /* Контейнер формы */
  .login-container {
    max-width: 420px;
    width: 100%;
  }
  
  .login-form {
    background: rgba(22, 33, 62, 0.6);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
  }
  
  h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #e94560;
  }
  
  /* Переключатель режимов */
  .form-toggle {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
  }
  
  .form-toggle button {
    flex: 1;
    padding: 12px;
    border: none;
    background-color: transparent;
    color: #f0f0f0;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .form-toggle button:hover {
    background-color: rgba(233, 69, 96, 0.2);
  }
  
  .form-toggle button.active {
    background-color: #e94560;
    color: #fff;
    font-weight: 600;
  }
  
  /* Поля ввода */
  .input-group {
    margin-bottom: 20px;
  }
  
  input[type="email"],
  input[type="password"] {
    width: 100%;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid #4a4a5e;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }
  
  input[type="email"]::placeholder,
  input[type="password"]::placeholder {
    color: #a0a0b8;
  }
  
  input[type="email"]:focus,
  input[type="password"]:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.3);
  }
  
  /* Основная кнопка */
  #submitBtn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: #0f3460;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  #submitBtn:hover {
    background-color: #1a4a8a;
    transform: translateY(-2px);
  }
  
  #submitBtn:active {
    transform: translateY(0);
  }
  
  #submitBtn:disabled {
    background-color: #3a3a4a;
    cursor: not-allowed;
  }
  
  
  /* Область сообщений */
  #message-area {
    min-height: 24px;
    line-height: 24px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 400;
    color: #ff6b6b; /* Цвет для ошибок по умолчанию */
  }
  
  #message-area.success {
    color: #7bed9f; /* Цвет для успешных сообщений */
  }
  
  
  /* Футер */
  .page-footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
  }

  /* Spinner Styles for Loading Indicator */
#submitBtn {
  position: relative; /* Needed for spinner positioning */
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  width: 24px;
  height: 24px;
  animation: spin 1s ease-in-out infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -12px;
  margin-left: -12px;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}