:root {
  --font-primary: "Roboto", sans-serif;
  --theme-light-bg: #f0f2f5;
  --theme-light-card-bg: #ffffff;
  --theme-light-text: #212529;
  --theme-light-input-bg: rgba(0, 0, 0, 0.05);
  --theme-light-primary-rgb: 13, 110, 253;
  --theme-dark-bg: #000000;
  --theme-dark-card-bg: rgba(17, 17, 17, 0.85);
  --theme-dark-text: #fff;
  --theme-dark-input-bg: rgba(255, 255, 255, 0.1);
  --theme-dark-border-color: rgba(255, 255, 255, 0.2);
  --theme-dark-glow-color: #ff0000;
  --theme-dark-primary-rgb: 255, 0, 0;
}

body {
  font-family: var(--font-primary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
}

#plexus-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.login-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  text-align: center;
  overflow: hidden;
  border-radius: 1rem;
  transition: box-shadow 0.3s ease;
  margin: 1rem;
}

.login-card {
  padding: 2.5rem;
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  animation: animateScannerVertical 6s linear infinite;
}

@keyframes animateScannerVertical {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

.login-logo {
  width: 80px;
  margin: 0 auto 1.5rem;
  transition: transform 0.3s ease;
}

.login-logo:hover {
  transform: scale(1.1);
}

.input-group-text,
.form-control {
  border: none;
}

.form-control:focus {
  box-shadow: none;
  background-color: rgba(255, 255, 255, 0.15);
}

.form-control::placeholder {
  color: #888 !important;
  opacity: 1;
}

.password-toggle {
  cursor: pointer;
}

/* Theme Styles */
body[data-bs-theme="light"] {
  background-color: var(--theme-light-bg);
  color: var(--theme-light-text);
}

body[data-bs-theme="dark"] {
  background-color: var(--theme-dark-bg);
  color: var(--theme-dark-text);
}

[data-bs-theme="light"] .login-container {
  background-color: var(--theme-light-card-bg);
  border: 1px solid #e0e5ec;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .login-container::before {
  background: linear-gradient(
    0deg,
    transparent,
    rgba(var(--theme-light-primary-rgb), 0.08),
    transparent
  );
}

[data-bs-theme="light"] .input-group {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
}

[data-bs-theme="light"] .input-group-text,
[data-bs-theme="light"] .form-control {
  background: var(--theme-light-input-bg);
}

[data-bs-theme="dark"] .login-container {
  background-color: var(--theme-dark-card-bg);
  box-shadow: 0 0 30px var(--theme-dark-glow-color);
}

[data-bs-theme="dark"] .login-container::before {
  background: linear-gradient(
    0deg,
    transparent,
    rgba(var(--theme-dark-primary-rgb), 0.2),
    transparent
  );
}

[data-bs-theme="dark"] .input-group {
  border: 1px solid var(--theme-dark-border-color);
  border-radius: 0.5rem;
}

[data-bs-theme="dark"] .input-group-text,
[data-bs-theme="dark"] .form-control {
  background: var(--theme-dark-input-bg);
  color: var(--theme-dark-text);
}

.theme-switcher {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

/* MOBILE RESPONSIVE STYLES */
@media (max-width: 576px) {
  .login-container {
    margin: 1rem;
    max-width: calc(100% - 2rem);
    border-radius: 1.5rem;
  }

  .login-card {
    padding: 2rem 1.5rem;
  }

  .login-logo {
    width: 70px;
    margin: 0 auto 1.25rem;
  }

  .login-card h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .input-group {
    margin-bottom: 1rem;
  }

  .input-group-text {
    min-width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .form-control {
    font-size: 16px;
    padding: 0.75rem 1rem;
  }

  .password-toggle {
    min-width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #submitButton {
    padding: 0.875rem;
    font-size: 1rem;
    margin-top: 0.5rem;
  }

  .text-secondary {
    font-size: 0.8rem;
    margin-top: 1.5rem !important;
    padding: 0 0.5rem;
  }

  .theme-switcher {
    top: 1rem;
    right: 1rem;
  }

  .theme-switcher .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* Extra small devices (phones, less than 375px) */
@media (max-width: 375px) {
  .login-container {
    margin: 0.75rem;
    max-width: calc(100% - 1.5rem);
    border-radius: 1.25rem;
  }

  .login-card {
    padding: 1.75rem 1.25rem;
  }

  .login-logo {
    width: 60px;
    margin: 0 auto 1rem;
  }

  .login-card h1 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
  }

  .form-control {
    font-size: 15px;
    padding: 0.65rem 0.85rem;
  }

  .input-group-text i,
  .password-toggle i {
    font-size: 0.9rem;
  }

  #submitButton {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
}

/* Landscape mode on mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .login-container {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .login-card {
    padding: 1.5rem 1.25rem;
  }

  .login-logo {
    width: 50px;
    margin: 0 auto 1rem;
  }

  .login-card h1 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .input-group {
    margin-bottom: 0.75rem;
  }

  .form-control {
    padding: 0.6rem 0.75rem;
  }

  .text-secondary {
    display: none;
  }
}
