/* Reset and base styles */
html{
  font-size: 16px !important;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #f9fafb;
}

/* Main layout */
main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Illustration section */
.illustration {
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.illustration img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

/* Go back button */
.goBackBtn {
  align-self: flex-start;
  margin-bottom: 2rem;
  background: none;
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
}

.goBackBtn:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

/* Title content */
.title-content {
  margin-bottom: 2rem;
  text-align: center;
}

.title-content h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.title-content p {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.5;
}

/* Form styles */
.form-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.item label {
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

.item input {
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: white;
}

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

.item input::placeholder {
  color: #9ca3af;
}

/* Checkbox styles for terms agreement */
.checkbox-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #374151;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background-color: #2563eb;
  border-color: #2563eb;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label input[type="checkbox"]:focus + .checkmark {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-label a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

.checkbox-label a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Error messages */
.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

/* Forgot password link */
.forgot-link {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.875rem;
  align-self: flex-end;
  margin-top: 0.25rem;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Buttons */
.main-btn {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.main-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.main-btn:active {
  transform: translateY(0);
}

.main-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-btn {
  background-color: white;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.secondary-btn:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

/* Transit item */
.transit-item {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.transit-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e5e7eb;
  z-index: 1;
}

.transit-item p {
  background-color: #f9fafb;
  padding: 0 1rem;
  color: #6b7280;
  font-size: 0.875rem;
  position: relative;
  z-index: 2;
  display: inline-block;
}

/* Signup link */
.signup-link {
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

.signup-link a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.signup-link a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Footer */
footer {
  background-color: white;
  border-top: 1px solid #e5e7eb;
  padding: 1rem;
  text-align: center;
}

footer p {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Password toggle button */
.password-toggle {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 16px !important;
  color: #6b7280 !important;
  padding: 4px !important;
  z-index: 10 !important;
}

.password-toggle:hover {
  color: #374151 !important;
}

/* Responsive design */
@media (min-width: 768px) {
  .main-section {
    flex-direction: row;
    min-height: calc(100vh - 60px);
    flex-direction: row-reverse;
    
  }

  .illustration {
    display: flex;
    flex: 1;
  }

  .main-content {
    flex: 1;
    padding: 3rem;
    justify-content: center;
  }

  .title-content h1 {
    font-size: 2.25rem;
  }

  .title-content p {
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  .main-content {
    padding: 4rem;
    max-width: 500px;
  }
}

/* Loading state */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading .main-btn::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success state */
.success input {
  border-color: #10b981;
  background-color: #f0fdf4;
}

/* Error state */
.error input {
  border-color: #dc2626;
  background-color: #fef2f2;
}

/* Focus enhancements */
.item {
  transition: transform 0.2s ease;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .main-btn {
    border: 2px solid #000;
  }

  .secondary-btn {
    border: 2px solid #000;
  }

  .item input {
    border: 2px solid #000;
  }
}
