:root {
  --primary-bg: #313131;
  --secondary-bg: #1e1e1e;
  --accent: #ff2d2d;
  --accent-hover: #ff4d4d;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--primary-bg);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.login-container, .forgot-password-container {
  background-color: var(--secondary-bg);
  width: 100%;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

@media (max-width: 480px) {
  .login-container, .forgot-password-container {
      padding: 1.5rem;
  }
}

.login-container::before, .forgot-password-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #ff6b6b);
}

.forgot-password-container {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.forgot-password-container.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.login-container.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
}

.logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--accent), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.logo p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

@media (max-width: 480px) {
  .logo h1 {
      font-size: 1.6rem;
  }
  .logo p {
      font-size: 0.8rem;
  }
}

.input-group {
  margin-bottom: 1.25rem;
  position: relative;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.input-group input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

@media (max-width: 480px) {
  .input-group input {
      padding: 0.65rem 1rem 0.65rem 2.5rem;
      font-size: 0.85rem;
  }
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 45, 45, 0.2);
}

.input-group i {
  position: absolute;
  left: 1rem;
  top: 2.58rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .input-group i {
      top: 2.1rem;
      font-size: 0.8rem;
  }
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input {
  margin-right: 0.5rem;
  accent-color: var(--accent);
}

.forgot-password a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.forgot-password a:hover {
  color: var(--accent);
}

.login-btn, .send-reset-btn, .back-to-login {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-bottom: 1.25rem;
}

@media (max-width: 480px) {
  .login-btn, .send-reset-btn, .back-to-login {
      padding: 0.7rem;
      font-size: 0.9rem;
  }
}

.login-btn:hover, .send-reset-btn:hover {
  background-color: var(--accent-hover);
}

.back-to-login {
  background-color: transparent;
  border: 1px solid var(--accent);
  margin-top: 1rem;
}

.back-to-login:hover {
  background-color: rgba(255, 45, 45, 0.1);
}

.register-link {
  text-align: center;
  font-size: 0.85rem;
}

.register-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.register-link a:hover {
  text-decoration: underline;
}

.error-message, .success-message {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: none;
  text-align: center; /* Add this to center the text */
  padding: 0.5rem; /* Add some padding */
  border-radius: 4px; /* Optional: rounded corners */
}

.error-message {
  color: var(--accent);
}

.success-message {
  color: #4caf50;
}
/* Loading animation */
.loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}