/* HandyGo Login Page Styles */
/* Enhanced Professional Login Design */

:root {
  --primary-color: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #1976d2;
  --secondary-color: #00c6ff;
  --accent-color: #0075ff;
  --success-color: #4caf50;
  --error-color: #f44336;
  --warning-color: #ff9800;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-light: #718096;
  --bg-primary: #f8fafc;
  --bg-secondary: #e2e8f0;
  --white: #ffffff;
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.2);
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Background Animation */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(21, 101, 192, 0.1), rgba(0, 198, 255, 0.1));
  z-index: -2;
}

.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 60%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.login-wrapper {
  width: 100%;
  max-width: 450px;
  animation: fadeInUp 0.8s ease-out;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-heavy);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.logo-section {
  margin-bottom: 30px;
  animation: slideInRight 0.8s ease-out 0.2s both;
}

.logo-img {
  height: 80px;
  width: auto;
  margin-bottom: 15px;
  transition: var(--transition);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.logo-img:hover {
  transform: scale(1.05);
}

.welcome-text {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 30px;
  font-weight: 400;
}

.form-group {
  margin-bottom: 20px;
  text-align: right;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.form-label {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e2e8f0;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: 'Cairo', sans-serif;
  background: var(--white);
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
  transition: var(--transition);
}

.form-input:focus + .input-icon {
  color: var(--primary-color);
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-light);
  font-size: 1.1rem;
  transition: var(--transition);
  padding: 5px;
  border-radius: 50%;
}

.toggle-password:hover {
  color: var(--primary-color);
  background: rgba(21, 101, 192, 0.1);
}

.buttons-section {
  margin: 30px 0;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.main-buttons-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.btn {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: var(--white);
  box-shadow: var(--shadow-light);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-half {
  width: calc(50% - 5px);
  margin-bottom: 0;
}

/* Ripple Effect for Buttons */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn-google {
  background: var(--white);
  color: var(--text-primary);
  border: 2px solid #e2e8f0;
  box-shadow: var(--shadow-light);
}

.btn-google:hover {
  background: #f8fafc;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.google-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.links-section {
  margin-top: 25px;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 8px 15px;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
}

.link:hover {
  background: rgba(21, 101, 192, 0.1);
  transform: translateY(-1px);
  color: var(--primary-dark);
}

.link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
  transform: translateX(-50%);
}

.link:hover::after {
  width: 80%;
}

.forgot-password {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 15px 0;
  display: block;
  text-align: center;
}

.forgot-password:hover {
  color: var(--primary-color);
  background: rgba(21, 101, 192, 0.05);
}

.message {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
}

.message.show {
  opacity: 1;
  transform: translateY(0);
}

.message.error {
  background: rgba(244, 67, 54, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(244, 67, 54, 0.2);
}

.message.success {
  background: rgba(76, 175, 80, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(76, 175, 80, 0.2);
}

/* Loading Animation */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .login-container {
    padding: 30px 25px;
  }

  .welcome-text {
    font-size: 1.5rem;
  }

  .logo-img {
    height: 60px;
  }

  .form-input {
    padding: 12px 15px;
  }

  .btn {
    padding: 12px 15px;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 25px 20px;
  }

  .welcome-text {
    font-size: 1.3rem;
  }

  .links-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .link {
    margin: 5px 0;
  }

  .main-buttons-row {
    flex-direction: column;
    gap: 10px;
  }

  .btn-half {
    width: 100%;
  }
}

/* RTL Support Enhancement */
[dir="rtl"] .input-icon {
  left: auto;
  right: 15px;
}

[dir="rtl"] .toggle-password {
  left: auto;
  right: 15px;
}

[dir="rtl"] .form-input {
  padding-left: 20px;
  padding-right: 50px;
}

/* Focus Accessibility */
.btn:focus,
.form-input:focus,
.link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .login-container {
    background: var(--white);
    border: 2px solid var(--text-primary);
  }
  
  .form-input {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Additional Professional Enhancements */
.form-input:valid {
  border-color: var(--success-color);
}

.form-input:invalid:not(:placeholder-shown) {
  border-color: var(--error-color);
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

/* Enhanced button states */
.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Professional loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: spin 1s ease-in-out infinite;
}

/* Enhanced focus states for accessibility */
.form-input:focus-visible,
.btn:focus-visible,
.link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .bg-shapes,
  .shape {
    display: none;
  }
  
  body {
    background: white;
  }
  
  .login-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}