/* Reset & Basics */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  min-height: 100vh;
}

/* Hintergrund: Dark mit #321850-Glow in der Mitte */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, #321850 0%, #020617 40%, #020617 100%),
    radial-gradient(circle at top, #1d4ed8 0, #020617 40%, #020617 100%);
}

/* Card */
.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 18px;
  padding: 22px 22px 20px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(129, 140, 248, 0.7);
  box-shadow:
    0 30px 70px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* Header */
.login-header h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-header p {
  margin: 4px 0 14px;
  font-size: 13px;
  color: #9ca3af;
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-size: 13px;
  font-weight: 500;
}

.form-row input {
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
}

.form-row input::placeholder {
  color: #6b7280;
}

.form-row input:focus {
  border-color: #6366f1;
  background: rgba(15, 23, 42, 1);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.8);
}

/* Language selector */
@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.language-selector {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.language-btn-current {
  border: 1px solid rgba(148, 163, 184, 0.65);
  background: rgba(15, 23, 42, 0.92);
  color: #e5e7eb;
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  backdrop-filter: blur(10px);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.language-btn-current::after {
  content: "▾";
  font-size: 12px;
  line-height: 1;
  color: #9ca3af;
  margin-left: 2px;
}

.language-btn-current:hover {
  border-color: rgba(129, 140, 248, 0.8);
  background: rgba(15, 23, 42, 0.96);
}

.language-btn-current:focus-visible {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.8);
}

.language-current-flag {
  font-size: 18px;
  line-height: 1;
}

.language-current-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.language-selector:hover .language-dropdown,
.language-selector.active .language-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: dropdownSlideIn 0.18s ease-out;
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.9);
  min-width: 190px;
}

.language-btn {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
  border-radius: 10px;
  font-size: 13px;
  color: #e5e7eb;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: left;
}

.language-btn:hover {
  border-color: rgba(129, 140, 248, 0.75);
  background: rgba(129, 140, 248, 0.12);
}

.language-btn.active {
  border-color: rgba(129, 140, 248, 0.9);
  background: rgba(129, 140, 248, 0.16);
}
/* Button */
.btn-primary {
  margin-top: 6px;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #1d4ed8);
  color: #f9fafb;
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.6);
  transition:
    background 0.15s ease,
    transform 0.05s ease,
    box-shadow 0.15s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #1e40af);
  box-shadow: 0 16px 32px rgba(79, 70, 229, 0.75);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 9px 20px rgba(79, 70, 229, 0.6);
}

/* Meldungen */
.login-result {
  margin-top: 8px;
  min-height: 18px;
  font-size: 13px;
}

.login-result--error {
  color: #f97373;
}

.login-result--success {
  color: #4ade80;
}

/* Footer */
.login-footer {
  margin-top: 14px;
  text-align: center;
}

.login-footer small {
  font-size: 12px;
  color: #9ca3af;
}

#registerLink {
  color: #a5b4fc;
  cursor: pointer;
  text-decoration: underline;
}

#registerLink:hover {
  color: #c7d2fe;
}
