/* Основные стили для регистрационной формы */
:root {
  --bg-dark: #2A2A2A;
  --bg-darker: #1E1E1E;
  --bg-light: #3D3D3D;
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0B0;
  --accent-primary: #7B62FE;
  --accent-secondary: #9D8BFF;
  --accent-tertiary: #6C5CE7;
  --error-color: #FF4D4D;
  --success-color: #00E676;
  --warning-color: #FFC107;
  --border-radius-small: 8px;
  --border-radius-medium: 16px;
  --border-radius-large: 24px;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --accent-glow: 0 0 15px rgba(123, 98, 254, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.auth-logo {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo img {
    max-width: 180px;
    height: auto;
}
body {
  font-family: 'Rajdhani', 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(123, 98, 254, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(123, 98, 254, 0.1) 0%, transparent 30%);
  background-attachment: fixed;
}

.auth-container {
  background-color: transparent;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background-color: rgba(61, 61, 61, 0.8);
  border-radius: var(--border-radius-large);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), var(--accent-glow);
  width: 100%;
  max-width: 800px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(123, 98, 254, 0.3);
  transition: var(--transition-medium);
  backdrop-filter: blur(10px);
}

.auth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 25px rgba(123, 98, 254, 0.7);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-header h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(123, 98, 254, 0.3);
  animation: textGlow 3s ease-in-out infinite alternate;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  animation: fadeInUp 1s ease 0.2s forwards;
  opacity: 0;
}

@keyframes textGlow {
  from { text-shadow: 0 0 10px rgba(123, 98, 254, 0.3); }
  to { text-shadow: 0 0 20px rgba(123, 98, 254, 0.7); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Индикатор шагов */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin: 0 auto 3rem;
  position: relative;
  max-width: 100%;
  padding: 0 1rem;
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary) 0%, rgba(123, 98, 254, 0.1) 100%);
  border-radius: 2px;
  z-index: 2;
}

.progress-bar {
  position: absolute;
  top: 50%;
  left: 10%;
  height: 4px;
  background: var(--accent-primary);
  transform: translateY(-50%);
  z-index: 2;
  transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(123, 98, 254, 0.5);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 3;
  width: 100%;
  cursor: pointer;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-darker);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 0.8rem;
  transition: var(--transition-medium);
  border: 2px solid var(--bg-darker);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
}

.step:hover .step-number {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(123, 98, 254, 0.3);
}

.step.active .step-number {
  background: var(--bg-light);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(123, 98, 254, 0.3), 0 0 15px rgba(123, 98, 254, 0.3);
}

.step.completed .step-number {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(123, 98, 254, 0.5);
}

.step.completed .step-number::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1.2rem;
}

.step-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  position: absolute;
  bottom: -2rem;
  white-space: nowrap;
  transition: var(--transition-medium);
  background: rgba(61, 61, 61, 0.8);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(123, 98, 254, 0.1);
}

.step.active .step-title,
.step.completed .step-title {
  color: var(--accent-primary);
  font-weight: 600;
  background: rgba(123, 98, 254, 0.2);
  border-color: rgba(123, 98, 254, 0.3);
}

/* Контент шагов */
.step-content {
  display: none;
  animation: slideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.step-content.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Форма */
.auth-form {
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1.8rem;
  transition: var(--transition-fast);
}

.form-group:hover {
  transform: translateY(-2px);
}

.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 1rem 1.2rem;
  background: var(--bg-darker);
  border: 1px solid rgba(123, 98, 254, 0.3);
  border-radius: var(--border-radius-medium);
  font-size: 1rem;
  transition: var(--transition-fast);
  color: var(--text-primary);
  backdrop-filter: blur(5px);
}

.form-group input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(123, 98, 254, 0.3);
  outline: none;
}

.required {
  color: var(--error-color);
}

/* Загрузка аватара */
.avatar-upload {
  text-align: center;
  margin: 2rem 0;
}

.avatar-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background: var(--bg-darker);
  color: var(--text-primary);
  border-radius: var(--border-radius-medium);
  cursor: pointer;
  transition: var(--transition-medium);
  border: 1px dashed rgba(123, 98, 254, 0.5);
  margin-bottom: 1rem;
  font-weight: 600;
}

.avatar-upload-label:hover {
  background: rgba(123, 98, 254, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(123, 98, 254, 0.3);
  border-color: var(--accent-primary);
}

.avatar-upload-label i {
  margin-right: 0.5rem;
  color: var(--accent-primary);
  font-size: 1.2rem;
}

#avatar {
  display: none;
}

.avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-primary);
  margin: 1.5rem auto;
  display: none;
  box-shadow: 0 5px 25px rgba(123, 98, 254, 0.4);
  transition: var(--transition-medium);
}

.avatar-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(123, 98, 254, 0.6);
}

.avatar-filename {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Карточка подтверждения */
.summary-card {
  background: rgba(123, 98, 254, 0.1);
  border-radius: var(--border-radius-medium);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(123, 98, 254, 0.2);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.5s ease;
  backdrop-filter: blur(5px);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.summary-card h4 {
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.3rem;
  text-shadow: 0 0 10px rgba(123, 98, 254, 0.3);
}

.summary-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px dashed rgba(123, 98, 254, 0.2);
}

.summary-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.summary-label {
  font-weight: 600;
  color: var(--accent-primary);
  width: 140px;
  flex-shrink: 0;
}

.summary-value {
  color: var(--text-primary);
  word-break: break-word;
}

.summary-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-primary);
  box-shadow: 0 5px 25px rgba(123, 98, 254, 0.4);
  margin: 0 auto;
  display: block;
}

/* Чекбокс */
.checkbox-container {
  display: block;
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  user-select: none;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.checkbox-container:hover {
  color: var(--text-primary);
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 1.5rem;
  width: 1.5rem;
  background-color: var(--bg-darker);
  border-radius: var(--border-radius-small);
  transition: var(--transition-fast);
  border: 1px solid rgba(123, 98, 254, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(123, 98, 254, 0.1);
  border-color: var(--accent-primary);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(123, 98, 254, 0.5);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 0.5rem;
  top: 0.25rem;
  width: 0.4rem;
  height: 0.8rem;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Кнопки навигации */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  gap: 1rem;
}

.btn-prev,
.btn-next,
.btn-submit {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 120px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-prev {
  background: var(--bg-darker);
  color: var(--text-primary);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(123, 98, 254, 0.3);
}

.btn-prev:hover {
  background: rgba(123, 98, 254, 0.2);
  color: #8883a3;
  transform: translateX(-5px);
  box-shadow: 0 0 15px rgba(123, 98, 254, 0.3);
  border-color: var(--accent-primary);
}

.btn-next,
.btn-submit {
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: var(--accent-glow);
}

.btn-next:hover,
.btn-submit:hover {
  background: linear-gradient(45deg, var(--accent-secondary), var(--accent-tertiary));
  transform: translateX(5px);
  box-shadow: 0 0 25px rgba(123, 98, 254, 0.9);
}

.btn-submit {
  display: none;
}

.btn-submit:hover {
  transform: translateY(-3px);
}

/* Сообщения об ошибках */
.error-message {
  color: var(--error-color);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: block;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.has-error input {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.2);
}

.validation-errors {
  background-color: rgba(255, 77, 77, 0.1);
  border-left: 4px solid var(--error-color);
  padding: 1.2rem;
  margin-bottom: 1.8rem;
  border-radius: var(--border-radius-small);
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(5px);
}

.validation-errors h4 {
  color: var(--error-color);
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.validation-errors ul {
  margin: 0;
  padding-left: 1.5rem;
}

.validation-errors li {
  margin-bottom: 0.5rem;
  color: var(--error-color);
  font-size: 0.95rem;
}

/* Футер формы */
.auth-footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
  position: relative;
}

.auth-footer a:hover {
  color: var(--accent-secondary);
  text-decoration: none;
}

.auth-footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transition: var(--transition-fast);
  transform-origin: right;
}

.auth-footer a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Анимация загрузки */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .auth-card {
    padding: 1.8rem;
  }
  
  .auth-header h2 {
    font-size: 2rem;
  }
  
  .step-title {
    font-size: 0.75rem;
    bottom: -1.8rem;
    padding: 0.2rem 0.5rem;
  }
  
  .step-number {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .btn-prev,
  .btn-next,
  .btn-submit {
    padding: 0.9rem 1.5rem;
    font-size: 0.9rem;
    min-width: auto;
  }
  
  .summary-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 1rem;
  }
  
  .auth-card {
    padding: 1.5rem;
  }
  
  .step-indicator {
    margin-bottom: 2.5rem;
  }
  
  .step-title {
    display: none;
  }
  
  .navigation-buttons {
    flex-direction: column;
  }
  
  .btn-prev,
  .btn-next,
  .btn-submit {
    width: 100%;
  }
  
  .summary-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .summary-label {
    width: auto;
  }
}