/* Modern Signin Page Styles - Mobile First Design */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-image: url('images/city3.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-blend-mode: overlay;
  background-color: rgba(102, 126, 234, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Animated background overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  z-index: -1;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.login-container {
  width: 100%;
  max-width: 450px;
  animation: fadeInUp 0.6s ease-out;
}

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

.login-box {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  padding: 0;
  overflow: hidden;
  position: relative;
}

/* Decorative top accent */
.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #4facfe);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.login-header {
  padding: 40px 30px 30px;
  text-align: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.logo-container {
  margin-bottom: 20px;
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05) rotate(5deg);
}

.login-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 15px;
  color: #718096;
  font-weight: 400;
}

.login-form {
  padding: 30px;
}

.form-section {
  width: 100%;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
}

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

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  text-align: right;
}

.input-group input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #1a202c;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.input-group input::placeholder {
  color: #a0aec0;
  font-weight: 400;
}

.input-group input:focus {
  border-color: #667eea;
  background: #f7fafc;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.input-group input:hover:not(:focus) {
  border-color: #cbd5e0;
}

.login-button {
  width: 100%;
  padding: 16px 24px;
  margin-top: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  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;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-button:hover::before {
  left: 100%;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #5568d3 0%, #6a3d9f 100%);
}

.login-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.login-button:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

.button-text {
  position: relative;
  z-index: 1;
}

.button-icon {
  position: relative;
  z-index: 1;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.login-button:hover .button-icon {
  transform: translateX(-3px);
}

.error {
  color: #e53e3e;
  margin-top: 16px;
  min-height: 24px;
  font-size: 14px;
  text-align: center;
  padding: 12px;
  background: #fed7d7;
  border-radius: 8px;
  border: 1px solid #fc8181;
  font-weight: 500;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
  body {
    padding: 15px;
  }

  .login-container {
    max-width: 100%;
  }

  .login-header {
    padding: 30px 20px 20px;
  }

  .login-header h1 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 14px;
  }

  .login-form {
    padding: 24px 20px;
  }

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

  .login-button {
    padding: 14px 20px;
    font-size: 16px;
  }

  .section-title {
    font-size: 16px;
    margin-bottom: 20px;
  }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
  .login-box {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  }

  .login-header {
    padding: 50px 40px 35px;
  }

  .login-header h1 {
    font-size: 32px;
  }

  .login-form {
    padding: 40px;
  }
}

/* Large screens */
@media (min-width: 1024px) {
  .login-container {
    max-width: 480px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
.login-button:focus-visible,
.input-group input:focus-visible {
  outline: 3px solid #667eea;
  outline-offset: 2px;
}

/* Loading state (can be added via JS) */
.login-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.login-button.loading .button-text::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}
