:root {
  --bg: #05070d;
  --bg-2: #080c17;
  --panel: rgba(18, 24, 42, 0.55);
  --panel-border: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(6, 9, 18, 0.7);
  --input-border: rgba(255, 255, 255, 0.1);
  --accent: #3d63c9;
  --accent-bright: #5a82e0;
  --accent-glow: rgba(61, 99, 201, 0.45);
  --text-main: #e9ecf5;
  --text-muted: #808aa8;
  --text-faint: #4d5674;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(ellipse at 50% -10%, #0e1730 0%, var(--bg) 55%, #020306 100%);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

#rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.glow-a {
  width: 480px;
  height: 480px;
  background: rgba(61, 99, 201, 0.28);
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-b {
  width: 360px;
  height: 360px;
  background: rgba(90, 40, 140, 0.16);
  bottom: -100px;
  right: 10%;
}

header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

.logo {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

nav a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  margin-left: 26px;
  opacity: 0.9;
}

nav a.muted {
  color: var(--text-muted);
}

nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

main {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 70px 20px 60px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 36px 32px 30px;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

h1.title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

p.subtitle {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0 0 26px;
}

.form-message {
  min-height: 18px;
  font-size: 13px;
  margin: -8px 0 16px;
  color: var(--text-muted);
}

.form-message.error {
  color: #f08585;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 7px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
  color: var(--text-faint);
}

input:focus {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.password-row {
  position: relative;
}

.password-row input {
  padding-right: 58px;
}

.show-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--accent-bright);
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 6px;
}

.show-toggle:hover {
  color: #fff;
}

.extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
  font-size: 13px;
}

a.link {
  color: var(--accent-bright);
  text-decoration: none;
}

a.link:hover {
  text-decoration: underline;
}

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

.remember input {
  accent-color: var(--accent-bright);
}

button.submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px var(--accent-glow);
  transition: filter 0.15s ease, transform 0.05s ease;
}

button.submit:hover {
  filter: brightness(1.08);
}

button.submit:active {
  transform: translateY(1px);
}

.register {
  text-align: center;
  margin: 22px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.register a {
  color: var(--accent-bright);
  text-decoration: none;
  margin-left: 5px;
}

.register a:hover {
  text-decoration: underline;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

@media (max-width: 460px) {
  .login-card {
    padding: 28px 22px 26px;
  }
  header {
    padding: 16px 20px;
  }
}
