/* Login Page Styles - Refactored & Elegant */
:root {
  /* Colors */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --primary-dark: #5a67d8;
  --success-color: #10b981;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --error-color: #dc2626;
  --white: #ffffff;
  --white-80: rgba(255, 255, 255, 0.8);
  --white-95: rgba(255, 255, 255, 0.95);
  --white-08: rgba(255, 255, 255, 0.08);
  --white-12: rgba(255, 255, 255, 0.12);
  --white-15: rgba(255, 255, 255, 0.15);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Typography */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.4s ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 10px 30px rgba(0, 0, 0, 0.2);
  
  /* Border radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
}

/* Base Layout */
.guest-main {
  min-height: 100vh;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.login-container {
  width: 100%;
  height: 100vh;
  display: flex;
  animation: fadeInUp 0.6s ease-out;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes dataFlow {
  0% { opacity: 0; transform: scaleX(0); }
  50% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(0); }
}

/* Form Container */
.login-form-container {
  width: 500px;
  background: var(--white-95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--white-15);
  padding: var(--space-3xl);
  order: 1;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-header {
  text-align: left;
  margin-bottom: var(--space-2xl);
}

.form-title {
  font-size: 2.5rem;
  font-weight: var(--font-light);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.025em;
}

.form-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
  font-weight: var(--font-light);
}

/* Form Elements */
.form-group {
  margin-bottom: var(--space-xl);
}

.form-label {
  display: block;
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  font-size: var(--space-md);
  letter-spacing: 0.025em;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: var(--space-md);
  color: var(--text-muted);
  z-index: 10;
  font-size: 1.1rem;
}

.form-input {
  width: 100%;
  padding: var(--space-md) var(--space-md) var(--space-md) 3rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--space-md);
  transition: var(--transition-normal);
  background: var(--white-80);
  backdrop-filter: blur(10px);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--white-95);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.form-input.is-invalid {
  border-color: var(--error-color);
}

.password-toggle {
  position: absolute;
  right: var(--space-md);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-xs);
  font-size: 0.875rem;
}

.password-toggle:hover {
  color: var(--text-secondary);
}

.error-message {
  color: var(--error-color);
  font-size: 0.75rem;
  margin-top: var(--space-xs);
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: var(--space-xs);
  margin-right: var(--space-sm);
  position: relative;
  transition: var(--transition-fast);
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 0.625rem;
  font-weight: var(--font-semibold);
}

.forgot-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

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

/* Buttons */
.submit-btn {
  width: 100%;
  background: var(--primary-gradient);
  color: var(--white);
  border: none;
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.025em;
}

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

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  display: none;
  margin-left: var(--space-sm);
}

/* Divider */
.divider {
  text-align: center;
  margin: var(--space-lg) 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.divider span {
  background: var(--white);
  padding: 0 var(--space-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Passkey Section */
.passkey-login {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.passkey-btn {
  width: 100%;
  background: var(--white);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.passkey-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.passkey-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.passkey-hint {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: var(--space-sm);
}

/* Alternative Actions */
.alternative-actions {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.register-prompt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.register-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: var(--font-semibold);
  transition: var(--transition-fast);
}

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

/* Trust Indicators */
.trust-indicators {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: var(--space-sm);
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  flex: 1;
}

.trust-icon {
  color: var(--success-color);
  font-size: var(--space-md);
  margin-bottom: var(--space-xs);
}

.trust-item span {
  font-size: 0.625rem;
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  line-height: 1.2;
}

/* Network Animation */
.network-section {
  flex: 1;
  position: relative;
  background: var(--primary-gradient);
  overflow: hidden;
  order: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.network-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.network-grid {
  position: relative;
  width: 100%;
  height: 100%;
}

.node {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--white-80);
  border-radius: 50%;
  animation: pulse 4s infinite;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.node-1 { top: 20%; left: 15%; animation-delay: 0s; }
.node-2 { top: 30%; left: 45%; animation-delay: 0.5s; }
.node-3 { top: 60%; left: 25%; animation-delay: 1s; }
.node-4 { top: 70%; left: 55%; animation-delay: 1.5s; }
.node-5 { top: 40%; left: 75%; animation-delay: 2s; }
.node-6 { top: 15%; left: 65%; animation-delay: 2.5s; }
.node-7 { top: 80%; left: 35%; animation-delay: 0.3s; }
.node-8 { top: 25%; left: 85%; animation-delay: 0.8s; }
.node-9 { top: 85%; left: 70%; animation-delay: 1.3s; }
.node-10 { top: 10%; left: 35%; animation-delay: 1.8s; }
.node-11 { top: 50%; left: 10%; animation-delay: 2.3s; }
.node-12 { top: 90%; left: 85%; animation-delay: 0.7s; }

.connection-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--white-80), transparent);
  animation: dataFlow 6s infinite;
}

.line-1 { top: 25%; left: 20%; width: 30%; animation-delay: 0s; }
.line-2 { top: 35%; left: 50%; width: 25%; animation-delay: 1s; }
.line-3 { top: 65%; left: 30%; width: 30%; animation-delay: 2s; }
.line-4 { top: 75%; left: 60%; width: 20%; animation-delay: 3s; }
.line-5 { top: 45%; left: 80%; width: 15%; animation-delay: 0.5s; }
.line-6 { top: 20%; left: 70%; width: 25%; animation-delay: 1.5s; }
.line-7 { top: 85%; left: 40%; width: 30%; animation-delay: 2.5s; }
.line-8 { top: 30%; left: 90%; width: 10%; animation-delay: 3.5s; }

/* Content Overlay */
.content-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: var(--white);
  text-align: center;
  padding: var(--space-3xl);
  max-width: 600px;
}

.hero-title {
  font-size: 4rem;
  font-weight: var(--font-light);
  margin: 0 0 var(--space-lg) 0;
  text-shadow: var(--shadow-sm);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.5rem;
  opacity: 0.8;
  margin: 0 0 var(--space-3xl) 0;
  font-weight: var(--font-light);
  line-height: 1.5;
  max-width: 500px;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  font-size: 1.2rem;
  opacity: 0.9;
  padding: var(--space-lg) var(--space-xl);
  background: var(--white-08);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--white-15);
  transition: var(--transition-slow);
}

.hero-feature:hover {
  background: var(--white-12);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.hero-feature i {
  font-size: 1.75rem;
  color: var(--success-color);
  min-width: 2.5rem;
}

/* Alerts */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  border: 1px solid transparent;
  font-size: 0.875rem;
}

.alert-info {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.alert-danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: var(--error-color);
}

.alert-header {
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-xs);
}

.error-list {
  margin: 0;
  padding-left: 1.25rem;
}

.error-list li {
  margin-bottom: var(--space-xs);
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
  
  .login-form-container {
    order: 1;
    width: 100%;
    padding: var(--space-2xl) var(--space-xl);
  }
  
  .network-section {
    order: 2;
    min-height: 400px;
  }
  
  .content-overlay {
    padding: var(--space-lg);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: var(--space-md);
    margin-bottom: var(--space-xl);
  }
  
  .hero-features {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
  }
  
  .hero-feature {
    flex: 1;
    min-width: 120px;
    font-size: 0.875rem;
    padding: var(--space-md) var(--space-md);
  }
  
  .hero-feature i {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .guest-main {
    padding: var(--space-sm);
  }
  
  .login-form-container {
    padding: var(--space-lg);
    margin: var(--space-sm);
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .trust-indicators {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .trust-item {
    flex-direction: row;
    gap: var(--space-sm);
  }
  
  .trust-icon {
    margin-bottom: 0;
  }
  
  .hero-features {
    flex-direction: column;
  }
  
  .hero-feature {
    min-width: auto;
  }
}

/* Accessibility */
@media (prefers-contrast: high) {
  .form-input {
    border-width: 3px;
  }
  
  .submit-btn {
    border: 2px solid var(--white);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-container {
    animation: none;
  }
  
  .form-input,
  .submit-btn,
  .passkey-btn {
    transition: none;
  }
} 