.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.auth-container {
  background: white;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  padding: 25px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  position: relative;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.auth-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.auth-form input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

.auth-form button {
  width: 100%;
  padding: 12px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.auth-form button:hover {
  background: #4338ca;
}

.small-text {
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  margin-top: 10px;
}

#authStatus {
  margin-top: 15px;
  text-align: center;
  color: #e53e3e;
}


/* Добавляем стили для табов */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

/* Анимация переключения форм */
.auth-form {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.auth-form.active {
  display: block;
}

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

/* Парольная сложность */
.password-strength {
  height: 4px;
  background: #eee;
  margin-bottom: 15px;
  border-radius: 2px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  background: #e53e3e;
  transition: width 0.3s, background 0.3s;
}

.auth-links {
  margin-top: 15px;
  text-align: center;
}

#forgotPassword {
  color: #4f46e5;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

#forgotPassword:hover {
  color: #4338ca;
  text-decoration: underline;
}

/* Стили для модального окна восстановления */
.password-recovery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.password-recovery-container {
  background: white;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  padding: 25px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  position: relative;
}

.password-recovery-container h3 {
  margin-top: 0;
  text-align: center;
}

.password-recovery-container button {
  width: 100%;
  padding: 12px;
  margin-top: 15px;
}

.auth-form {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.auth-form.active {
  display: block;
}

.auth-form h3 {
  text-align: center;
  color: #4f46e5;
  margin-bottom: 10px;
}

.auth-form p {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
}

.auth-status {
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 14px;
    animation: fadeIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-status.success {
    background-color: #f0fdf4;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.auth-status.error {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Анимация */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}