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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #ffffff;
  color: #1f2937;
  line-height: 1.6;
  cursor: default;
  user-select: none;
}

input, textarea, select {
  cursor: text;
  user-select: text;
}

button, .btn, .method-card, .upload-area, .photo-upload-area, a {
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* PAGE 1 STYLES */
.page-1 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-container {
  width: 100%;
  max-width: 500px;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111827;
}

.header p {
  font-size: 1rem;
  color: #6b7280;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  ring: 2px;
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 0 0 2px #2563eb;
}

.form-group input::placeholder {
  color: #9ca3af;
}

.btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: #f97316;
  color: white;
}

.btn-primary:hover {
  background-color: #ea580c;
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #1f2937;
}

.btn-secondary:hover {
  background-color: #d1d5db;
}

/* PAGE 2 STYLES */
.page-2 {
  min-height: 100vh;
  padding: 2rem 1rem;
}

.page-2 .container {
  max-width: 800px;
}

.info-box {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
}

.info-box-icon {
  color: #2563eb;
  font-weight: bold;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.info-box-text {
  font-size: 0.875rem;
  color: #1e40af;
}

.description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.description p {
  margin-bottom: 0.5rem;
}

.form-section {
  padding-left: 0;
  margin-bottom: 2rem;
}

.form-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-grid-full {
  grid-column: 1 / -1;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 0.875rem;
  color: #6b7280;
  cursor: pointer;
  margin: 0;
}

.checkbox-group a {
  color: #2563eb;
  text-decoration: none;
}

.checkbox-group a:hover {
  text-decoration: underline;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.button-group .btn {
  flex: 1;
  padding: 0.75rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
}

.footer-links a {
  color: #6b7280;
  text-decoration: none;
}

.footer-links a:hover {
  color: #2563eb;
}

/* PAGE 3 STYLES */
  .page-3 {
    min-height: 100vh;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  @media (max-height: 700px) {
    .page-3 .container, .page-4 .container {
      padding-top: 0.5rem;
      padding-bottom: 0.5rem;
    }
    .page-3 .header, .page-4 .header {
      margin-bottom: 0.75rem;
    }
    .page-3 .header h1, .page-4 .header h1 {
      font-size: 1.375rem;
    }
    .page-3 .method-card {
      min-height: 110px;
    }
    .photo-upload-area {
      padding: 0.75rem !important;
    }
    .info-box {
      margin-bottom: 0.75rem;
      padding: 0.5rem;
    }
    .info-box-text {
      font-size: 0.75rem;
    }
  }

.method-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.method-card {
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.method-card:hover {
  border-color: #f97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
  transform: translateY(-2px);
}

.method-card.selected {
  border-color: #f97316;
  background-color: #fff7ed;
}

.method-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.method-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111827;
}

.method-card p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.method-radio {
  width: 1.5rem;
  height: 1.5rem;
  cursor: pointer;
  accent-color: #f97316;
}

/* PAGE 4 STYLES */
.page-4 {
  min-height: 100vh;
  padding: 2rem 1rem;
}

.photo-upload-container {
  position: relative;
  margin-bottom: 1.5rem;
}

.photo-input {
  display: none;
}

.photo-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f9fafb;
}

.photo-upload-area:hover {
  border-color: #f97316;
  background-color: #fff7ed;
}

.photo-upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.photo-upload-area p {
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.25rem;
}

  .photo-upload-area small {
    font-size: 0.75rem;
    color: #6b7280;
  }

  .photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .photo-section {
    margin-bottom: 0 !important;
    padding-left: 0 !important;
  }

  .photo-section h2 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .photo-upload-area {
    padding: 1rem !important;
  }

  .photo-upload-icon {
    font-size: 1.5rem !important;
    margin-bottom: 0.25rem !important;
  }

  .photo-upload-area p {
    font-size: 0.875rem !important;
  }

  .photo-preview img {
    max-height: 150px !important;
  }

.photo-preview {
  position: relative;
  margin-top: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: #f3f4f6;
}

.photo-preview img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.btn-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-remove:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

/* HIDDEN CLASS */
.hidden {
  display: none !important;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .header {
    margin-bottom: 1.5rem;
  }

  .header h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .header p {
    font-size: 0.9375rem;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-group label {
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.875rem; /* Увеличенная область нажатия */
    font-size: 16px; /* Предотвращение зума на iOS */
  }

  .btn {
    padding: 1rem;
    font-size: 1.0625rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-section {
    padding-left: 1rem;
    margin-bottom: 1.5rem;
  }

  .form-section h2 {
    font-size: 1.125rem;
  }

  .button-group {
    flex-direction: column-reverse; /* Основная кнопка сверху на мобильных */
    gap: 0.75rem;
  }

  .method-options {
    grid-template-columns: 1fr 1fr; /* Две колонки на мобильных */
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .method-card {
    padding: 1rem 0.5rem; /* Уменьшенные отступы */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
  }

  .method-card h3 {
    font-size: 0.875rem; /* Меньший шрифт заголовка */
    margin-bottom: 0.25rem;
  }

  .method-card p {
    font-size: 0.75rem; /* Меньший шрифт описания */
    margin-bottom: 0.5rem;
    line-height: 1.2;
    display: none; /* Скрываем описание на мобильных для экономии места */
  }

  .method-icon {
    font-size: 1.75rem; /* Меньшая иконка */
    margin-bottom: 0.5rem;
  }

  .method-radio {
    width: 1.125rem;
    height: 1.125rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    margin-top: 2rem;
  }

  .info-box {
    padding: 0.875rem;
    margin-bottom: 1.25rem;
  }

  .checkbox-group {
    padding: 1.25rem 0;
  }
}


/* INPUT ERROR STYLES */
.input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1), 0 0 0 2px #dc2626 !important;
  background-color: #fef2f2 !important;
}

/* CHECKBOX ERROR STYLES */
.checkbox-group.error {
  border-top: 2px solid #dc2626;
  border-bottom: 2px solid #dc2626;
  background-color: #fef2f2;
}

.checkbox-group.error input[type="checkbox"] {
  border: 2px solid #dc2626;
  accent-color: #dc2626;
}

.checkbox-group.error label {
  color: #dc2626;
  font-weight: 600;
}
