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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
}

/* Main Container */
.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 450px;
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.login-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.logo {
  color: #667eea;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-title {
  color: #333;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 30px;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
  text-align: left;
  position: relative;
}

.form-label {
  display: block;
  color: #555;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.form-input:hover {
  border-color: #667eea;
  background: white;
}

/* Password Toggle */
.input-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
  font-size: 1.2rem;
}

.input-icon:hover {
  color: #667eea;
}

.form-input:focus + .input-icon {
  color: #667eea;
}

.password-toggle {
  cursor: pointer;
  user-select: none;
}

/* Forgot Password */
.forgot-password {
  text-align: right;
  margin-top: 8px;
}

.forgot-password a {
  color: #667eea;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.forgot-password a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Login Button */
.login-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 25px 0 20px 0;
  position: relative;
  overflow: hidden;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Loading Spinner */
.loading {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

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

/* Response Message */
.response-message {
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 500;
  display: none;
  animation: slideIn 0.3s ease;
  word-wrap: break-word;
  max-width: 100%;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.response-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.response-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Signup Link */
.signup-link {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.signup-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.signup-link a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Divider */
.divider {
  position: relative;
  text-align: center;
  margin: 25px 0;
  color: #999;
  font-size: 0.9rem;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e1e5e9;
  z-index: 1;
}

.divider span {
  background: rgba(255, 255, 255, 0.95);
  padding: 0 15px;
  position: relative;
  z-index: 2;
}

/* Google Button */
.google-btn {
  width: 100%;
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  background: white;
  color: #333;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-btn:hover {
  border-color: #667eea;
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.google-btn img {
  width: 50px;
}

.email-icon::before {
  content: '📧';
}

.password-icon::before {
  content: '🔒';
}

.show-password::before {
  content: '👁️';
}

.hide-password::before {
  content: '🙈';
}

/* RESPONSIVENESS START */

/* Extra Small: ≤360px */
@media (max-width: 360px) {
  .login-container {
    padding: 25px 15px;
    max-width: 100%;
    border-radius: 15px;
  }

  .form-input {
    font-size: 0.9rem;
    padding: 12px;
  }

  .login-title {
    font-size: 1.4rem;
  }

  .logo {
    font-size: 2rem;
  }

  .login-btn,
  .google-btn {
    font-size: 0.9rem;
    padding: 12px;
  }

  .response-message,
  .signup-link,
  .forgot-password,
  .divider span {
    font-size: 0.8rem;
  }
}

/* Small Devices: ≤480px */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 20px;
    width: 100%;
    margin: 0;
  }

  .form-input {
    padding: 14px;
  }

  .google-btn img {
    width: 30px;
  }
}

/* Medium Tablets: 481px–768px */
@media (min-width: 481px) and (max-width: 768px) {
  .login-container {
    padding: 35px 30px;
    width: 90%;
    margin: 0 auto;
  }

  .login-title {
    font-size: 1.6rem;
  }

  .form-input {
    font-size: 1rem;
    padding: 15px;
  }
}

/* Small Laptops: 769px–1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .login-container {
    width: 80%;
    padding: 40px;
  }
}

/* Large screens: 1025px+ */
@media (min-width: 1025px) {
  .login-container {
    width: 100%;
    max-width: 450px;
  }
}
