/* Animated Characters Login Page Styles - Based on React Component */

:root {
  --primary: #6C3FF5;
  --primary-foreground: #ffffff;
  --background: #ffffff;
  --foreground: #000000;
  --muted-foreground: #666666;
  --border: #e5e5e5;
  --accent: #f5f5f5;
  --red-400: #f87171;
  --red-950: #450a0a;
  --red-900: #7f1d1d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
}

.page-container {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .page-container {
    grid-template-columns: 1fr 1fr;
  }
}

/* Left Section */
.left-section {
  position: relative;
  background: linear-gradient(to bottom right, rgba(108, 63, 245, 0.9), var(--primary), rgba(108, 63, 245, 0.8));
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--primary-foreground);
  overflow: hidden;
}

.left-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20px 80px, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.left-section::after {
  content: '';
  position: absolute;
  top: 25%;
  right: 25%;
  width: 256px;
  height: 256px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  filter: blur(96px);
}

.left-section .bottom-blur {
  position: absolute;
  bottom: 25%;
  left: 25%;
  width: 384px;
  height: 384px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  filter: blur(96px);
}

.brand {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.brand-icon {
  width: 2rem;
  height: 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sparkles-icon {
  width: 1rem;
  height: 1rem;
}

/* Characters Container */
.characters-container {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: end;
  justify-content: center;
  height: 500px;
}

.characters {
  position: relative;
  width: 550px;
  height: 400px;
}

/* Character States */
.character {
  position: absolute;
  bottom: 0;
  border-radius: 10px 10px 0 0;
  transition: all 0.7s ease-in-out;
  transform-origin: bottom center;
}

/* Mouse tracking lean */
.character.mouse-lean {
  transition: transform 0.3s ease-out;
}

/* Typing animation - exaggerated lean */
.character.typing {
  transform: skewX(-15deg) scale(1.05) !important;
  transition: transform 0.5s ease-out;
}

/* Password visible - turn away */
.character.password-visible {
  transform: rotateY(45deg) scale(0.95);
  transition: transform 0.8s ease-out;
}

/* Error state - sad expression */
.character.error {
  animation: shake-head 2s ease-in-out;
}

@keyframes shake-head {
  0%, 100% { transform: rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(-5deg); }
  20%, 40%, 60%, 80% { transform: rotate(5deg); }
}

/* Eye expressions for error state */
.character.error .eye {
  animation: sad-blink 2s ease-in-out;
}

@keyframes sad-blink {
  0%, 100% { height: 18px; }
  25%, 75% { height: 2px; }
}

/* Character specific styles */
.purple-character {
  left: 70px;
  width: 180px;
  height: 400px;
  background-color: #6C3FF5;
}

.black-character {
  left: 240px;
  width: 120px;
  height: 310px;
  background-color: #2D2D2D;
}

.orange-character {
  left: 0px;
  width: 240px;
  height: 200px;
  background-color: #FF9B6B;
  border-radius: 120px 120px 0 0;
}

.yellow-character {
  left: 310px;
  width: 140px;
  height: 230px;
  background-color: #E8D754;
  border-radius: 70px 70px 0 0;
}

/* Eyes */
.eyes {
  position: absolute;
  display: flex;
  gap: 8px;
  transition: all 0.7s ease-in-out;
}

.eye {
  width: 18px;
  height: 18px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pupil {
  width: 7px;
  height: 7px;
  background-color: #2D2D2D;
  border-radius: 50%;
  transition: transform 0.1s ease-out;
}

/* Yellow mouth */
.yellow-mouth {
  position: absolute;
  width: 80px;
  height: 4px;
  background-color: #2D2D2D;
  border-radius: 2px;
}

/* Footer Links */
.footer-links {
  position: relative;
  z-index: 20;
  display: flex;
  gap: 2rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-links a {
  color: var(--primary-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-foreground);
}

/* Right Section */
.right-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--background);
}

.form-container {
  width: 100%;
  max-width: 420px;
}

/* Mobile Brand */
.mobile-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 3rem;
}

.mobile-brand-icon {
  width: 2rem;
  height: 2rem;
  background: rgba(108, 63, 245, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-sparkles-icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

/* Header */
.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.form-subtitle {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.input-field {
  height: 3rem;
  padding: 0 0.75rem;
  background: var(--background);
  border: 1px solid rgba(229, 229, 229, 0.6);
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  border-color: var(--primary);
  outline: none;
}

.password-group {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--foreground);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-input {
  width: auto;
}

.checkbox-label {
  font-size: 0.875rem;
  font-weight: normal;
  cursor: pointer;
}

.forgot-link {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.remember-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.submit-btn {
  width: 100%;
  height: 3rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background: rgba(108, 63, 245, 0.9);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error-message {
  padding: 0.75rem;
  font-size: 0.875rem;
  color: var(--red-400);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(127, 29, 29, 0.3);
  border-radius: 0.375rem;
}

.social-login {
  margin-top: 1.5rem;
}

.social-btn {
  width: 100%;
  height: 3rem;
  background: var(--background);
  border: 1px solid rgba(229, 229, 229, 0.6);
  border-radius: 0.375rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.social-btn:hover {
  background: var(--accent);
}

.signup-link {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 2rem;
}

.signup-link a {
  color: var(--foreground);
  font-weight: 500;
  text-decoration: none;
}

.signup-link a:hover {
  text-decoration: underline;
}

/* Mobile Styles */
@media (max-width: 1023px) {
  .left-section {
    display: none;
  }

  .mobile-brand {
    display: flex;
  }
}

/* Animations */
@keyframes blink {
  0%, 100% { height: 18px; }
  50% { height: 2px; }
}

.blink {
  animation: blink 0.15s ease-in-out;
}

/* Responsive */
@media (max-width: 640px) {
  .right-section {
    padding: 1rem;
  }

  .form-container {
    max-width: 100%;
  }

  .form-title {
    font-size: 1.5rem;
  }
}