:root {
  --primary-color: #e62b2b;
  --secondary-color: #964141f6;
  --error-color: #f72585;
  --success-color: #4cc9f0;
  --text-color: #2b2d42;
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --dark-gray: #adb5bd;
  --white: #ffffff;
  --black: #000000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--light-gray);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  background-color: var(--white);
  width: 100%;
  max-width: 420px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 30px;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.app-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 15px;
  border-radius: 50%;
  object-fit: cover;
}

.login-header h1 {
  color: var(--text-color);
  font-size: 24px;
  margin-bottom: 5px;
}

.login-header p {
  color: var(--dark-gray);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.input-group label {
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 15px;
  color: var(--dark-gray);
  font-size: 16px;
}

.input-with-icon input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.toggle-password {
  left: auto !important;
  right: 15px;
  cursor: pointer;
}

.error-message {
  color: var(--error-color);
  font-size: 12px;
  height: 14px;
  margin-top: 2px;
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-color);
}

.remember-me input {
  accent-color: var(--primary-color);
}

.forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.forgot-password:hover {
  text-decoration: underline;
}

.login-button {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-button:hover {
  background-color: var(--secondary-color);
}

.signup-link {
  text-align: center;
  color: var(--text-color);
  font-size: 14px;
}

.signup-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.signup-link a:hover {
  text-decoration: underline;
}

.social-login {
  margin-top: 30px;
  text-align: center;
}

.social-login p {
  color: var(--dark-gray);
  font-size: 14px;
  margin-bottom: 15px;
  position: relative;
}

.social-login p::before,
.social-login p::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background-color: var(--medium-gray);
}

.social-login p::before {
  left: 0;
}

.social-login p::after {
  right: 0;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--medium-gray);
  background-color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

.social-button i {
  font-size: 20px;
}

.social-button.google {
  color: #DB4437;
}

.social-button.google:hover {
  background-color: #f1f1f1;
  border-color: #DB4437;
}

.social-button.facebook {
  color: #4267B2;
}

.social-button.facebook:hover {
  background-color: #f1f1f1;
  border-color: #4267B2;
}

.social-button.apple {
  color: #000000;
}

.social-button.apple:hover {
  background-color: #f1f1f1;
  border-color: #000000;
}

/* Responsividade adicional */
@media (max-width: 480px) {
  .login-container {
      padding: 20px;
  }
  
  .app-logo {
      width: 70px;
      height: 70px;
  }
  
  .login-header h1 {
      font-size: 22px;
  }
  
  .input-with-icon input {
      padding: 12px 12px 12px 40px;
  }
  
  .login-button {
      padding: 12px;
  }
  
  .social-button {
      width: 45px;
      height: 45px;
  }
}

/* === Dark Mode Toggle === */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

/* === Dark Theme Variables === */
[data-theme="dark"] {
    --primary-color: #c74d4d;
    --secondary-color: #9c4343;
    --text-color: #f8f9fa;
    --light-gray: #212529;
    --medium-gray: #343a40;
    --white: #0a0a0a;
    --black: #ffffff;
}

[data-theme="dark"] body {
    background-color: #121212;
}

[data-theme="dark"] .login-container {
  background-color: var(--white);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* === Imagem de Fundo com Blur === */
body {
  position: relative;
  background: url('../img/fundo1.jpg') no-repeat center center fixed;
  background-size: cover;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  filter: blur(5px);
  z-index: -1;
}

.login-container {
  background-color: rgba(255, 255, 255, 0.9); /* Adiciona transparência */
  backdrop-filter: blur(2px); /* Adiciona blur leve ao container */
}

/* Ajuste para o tema dark */
[data-theme="dark"] .login-container {
  background-color: rgba(10, 10, 10, 0.9);
}

[data-theme="dark"] body::before {
  filter: blur(5px) brightness(0.5);
}

/* === Fundo padrão (light) === */
body {
  position: relative;
  background: url('../img/fundo1.jpg') no-repeat center center fixed;
  background-size: cover;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  filter: blur(5px);
  z-index: -1;
  transition: background 0.5s ease; /* Adiciona transição suave */
}

.login-container {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
}

/* === Fundo dark === */
[data-theme="dark"] body {
  background-image: url('../img/fundo2.jpg');
}

[data-theme="dark"] body::before {
  filter: blur(5px) brightness(0.7);
}

[data-theme="dark"] .login-container {
  background-color: rgba(10, 10, 10, 0.9);
}