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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background-color: rgb(255, 179, 64, 0.3);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Design Toggle Switch */
.design-toggle-container {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 1000;
}

.design-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.design-toggle:hover {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.design-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  width: 50px;
  height: 26px;
  background: linear-gradient(135deg, #febd58 0%, #ffb340 100%);
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"]:checked + .toggle-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(24px);
}

.toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.toggle-label-left {
  order: 1;
}

.toggle-slider {
  order: 2;
}

.toggle-label-right {
  order: 3;
}

input[type="checkbox"]:not(:checked) ~ .toggle-label-left {
  color: #ff6b35;
}

input[type="checkbox"]:checked ~ .toggle-label-right {
  color: #667eea;
}

/* Modern Design Styles */
body.modern-design {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Particles for modern design */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.modern-design .particles-container {
  opacity: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(
    circle,
    rgba(102, 126, 234, 0.8),
    rgba(118, 75, 162, 0.3)
  );
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(50px) scale(1.5);
    opacity: 0;
  }
}

.login-container {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  width: 100%;
  max-width: 1000px;
  min-height: 600px;
  display: flex;
  animation: slideUp 0.8s ease-out;
  position: relative;
  z-index: 10;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.modern-design .login-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section {
  flex: 1;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 450px;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.modern-design .form-section {
  background: rgba(0, 0, 0, 0.2);
}

.image-section {
  flex: 1;
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  border-radius: 16px;
  margin: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.modern-design .image-section {
  background: transparent;
  margin: 0;
  border-radius: 0;
}

.placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #ffe066 0%,
    #ff6b35 25%,
    #f7931e 50%,
    #8b4513 75%,
    #228b22 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  text-align: center;
  border-radius: 16px;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.modern-design .placeholder-image {
  background: transparent;
  border-radius: 0;
  opacity: 0;
  pointer-events: none;
}

body.modern-design .placeholder-image img {
  display: none;
}

.modern-gradient-overlay {
  display: none;
}

/* Waves Container (image section) */
.waves-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  border-radius: 16px;
  overflow: hidden;
}

body.modern-design .waves-container {
  opacity: 1;
  pointer-events: auto;
}

.waves-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Interactive Spotlight */
.spotlight {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(150, 160, 255, 0.15) 30%,
    rgba(118, 75, 162, 0.08) 60%,
    transparent 80%
  );
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
  mix-blend-mode: screen;
  filter: blur(10px);
}

@keyframes gradientMove {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.welcome-title {
  font-size: 32px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.modern-design .welcome-title {
  color: #ffffff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from {
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
  }
  to {
    filter: drop-shadow(0 0 20px rgba(118, 75, 162, 0.8));
  }
}

.wave-emoji {
  animation: wave 2s ease-in-out infinite;
  transition: opacity 0.5s ease;
}

body.modern-design .wave-emoji {
  display: none;
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(20deg);
  }
  75% {
    transform: rotate(-10deg);
  }
}

.subtitle {
  color: #6b7280;
  margin-bottom: 40px;
  font-size: 16px;
  transition: color 0.8s ease;
}

body.modern-design .subtitle {
  color: rgba(255, 255, 255, 0.7);
}

/* Coming Soon Notice for Modern Design */
.coming-soon-overlay {
  display: none;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.15) 0%,
    rgba(118, 75, 162, 0.15) 100%
  );
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: center;
}

body.modern-design .coming-soon-overlay {
  display: block;
}

body.modern-design .form-section {
  position: relative;
}

body.modern-design form {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(30%);
}

body.modern-design .divider,
body.modern-design .signup-link {
  opacity: 0.4;
  pointer-events: none;
}

.coming-soon-icon {
  font-size: 24px;
  margin-right: 10px;
  display: inline;
}

.coming-soon-title {
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  display: inline;
}

.coming-soon-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 8px 0 0 0;
}

.coming-soon-subtext {
  display: none;
}

.form-group {
  margin-bottom: 20px;
}

.form-input {
  width: 100%;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f9fafb;
  color: #1a1a1a;
}

body.modern-design .form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

body.modern-design .form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

body.modern-design .form-input:focus {
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 4px rgba(102, 126, 234, 0.2),
    0 0 30px rgba(102, 126, 234, 0.3);
}

.form-input::placeholder {
  color: #9ca3af;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 34px;
}

.form-options {
  margin-bottom: 6px;
}
.toggle-password {
  position: absolute;
  right: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: 0.2s;
}

.toggle-password:hover {
  opacity: 1;
}

body.modern-design .toggle-password {
  filter: grayscale(100%) brightness(2);
}

.login-button {
  width: 100%;
  background: linear-gradient(135deg, #febd58 0%, #ffb340 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

body.modern-design .login-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

body.modern-design .login-button:hover {
  box-shadow: 0 15px 50px rgba(102, 126, 234, 0.6);
  transform: translateY(-3px);
}

.login-button:active {
  transform: translateY(0);
}

.login-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: left 0.5s;
}

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

.divider {
  text-align: center;
  margin: 30px 0;
  position: relative;
  color: #9ca3af;
  font-size: 14px;
}

body.modern-design .divider {
  color: rgba(255, 255, 255, 0.5);
}

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

body.modern-design .divider::before {
  background: rgba(255, 255, 255, 0.1);
}

.divider span {
  background: white;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

body.modern-design .divider span {
  background: transparent;
}

.signup-link-inline {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

body.modern-design .signup-link-inline {
  color: #667eea;
}

.signup-link-inline:hover {
  text-decoration: underline;
}

.signup-link {
  text-align: center;
  margin-top: 30px;
  color: #6b7280;
  font-size: 14px;
  transition: color 0.8s ease;
}

body.modern-design .signup-link {
  color: rgba(255, 255, 255, 0.7);
}

.signup-link a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

body.modern-design .signup-link a {
  color: #667eea;
  text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.signup-link a:hover {
  text-decoration: underline;
}

/* Loading animation for button */
.login-button.loading {
  background: #9ca3af;
  cursor: not-allowed;
}

.login-button.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
  }

  .design-toggle-container {
    top: 20px;
    right: 20px;
  }

  .design-toggle {
    padding: 6px 12px;
  }

  .toggle-label {
    font-size: 11px;
  }

  .toggle-slider {
    width: 40px;
    height: 22px;
  }

  .toggle-slider::before {
    width: 16px;
    height: 16px;
  }

  input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(18px);
  }

  .login-container {
    flex-direction: column;
    max-width: 400px;
    min-height: auto;
  }

  .form-section {
    padding: 40px 30px;
    order: 1;
  }

  .image-section {
    display: none;
  }

  .welcome-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .design-toggle-container {
    top: 15px;
    right: 15px;
  }

  .form-section {
    padding: 30px 20px;
  }

  .welcome-title {
    font-size: 24px;
  }
}

/* Desktop downscale to match profession list (0.9) */
@media (min-width: 993px) {
  .login-container {
    transform: scale(0.82);
    transform-origin: center center;
    animation: none;
  }
}

/* ── Social login buttons ─────────────────────────────────────────────────── */
.social-login {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 8px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.social-btn--google:hover {
  border-color: #4285f4;
  color: #4285f4;
}
.social-btn--facebook {
  color: #1877f2;
}
.social-btn--facebook:hover {
  border-color: #1877f2;
  background: #f0f4ff;
}
.social-btn--github {
  color: #24292e;
}
.social-btn--github:hover {
  border-color: #24292e;
  background: #f6f8fa;
}
.social-btn--apple {
  background: #000;
  color: #fff;
  border-color: #000;
}
.social-btn--apple:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
/* Modern design overrides */
body.modern-design .social-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
}

body.modern-design .social-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
}

body.modern-design .social-btn--google:hover {
  border-color: #4285f4;
}
body.modern-design .social-btn--facebook:hover {
  border-color: #1877f2;
}
body.modern-design .social-btn--github:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

body.modern-design .social-btn--apple {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  border-color: rgba(255, 255, 255, 0.9);
}
body.modern-design .social-btn--apple:hover {
  background: #fff;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* Auth alert styles */
.auth-alert {
  position: fixed;
  top: 100px;
  right: 30px;
  background: rgba(239, 68, 68, 0.95);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.3);
  z-index: 2000;
  animation: slideInRight 0.5s ease-out;
  backdrop-filter: blur(10px);
  max-width: 400px;
}

body.modern-design .auth-alert {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  backdrop-filter: blur(20px);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.auth-alert p {
  margin: 8px 0;
  font-size: 14px;
  font-weight: 500;
}
