@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

:root {
  --violet-900: #150c2b;
  --violet-800: #241347;
  --violet-glow: #a78bfa;
  --violet-glow-2: #7c6cf0;
  --text-light: #f1ecff;
  --text-muted: #c9c0e8;
  --card-bg: rgba(24, 14, 48, 0.55);
  --card-border: rgba(167, 139, 250, 0.35);
  --error: #ff8a8a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html, body {
  height: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-light);
  background-color: var(--violet-900);
}

.background {
  position: fixed;
  inset: 0;
  background-image: url("../img/bg-dragon-forest.png");
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
  z-index: -2;
}

.overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 5, 24, 0.35) 0%, rgba(10, 5, 24, 0.65) 100%);
  z-index: -1;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px 32px 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(124, 108, 240, 0.12);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, var(--violet-glow), var(--violet-glow-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(167, 139, 250, 0.35);
}

.brand-sub {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: center;
}

h1 {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-light);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field:focus-within {
  border-color: var(--violet-glow);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}

.field i {
  font-size: 18px;
  color: var(--text-muted);
}

.field input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-light);
  font-size: 14px;
  padding: 13px 10px;
}

.field input::placeholder {
  color: rgba(241, 236, 255, 0.45);
}

.toggle-pw {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.toggle-pw:hover {
  color: var(--text-light);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

.remember input {
  accent-color: var(--violet-glow-2);
}

.forgot {
  color: var(--text-muted);
  text-decoration: none;
}

.forgot:hover {
  color: var(--text-light);
  text-decoration: underline;
}

.error {
  min-height: 18px;
  color: var(--error);
  font-size: 12px;
  margin: 8px 0 4px;
  text-align: center;
}

.submit-btn {
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #15102b;
  background: linear-gradient(90deg, var(--violet-glow), var(--violet-glow-2));
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.submit-btn:hover {
  box-shadow: 0 10px 30px rgba(124, 108, 240, 0.4);
  transform: translateY(-1px);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.copyright {
  margin-top: 20px;
  font-size: 11px;
  color: rgba(241, 236, 255, 0.55);
  text-align: center;
}

@media (max-width: 420px) {
  .login-card {
    padding: 32px 22px 26px;
  }
}
