/* user-login.css */

:root {
  --primary: #2ecc71;
  --dark: #111111;
  --light: #ffffff;
  --gray: #7f8c8d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #111111;
}

.login-container,
.register-container {
  width: 90%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.6s ease-out;
  position: relative;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header,
.register-header {
  background: var(--dark);
  color: white;
  padding: 25px;
  text-align: center;
  position: relative;
}

.login-header::after,
.register-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary);
}

.login-header h1,
.register-header h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.login-header p,
.register-header p {
  color: var(--gray);
  font-size: 0.9rem;
}

.login-body,
.register-body {
  padding: 30px;
}

.input-group {
  margin-bottom: 20px;
  position: relative;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark);
}

.input-group input {
  width: 100%;
  padding: 14px 15px 14px 40px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 40px;
  color: var(--gray);
}

.login-options {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 25px;
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.login-btn,
.register-btn {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.login-btn:hover,
.register-btn:hover {
  background: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.divider {
  margin: 25px 0;
  text-align: center;
  position: relative;
  color: var(--gray);
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #ddd;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.social-login,
.social-register {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.google-signin-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: transparent;
  border: none;
  border-radius: 50%;
  transition: transform 0.2s ease;
  padding: 0;
}

.google-signin-btn:hover {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.05);
}

.google-signin-btn svg {
  width: 50px;
  height: 50px;
}

.register-link,
.login-link {
  text-align: center;
  margin-top: 20px;
  color: var(--gray);
}

.register-link a,
.login-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.home-arrow {
  position: absolute;
  top: 20px;
  left: 20px;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s;
}

.home-arrow:hover {
  background: var(--primary);
  transform: translateX(-3px);
}

.error-message {
  background: #ffcccc;
  padding: 10px;
  margin: 10px 0;
  border-left: 4px solid red;
  color: #900;
  font-weight: bold;
}

.password-strength {
  margin-top: 5px;
  height: 5px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.3s;
}

/* Loading overlay styles */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-content {
  text-align: center;
  color: white;
}

.loading-content p {
  margin-top: 15px;
  font-size: 1.1rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Google User Info Styles */
.google-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.google-user-email {
  background: rgba(0, 0, 0, 0.05);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #333;
}

.continue-with-google {
  background: #4285F4;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.continue-with-google:hover {
  background: #357ABD;
  transform: translateY(-2px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.continue-with-google::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="white"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="white"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="white"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="white"/></svg>');
  background-size: contain;
}

@media (max-width: 480px) {
  .login-container,
  .register-container {
    width: 95%;
  }

  .login-body,
  .register-body {
    padding: 25px 20px;
  }

  .login-options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
  }
  
  .social-login,
  .social-register {
    justify-content: center;
  }
}