@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #3bada6;
  --secondary-color: #2c8a85;
  --accent-color: #f8d57c;
  --text-dark: #2c3e50;
  --text-light: #ffffff;
  --text-muted: #6c757d;
  --border-color: #e1e5e9;
  --bg-light: #f8f9fa;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
  background: linear-gradient(to bottom right, #fffbde, #90d1ca, #129990, #096b68);
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Signup Card */
.signup-card {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  padding: 2.5rem;
  position: relative;
  transition: all 0.3s ease;
  animation: fadeIn 0.6s ease-out;
  max-width: 500px;
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Header */
.card-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.home-link {
  position: absolute;
  top: 0;
  left: 0;
  color: #129990;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.home-link:hover {
  color: #096b68;
  transform: scale(1.1);
}

.logo-container {
  margin-bottom: 1.5rem;
}

.logo-container img {
  width: 80px;
  height: 80px;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.logo-container img:hover {
  transform: scale(1.05);
}

.signup-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.signup-subtitle {
  color: #6c757d;
  font-size: 1rem;
  margin-bottom: 0;
}

/* Form Styles */
.signup-form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: #6c757d;
  transition: color 0.3s ease;
  z-index: 2;
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #129990;
  box-shadow: 0 0 0 3px rgba(18, 153, 144, 0.1);
}

.form-control:focus + .input-icon {
  color: #129990;
}

.form-control.error {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: #129990;
}

/* Form Options */
.form-options {
  margin-bottom: 1.5rem;
}

.terms-agreement {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-check-input {
  width: 18px;
  height: 18px;
  border: 2px solid #e1e5e9;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.form-check-input:checked {
  background-color: #129990;
  border-color: #129990;
}

.form-check-label {
  color: #6c757d;
  cursor: pointer;
}

.terms-link {
  color: #129990;
  text-decoration: none;
  font-weight: 500;
}

.terms-link:hover {
  color: #096b68;
  text-decoration: underline;
}

/* Password Requirements */
.password-requirements {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #129990;
}

.requirements-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.75rem;
}

.requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requirement {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.requirement::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--error-color);
  font-weight: bold;
}

.requirement.valid {
  color: var(--success-color);
}

.requirement.valid::before {
  content: "✓";
  color: var(--success-color);
}

/* Signup Button */
.btn-signup {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(to right, #129990, #096b68);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-signup:hover {
  background: linear-gradient(to right, #096b68, #129990);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(18, 153, 144, 0.3);
}

.btn-signup:active {
  transform: translateY(0);
}

.btn-signup:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Login Link */
.login-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #6c757d;
}

.login-link a {
  color: #129990;
  text-decoration: none;
  font-weight: 500;
  margin-left: 0.25rem;
  transition: color 0.3s ease;
}

.login-link a:hover {
  color: #096b68;
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .signup-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .signup-title {
    font-size: 1.6rem;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  .password-requirements {
    padding: 0.75rem;
  }

  .requirements-title {
    font-size: 0.85rem;
  }

  .requirement {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .signup-card {
    padding: 1.5rem 1rem;
    margin: 0.5rem;
  }

  .logo-container img {
    width: 70px;
    height: 70px;
  }

  .signup-title {
    font-size: 1.2rem;
  }

  .form-control {
    padding: 0.65rem 0.65rem 0.65rem 2.25rem;
    font-size: 0.95rem;
  }

  .btn-signup {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
  }

  .terms-agreement {
    font-size: 0.85rem;
  }

  .password-requirements {
    padding: 0.5rem;
  }
}

@media (max-width: 400px) {
  .signup-card {
    padding: 1.25rem 0.75rem;
  }

  .logo-container img {
    width: 60px;
    height: 60px;
  }

  .signup-title {
    font-size: 1.2rem;
  }

  .form-control {
    padding: 0.6rem 0.6rem 0.6rem 2rem;
    font-size: 0.9rem;
  }

  .btn-signup {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* Loading Animation */
.btn-signup.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-signup.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Focus Styles for Accessibility */
.btn-signup:focus,
.form-control:focus,
.password-toggle:focus,
.home-link:focus {
  outline: 2px solid #129990;
  outline-offset: 2px;
}

.form-control:focus {
  outline: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .signup-card {
    border: 2px solid var(--text-dark);
  }

  .form-control {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Success States */
.form-control.valid {
  border-color: var(--success-color);
}

.form-control.valid:focus {
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Error Messages */
.error-message {
  color: var(--error-color);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

.success-message {
  color: var(--success-color);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

/* Strength Indicator */
.password-strength {
  height: 4px;
  background: #e1e5e9;
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-weak {
  width: 25%;
  background: var(--error-color);
}

.strength-fair {
  width: 50%;
  background: var(--warning-color);
}

.strength-good {
  width: 75%;
  background: #17a2b8;
}

.strength-strong {
  width: 100%;
  background: var(--success-color);
}
