/* Celestial AI Login Page Styles */

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

:root {
  --primary-color: #1E3A8A;
  --primary-light: #3B82F6;
  --accent-color: #FFD700;
  --accent-light: #FDE047;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --bg-light: #F9FAFB;
  --bg-white: #FFFFFF;
  --border-color: #E5E7EB;
  --success-color: #10B981;
  --error-color: #EF4444;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
  color: var(--text-primary);
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1200px;
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: slideIn 0.5s ease-out;
}

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

/* Branding Section */
.branding-section {
  background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
  color: white;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.logo-container {
  margin-bottom: 30px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.logo {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.branding-section h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 40px;
  font-weight: 300;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  opacity: 0.95;
  transition: transform 0.3s ease;
}

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

.feature-icon {
  font-size: 20px;
}

/* Form Section */
.form-section {
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-container {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.form-container h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: var(--bg-white);
  color: var(--text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  user-select: none;
}

.remember-me input[type='checkbox'] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary-light);
}

.forgot-password {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.btn-login {
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  margin-top: 10px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

.error-message {
  padding: 12px 14px;
  background-color: #FEE2E2;
  color: var(--error-color);
  border: 1px solid #FECACA;
  border-radius: 8px;
  font-size: 14px;
  animation: slideDown 0.3s ease-out;
}

.success-message {
  padding: 12px 14px;
  background-color: #DCFCE7;
  color: var(--success-color);
  border: 1px solid #BBFBDC;
  border-radius: 8px;
  font-size: 14px;
  animation: slideDown 0.3s ease-out;
}

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

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-footer a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.form-footer a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Loading state */
.btn-login.loading {
  position: relative;
  color: transparent;
}

.btn-login.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.6s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .login-wrapper {
    grid-template-columns: 1fr;
  }

  .branding-section {
    padding: 40px 30px;
    min-height: 300px;
  }

  .branding-section h1 {
    font-size: 28px;
  }

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

  .logo {
    width: 80px;
    height: 80px;
  }

  .features {
    gap: 10px;
  }

  .feature-item {
    font-size: 13px;
  }
}

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

  .login-wrapper {
    border-radius: 8px;
  }

  .branding-section {
    padding: 30px 20px;
    min-height: 250px;
  }

  .branding-section h1 {
    font-size: 24px;
  }

  .tagline {
    font-size: 14px;
  }

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

  .form-container h2 {
    font-size: 24px;
  }

  .form-group input {
    padding: 10px 12px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .btn-login {
    padding: 11px 14px;
    font-size: 14px;
  }
}
