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

:root {
  --primary: #6c2bd9;
  --primary-dark: #5219a8;
  --primary-light: #8b5cf6;
  --primary-glow: rgba(108, 43, 217, 0.5);
  --accent: #ec4899;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --dark-surface: #1a1f35;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --white: #ffffff;
  --gray-100: #f8fafc;
  --gray-200: #e2e8f0;
  --error: #ef4444;
  --success: #10b981;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-light: rgba(255, 255, 255, 0.25);
  --shadow-glow-lg: 0 8px 40px var(--primary-glow);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--dark);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background */
.bg-effects {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.bg-effects::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(108, 43, 217, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 45%),
    radial-gradient(ellipse at 40% 80%, rgba(167, 139, 250, 0.25) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 50%, rgba(192, 132, 252, 0.2) 0%, transparent 40%);
  animation: gradient-shift 15s ease-in-out infinite;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: blob-move 20s ease-in-out infinite;
}
.blob-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(167, 139, 250, 0.35));
  top: -15%;
  right: -10%;
}
.blob-2 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.4), rgba(139, 92, 246, 0.3));
  bottom: -10%;
  left: -5%;
  animation-delay: -7s;
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
@keyframes blob-move {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(30px, 10px) scale(1.02);
  }
}
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px var(--primary-glow);
  }
  50% {
    box-shadow: 0 0 40px var(--primary-glow);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.login-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1000px;
  animation: slideUp 0.6s var(--ease-out-expo) both;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  animation: scaleIn 0.5s var(--ease-out-expo) 0.1s both;
}

.login-left {
  padding: 2.5rem 3rem;
  background: var(--white);
  position: relative;
}

.login-left::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--gray-200), transparent);
  pointer-events: none;
}

.login-right {
  padding: 2.5rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-right::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  top: -100px;
  right: -100px;
  animation: pulse-glow 6s ease-in-out infinite;
}

.login-right::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -50px;
  left: -50px;
  animation: pulse-glow 6s ease-in-out infinite reverse;
}

.logo-container {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-container img {
  height: 90px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 8px rgba(108, 43, 217, 0.2));
  transition: transform var(--duration-normal) var(--ease-spring);
}

.logo-container img:hover {
  transform: scale(1.05);
}

.logo-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.logo-subtitle {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.login-form {
  margin-top: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.125rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: 0.9375rem;
  border: 2px solid var(--gray-200);
  border-radius: 14px;
  background: var(--gray-100);
  color: var(--text);
  transition: all var(--duration-normal) var(--ease-smooth);
  font-family: "Inter", sans-serif;
  caret-color: var(--primary);
  cursor: text;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(108, 43, 217, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.125rem;
  padding: 0.25rem;
  transition: all var(--duration-fast) ease;
}

.password-toggle:hover {
  color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.forgot-password {
  text-align: right;
  margin-top: 0.5rem;
}

.forgot-password a {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--duration-fast) ease;
}

.forgot-password a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-spring);
  margin-top: 1.5rem;
  box-shadow: var(--shadow-glow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.submit-btn::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;
}

.submit-btn:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 40px var(--primary-glow);
}

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

.submit-btn:active {
  transform: translateY(-1px);
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gray-200), transparent);
}

.divider::before {
  margin-right: 1rem;
}

.divider::after {
  margin-left: 1rem;
}

/* Google Sign-In Button */
.social-login {
  margin-top: 0.5rem;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.google-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-200);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

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

.google-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.google-btn svg {
  width: 20px;
  height: 20px;
}

.google-btn .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Right Panel */
.info-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.info-content h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-content p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  transition: all var(--duration-fast) ease;
}

.feature-item:hover {
  transform: translateX(5px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(108, 43, 217, 0.3);
}

.feature-icon i {
  font-size: 1rem;
  color: var(--white);
}

.signup-link {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-light);
}

.signup-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--duration-fast) ease;
}

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

.back-home {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 10;
  animation: slideUp 0.5s var(--ease-out-expo) 0.3s both;
}

.back-home a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid var(--glass-border-light);
  transition: all var(--duration-normal) var(--ease-spring);
}

.back-home a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.alert {
  padding: 0.875rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.alert.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert.show {
  display: flex;
  animation: slideIn 0.3s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .login-card {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .login-left {
    padding: 2.5rem 2rem;
  }

  .login-left::after {
    display: none;
  }

  .login-right {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 5rem;
  }

  .login-card {
    border-radius: 24px;
  }

  .login-left {
    padding: 2rem 1.5rem;
  }

  .logo-container {
    margin-bottom: 1.5rem;
  }

  .logo-container img {
    height: 45px;
  }

  .logo-title {
    font-size: 1.375rem;
  }

  .back-home {
    top: 1rem;
    left: 1rem;
  }

  .back-home a {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .submit-btn {
    padding: 0.875rem;
  }
}

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

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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