/* Login Page Styles - Matching Flutter App Design */

:root {
  --primary: #2e7d32;
  --primary-light: #4caf50;
  --primary-dark: #1b5e20;
  --accent: #66bb6a;
  --background: #f8fbf8;
  --card-bg: rgba(255, 255, 255, 0.95);
  --text: #1b5e20;
  --text-light: #4a6741;
  --text-muted: #6b7280;
  --border: rgba(255, 255, 255, 0.2);
  --shadow: rgba(0, 0, 0, 0.1);
  --error: #d32f2f;
  --success: #4caf50;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated Background */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(46, 125, 50, 0.1) 0%, 
    rgba(102, 187, 106, 0.05) 50%, 
    rgba(255, 255, 255, 0.8) 100%);
  z-index: -1;
}

.background-animation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(46, 125, 50, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(102, 187, 106, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

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

/* Login Card - Glassmorphism */
.login-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.05);
  animation: slideUp 0.8s ease-out;
}

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

/* Logo Section */
.logo-section {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(46, 125, 50, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

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

.logo-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.welcome-text {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

.login-info {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(46, 125, 50, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.info-text {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
}

/* City Badge */
.city-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.1), rgba(102, 187, 106, 0.1));
  border: 1px solid rgba(46, 125, 50, 0.2);
  border-radius: 20px;
  padding: 8px 16px;
  margin-bottom: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

/* Form Styles */
.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);
  margin-bottom: 4px;
}

.form-group input {
  padding: 16px;
  border: 2px solid rgba(46, 125, 50, 0.1);
  border-radius: 12px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

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

/* Password Input */
.password-input {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input input {
  flex: 1;
  padding-right: 50px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.toggle-password:hover {
  background: rgba(46, 125, 50, 0.1);
}

/* Error Message */
.error-message {
  display: none;
  background: rgba(211, 47, 47, 0.1);
  border: 1px solid rgba(211, 47, 47, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: var(--error);
  font-size: 14px;
  text-align: center;
}

/* Button Styles */
.button-group {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46, 125, 50, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary);
  border: 2px solid rgba(46, 125, 50, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(46, 125, 50, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-google {
  background: white;
  color: #333;
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google:hover:not(:disabled) {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

/* Divider */
.divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(46, 125, 50, 0.2);
}

.divider span {
  background: var(--card-bg);
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

/* Footer Text */
.footer-text {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(46, 125, 50, 0.1);
}

.footer-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
  .login-card {
    padding: 32px 24px;
    margin: 20px;
  }
  
  .welcome-text {
    font-size: 24px;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 24px 20px;
  }
  
  .logo {
    width: 60px;
    height: 60px;
  }
  
  .logo-icon {
    width: 36px;
    height: 36px;
  }
  
  .welcome-text {
    font-size: 22px;
  }
}

/* Focus styles for accessibility */
.btn:focus,
.form-group input:focus,
.toggle-password:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
* {
  transition: all 0.3s ease;
}

/* Button selection styles */
.button-selection {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.button-selection .btn {
  width: 100%;
}

/* Form switching styles */
.login-form {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.login-form.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Ensure smooth transition between forms */
.login-form:not(.active) {
  position: absolute;
  width: 100%;
  pointer-events: none;
}

.login-card {
  position: relative;
  min-height: 500px;
}