/* Professional Connect Page Styles */

/* CSS Variables */
:root {
  --primary: #7367f0;
  --primary-dark: #5e50ee;
  --secondary: #28c76f;
  --text-primary: #e8e8ef;
  --text-secondary: #9aa5ce;
  --bg-primary: #161622;
  --bg-secondary: #1a1a28;
  --border-color: rgba(255, 255, 255, 0.08);
}

/* Ensure body text color matches homepage */
body {
  color: var(--text-primary);
}

/* Connect Container */
.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: 3rem 1rem;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(115, 103, 240, 0.1), transparent),
    #161622;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(115, 103, 240, 0.15) 0%, transparent 70%);
  top: -300px;
  right: -100px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.login-container::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(40, 199, 111, 0.12) 0%, transparent 70%);
  bottom: -250px;
  left: -100px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

/* Brand Logo */
.brand-logo {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInDown 0.6s ease;
  margin-bottom: 2rem;
  flex-shrink: 0;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  background: rgba(26, 26, 40, 0.9);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-width: 460px;
  width: 100%;
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease 0.1s both;
  flex-shrink: 0;
}

.login-card-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 2.5rem 3rem;
}

/* Login Header */
.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.login-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Login Steps */
.login-step {
  display: none;
}

.login-step.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

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

/* User Welcome Section */
.user-welcome {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.75rem 1.5rem;
  background: rgba(115, 103, 240, 0.06);
  border-radius: 12px;
  border: 1.5px solid rgba(115, 103, 240, 0.15);
}

.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.welcome-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.welcome-email {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

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

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.625rem;
  display: block;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 0.9375rem 1.125rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: rgba(22, 22, 34, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.25s ease;
}

.form-input::placeholder {
  color: rgba(154, 165, 206, 0.5);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(115, 103, 240, 0.12);
  background: rgba(22, 22, 34, 0.9);
}

.form-input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.12);
}

.form-input.error {
  border-color: #ea5455;
}

.form-input.success {
  border-color: #28c76f;
}

.form-helper {
  font-size: 0.8125rem;
  margin-top: 0.5rem;
  display: block;
  line-height: 1.4;
}

.form-helper.error {
  color: #ea5455;
}

.form-helper.success {
  color: #28c76f;
}

.form-helper.info {
  color: var(--text-secondary);
}

/* OTP Input */
.otp-input-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: nowrap;
  max-width: 100%;
}

.otp-digit {
  width: 35px;
  height: 50px;
  font-size: 1.375rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  background: rgba(22, 22, 34, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.25s ease;
  text-transform: uppercase;
  flex-shrink: 0;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(115, 103, 240, 0.12);
  background: rgba(22, 22, 34, 0.9);
  transform: scale(1.05);
}

.otp-digit:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.12);
}

.otp-digit.filled {
  border-color: var(--primary);
  background: rgba(115, 103, 240, 0.12);
}

.otp-digit.error {
  border-color: #ea5455;
  animation: shake 0.4s ease;
}

.otp-digit.verifying {
  border-color: #00cfe8;
  background: rgba(0, 207, 232, 0.1);
  animation: pulse-border 1.5s ease-in-out infinite;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

@keyframes pulse-border {
  0%, 100% {
    border-color: #00cfe8;
    box-shadow: 0 0 0 0 rgba(0, 207, 232, 0.4);
  }
  50% {
    border-color: #1ce7ff;
    box-shadow: 0 0 0 4px rgba(0, 207, 232, 0.2);
  }
}

.ti-spin {
  animation: spin 1s linear infinite;
}

/* Buttons */
.btn-login {
  width: 100%;
  padding: 0.875rem 2.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.btn-login i {
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
}

.btn-primary-login {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(115, 103, 240, 0.3);
}

.btn-primary-login::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: left 0.5s ease;
  z-index: 1;
}

.btn-primary-login:hover::before {
  left: 100%;
}

.btn-primary-login:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(115, 103, 240, 0.4);
  color: white;
}

.btn-primary-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary-login {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.btn-secondary-login:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  color: white;
}

/* Button Text */
.btn-text {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Loading Spinner */
.btn-loading {
  position: relative;
}

.btn-loading .btn-text {
  opacity: 0;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Info Box */
.info-box {
  padding: 1.125rem 1.25rem;
  background: rgba(0, 207, 232, 0.06);
  border: 1.5px solid rgba(0, 207, 232, 0.15);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.info-box-icon {
  flex-shrink: 0;
  color: #00cfe8;
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.info-box-content {
  flex: 1;
}

.info-box-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.375rem;
}

.info-box-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Success Box */
.success-box {
  padding: 1.125rem 1.25rem;
  background: rgba(40, 199, 111, 0.06);
  border: 1.5px solid rgba(40, 199, 111, 0.2);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.success-box i {
  color: #28c76f;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.success-box-text {
  font-size: 0.9375rem;
  color: #ffffff;
  margin: 0;
  line-height: 1.5;
}

/* Error Box */
.error-box {
  padding: 1.125rem 1.25rem;
  background: rgba(234, 84, 85, 0.06);
  border: 1.5px solid rgba(234, 84, 85, 0.2);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.error-box i {
  color: #ea5455;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.error-box-text {
  font-size: 0.9375rem;
  color: #ffffff;
  margin: 0;
  line-height: 1.5;
}

/* Resend OTP */
.resend-otp {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.resend-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resend-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.resend-link.disabled {
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.5;
}

.resend-timer {
  font-weight: 600;
  color: var(--primary);
}

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  transition: all 0.25s ease;
  cursor: pointer;
  font-weight: 500;
}

.back-button:hover {
  color: var(--primary);
  gap: 0.75rem;
}

.back-button i {
  font-size: 1.125rem;
}

/* Username Check */
.username-check {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  display: none;
}

.username-check.checking {
  display: block;
  color: var(--bs-secondary);
  animation: spin 1s linear infinite;
}

.username-check.available {
  display: block;
  color: #28c76f;
}

.username-check.taken {
  display: block;
  color: #ea5455;
}

/* Input Container */
.input-container {
  position: relative;
}

/* Terms and Conditions Checkbox */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 0.5rem;
}

.terms-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.1875rem;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.terms-checkbox label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.6;
  margin: 0;
}

.terms-checkbox label a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
}

.terms-checkbox label a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Footer Links */
.login-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1.5px solid rgba(255, 255, 255, 0.06);
}

.login-footer-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.login-footer-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
}

.login-footer-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 576px) {
  .login-container {
    padding: 2rem 1rem;
    min-height: 100vh;
  }

  .brand-logo {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .login-card {
    max-width: 100%;
  }

  .login-card-content {
    padding: 2rem 1.5rem 2.5rem;
  }

  .login-title {
    font-size: 1.625rem;
  }

  .login-subtitle {
    font-size: 0.875rem;
  }

  .otp-input-container {
    gap: 0.25rem;
    margin: 1.5rem 0;
  }

  .otp-digit {
    width: 32px;
    height: 46px;
    font-size: 1.2rem;
  }

  .btn-login {
    padding: 0.875rem 2rem;
  }
}

