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

:root {
  --primary: #c10230;
  --dark: #222222;
  --light: #ffffff;
  --primary-hover: #a00228;
  --gray-light: #f5f5f5;
  --gray-border: #e0e0e0;
  --error: #dc2626;
  --success: #16a34a;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--gray-light);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: var(--light);
  padding: 3rem 1rem;
  text-align: center;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  font-weight: 300;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
}

.form-card {
  background: var(--light);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  width: 100%;
  max-width: 500px;
  animation: slideUp 0.5s ease-out;
}

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

.form-card h2 {
  color: var(--dark);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.form-description {
  color: #666;
  text-align: center;
  margin-bottom: 2rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.required {
  color: var(--primary);
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--light);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(193, 2, 48, 0.1);
}

.form-group input.error {
  border-color: var(--error);
}

.form-group input.valid {
  border-color: var(--success);
}

.error-message {
  display: block;
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.25rem;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: var(--light);
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-submit:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(193, 2, 48, 0.3);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-loading {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.btn-submit.loading .btn-text {
  display: none;
}

.btn-submit.loading .btn-loading {
  display: flex;
}

.spinner {
  width: 24px;
  height: 24px;
  animation: rotate 1.5s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

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

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: var(--light);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  max-width: 400px;
  width: 100%;
  animation: scaleIn 0.3s ease-out;
}

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

.modal-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem;
}

.modal-icon.success {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.modal-icon.error {
  background: rgba(193, 2, 48, 0.1);
  color: var(--primary);
}

.modal-icon svg {
  width: 40px;
  height: 40px;
}

.modal h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.modal p {
  color: #666;
  margin-bottom: 1.5rem;
}

.btn-modal {
  padding: 0.75rem 2rem;
  background: var(--primary);
  color: var(--light);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-modal:hover {
  background: var(--primary-hover);
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--light);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
  .header {
    padding: 2rem 1rem;
  }

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

  .subtitle {
    font-size: 1rem;
  }

  .form-card {
    padding: 1.5rem;
  }

  .form-card h2 {
    font-size: 1.5rem;
  }
}
