/* Modern Registration Form Styles - Sky Blue & Orange Theme */
#application-form {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 41, 59, 0.9);
  z-index: 1000;
  overflow-y: auto;
  padding: 40px 0;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

#application-form .form-container {
  background: white;
  border-radius: 20px;
  max-width: 900px;
  width: 90%;
  margin: 0 auto;
  padding: 40px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(14, 165, 233, 0.1);
}

#application-form.hidden .form-container {
  transform: translateY(50px);
}

#close-application {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(226, 232, 240, 0.3);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--dark);
}

#close-application:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: rotate(90deg);
}

.form-title {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--dark);
  text-align: center;
  font-weight: 800;
  background: linear-gradient(135deg, #0ea5e9 0%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-subtitle {
  text-align: center;
  color: var(--gray);
  margin-bottom: 40px;
  font-size: 16px;
  line-height: 1.5;
}

/* Registration Form Styling */
.registration-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.form-section-title {
  grid-column: 1 / -1;
  font-size: 20px;
  color: var(--dark);
  margin-bottom: 10px;
  margin-top: 20px;
  font-weight: 700;
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}

.form-section-title::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e2e8f0 50%, transparent 100%);
}

.form-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e2e8f0 50%, transparent 100%);
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  transition: all 0.2s ease;
}

.form-label .required {
  color: #ef4444;
  margin-left: 4px;
  font-weight: 700;
}

.form-input, .form-select {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s ease;
  color: var(--dark);
  font-family: inherit;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
  transform: translateY(-1px);
}

.form-input:hover, .form-select:hover {
  border-color: var(--primary-light);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 16px;
  padding-right: 50px;
  cursor: pointer;
}

.form-select:focus {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230ea5e9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Password Field with Strength Indicator */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 5px;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: var(--primary);
  background: rgba(14, 165, 233, 0.1);
}

.password-strength {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.strength-bars {
  display: flex;
  gap: 6px;
  flex: 1;
  max-width: 120px;
}

.strength-bar {
  height: 4px;
  background-color: #e2e8f0;
  border-radius: 2px;
  flex: 1;
  transition: all 0.3s ease;
}

.strength-bar.active {
  background-color: var(--primary);
}

.strength-bar.weak {
  background-color: #ef4444;
}

.strength-bar.medium {
  background-color: #f59e0b;
}

.strength-bar.strong {
  background-color: #10b981;
}

.strength-text {
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Enhanced Input States */
.form-group.error .form-input,
.form-group.error .form-select {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.form-group.error .form-label {
  color: #ef4444;
}

.form-group.success .form-input,
.form-group.success .form-select {
  border-color: #10b981;
  background-color: #f0fdf4;
}

.error-message {
  margin-top: 6px;
  font-size: 12px;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 5px;
}

.success-message {
  margin-top: 6px;
  font-size: 12px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Submit Button */
.form-button {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 18px 40px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.form-button:active {
  transform: translateY(0);
}

.form-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.form-button:hover::before {
  left: 100%;
}

/* Loading State */
.form-button.loading {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: transparent;
  cursor: not-allowed;
}

.form-button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Login Link */
.login-text {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 25px;
  font-size: 15px;
  color: var(--gray);
}

.login-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.login-link:hover {
  color: var(--primary-dark);
}

.login-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.login-link:hover::after {
  width: 100%;
}

/* Floating Labels Animation */
.float-label {
  position: relative;
}

.float-label .form-input,
.float-label .form-select {
  height: 60px;
  padding-top: 24px;
  padding-bottom: 8px;
}

.float-label .form-label {
  position: absolute;
  top: 0;
  left: 20px;
  height: 100%;
  display: flex;
  align-items: center;
  cursor: text;
  transition: all 0.2s ease;
  transform-origin: 0 0;
  pointer-events: none;
}

.float-label .form-input:focus ~ .form-label,
.float-label .form-input:not(:placeholder-shown) ~ .form-label,
.float-label .form-select:focus ~ .form-label,
.float-label .form-select:not([value=""]):valid ~ .form-label {
  transform: translateY(-12px) scale(0.8);
  color: var(--primary);
  font-weight: 600;
}

/* Success Response */
.submission-response {
  text-align: center;
  padding: 40px 20px;
  display: none;
}

.submission-response.show {
  display: block;
}

.success-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  font-size: 40px;
  margin: 0 auto 25px;
  border: 3px solid rgba(16, 185, 129, 0.2);
}

.success-icon svg {
  width: 50px;
  height: 50px;
  stroke-width: 3;
}

.response-title {
  font-size: 28px;
  color: var(--dark);
  margin-bottom: 15px;
  font-weight: 700;
}

.response-message {
  color: var(--gray);
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.6;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.return-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  font-weight: 600;
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.return-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

/* Input Focus Effects */
.form-group {
  position: relative;
}

.form-group::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 1px;
}

.form-group:focus-within::before {
  width: 100%;
}

/* Checkbox and Radio Styles */
.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"],
.form-radio input[type="radio"] {
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.form-radio input[type="radio"] {
  border-radius: 50%;
}

.form-checkbox input[type="checkbox"]:checked,
.form-radio input[type="radio"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.form-checkbox input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.form-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

/* File Upload Styles */
.file-upload {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-upload input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--gray);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 80px;
  text-align: center;
}

.file-upload:hover .file-upload-label {
  border-color: var(--primary);
  background: rgba(14, 165, 233, 0.05);
  color: var(--primary);
}

.file-upload.has-file .file-upload-label {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
  color: #10b981;
}

/* Responsive Design */
@media (max-width: 768px) {
  #application-form .form-container {
    padding: 30px 20px;
    margin: 20px;
    width: calc(100% - 40px);
  }
  
  .registration-form {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .form-title {
    font-size: 28px;
  }
  
  .form-section-title {
    font-size: 18px;
    margin-top: 15px;
  }
  
  .form-input, .form-select {
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .form-button {
    padding: 16px 32px;
    font-size: 15px;
  }
  
  .hero-stats {
    gap: 30px;
  }
  
  .stat-number {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  #application-form {
    padding: 20px 0;
  }
  
  #application-form .form-container {
    margin: 0;
    width: 100%;
    border-radius: 0;
    min-height: 100vh;
  }
  
  .form-title {
    font-size: 24px;
  }
  
  .form-subtitle {
    font-size: 14px;
  }
  
  #close-application {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  #application-form .form-container {
    background: #1e293b;
    color: white;
    border-color: rgba(14, 165, 233, 0.2);
  }
  
  .form-title {
    color: white;
  }
  
  .form-subtitle,
  .form-label,
  .login-text {
    color: #cbd5e1;
  }
  
  .form-input,
  .form-select {
    background-color: #334155;
    border-color: #475569;
    color: white;
  }
  
  .form-input:focus,
  .form-select:focus {
    background-color: #475569;
    border-color: var(--primary);
  }
}