/* ===== Base Theme Variables ===== */
/**
 * Refresh the login page variables to align with the revamped gallery
 * styles.  A background gradient and card blur are introduced here
 * for a consistent glass‑morphism effect.  Both dark and light
 * palettes define their own gradients and colours.
 */
:root {
  --bg-color: #0f172a;
  --bg-gradient: linear-gradient(135deg, #0f172a, #1e306e, #2e3990);
  --text-color: #ffffff;
  --card-color: rgba(255, 255, 255, 0.08);
  --card-blur: 15px;
  --accent-color: #3b82f6;
}
body.light-theme {
  --bg-color: #f4f6fa;
  --bg-gradient: linear-gradient(135deg, #ffffff, #e7eaf5, #f3f5fc);
  --text-color: #1f2937;
  --card-color: rgba(255, 255, 255, 0.9);
  --card-blur: 10px;
  --accent-color: #2563eb;
}

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

/* ===== Body Layout ===== */
body {
  font-family: "Inter", "Segoe UI", sans-serif;
  background: var(--bg-gradient, var(--bg-color));
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  -webkit-font-smoothing: antialiased;
}


/* ===== Login Container ===== */
.login-page {
  width: 100%;
  max-width: 420px;
}
/* Login card container adopts the same frosted look as the gallery */
.login-card {
  background: var(--card-color);
  backdrop-filter: blur(var(--card-blur));
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Adjust headings for improved hierarchy */
.login-card h1 {
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  font-weight: 700;
}
.login-card h2 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  color: var(--accent-color);
  font-weight: 600;
}

/* ===== Error Message ===== */
/* Error message styling stands out but remains cohesive */
.error {
  background: rgba(248, 113, 113, 0.15);
  border-left: 4px solid #f87171;
  padding: 0.6rem;
  margin-bottom: 1rem;
  color: #f87171;
  font-size: 0.9rem;
  border-radius: 0.5rem;
}

/* ===== Login Form ===== */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  align-items: flex-start;
  width: 100%;
}
.input-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.input-group label {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}
/* Inputs get a glass effect with subtle outlines */
.input-group input {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  outline: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  font-size: 1rem;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(calc(var(--card-blur) / 1.5));
}
.input-group input:focus {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 2px var(--accent-color);
}

/* ===== Password Wrapper ===== */
.password-wrapper {
  position: relative;
  width: 100%;
}
.password-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 2.5rem;
}
/* Show/hide password toggle button */
.password-wrapper button {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s ease;
}
.password-wrapper button:hover {
  color: var(--accent-color);
}

/* ===== Submit Button ===== */
/* Submit button mirrors the gallery style */
.submit-btn {
  background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 70%, #9333ea));
  border: none;
  border-radius: 9999px;
  color: white;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}


/* ===== Responsive ===== */
@media (max-width: 480px) {
  .login-card {
    padding: 1rem;
  }
  .login-card h1 {
    font-size: 1.5rem;
  }
  .login-card h2 {
    font-size: 1rem;
  }
  .submit-btn {
    font-size: 0.9rem;
    padding: 0.65rem;
  }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.login-card {
  animation: fadeInUp 0.6s ease;
}