/* =========================================================
   Digital Den — Login Page
   Dark Cyber / Gaming Ästhetik
   ========================================================= */

:root {
  --bg-base: #0b0e14;
  --bg-card: #121824;
  --border-color: #1f293d;
  --accent: #10b981;
  --accent-hover: #14d999;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --text-primary: #f0f6fc;
  --text-muted: #94a3b8;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.1);

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-deep: 0 24px 60px -12px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.privacy-footer {
  position: relative;
  z-index: 1;
  padding: 1.25rem 1rem 2rem;
  text-align: center;
  font-size: .875rem;
}
.privacy-footer a, .auth-footer a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.privacy-footer a:focus-visible, .auth-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------
   Hintergrund: Punkt-Muster + Glow
   --------------------------------------------------------- */

.grid-backdrop {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 90%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 90%);
}

.glow-orb {
  position: fixed;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 640px;
  z-index: 0;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */

.auth-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  padding: 28px 32px 32px;
  animation: card-in 0.5s ease both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Terminal-Tag: kleines Signatur-Element im Header der Karte */
.terminal-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.55;
}

.dot-red { background: #f87171; }
.dot-yellow { background: #fbbf24; }
.dot-green { background: var(--accent); }

.terminal-path {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.auth-header {
  text-align: left;
  margin-bottom: 26px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.auth-header h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.subtext {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.accent-text {
  color: var(--accent);
  font-weight: 500;
}

/* ---------------------------------------------------------
   Formular
   --------------------------------------------------------- */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.forgot-link {
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: var(--accent);
}

.field-group input {
  width: 100%;
  background: #0d121c;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--text-primary);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-group input::placeholder {
  color: #4b5768;
}

.field-group input:hover {
  border-color: #2c3a55;
}

.field-group input:focus {
  border-color: var(--accent);
  background: #0f1520;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------------------------------------------------------
   Feedback-Bereich (Fehler / Erfolg)
   --------------------------------------------------------- */

.feedback {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  line-height: 1.4;
  animation: feedback-in 0.25s ease both;
}

.feedback[hidden] {
  display: none;
}

.feedback--error {
  background: var(--danger-soft);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger);
}

.feedback--success {
  background: var(--success-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}

@keyframes feedback-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------
   Button
   --------------------------------------------------------- */

.btn-primary {
  position: relative;
  width: 100%;
  padding: 13px 16px;
  margin-top: 4px;
  background: var(--accent);
  color: #062017;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 24px -8px rgba(16, 185, 129, 0.55);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.btn-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(6, 32, 23, 0.35);
  border-top-color: #062017;
  border-radius: 50%;
}

.btn-primary.is-loading .btn-label {
  opacity: 0.85;
}

.btn-primary.is-loading .btn-spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

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

.accent-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

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

/* ---------------------------------------------------------
   Status-Zeile unterhalb der Karte
   --------------------------------------------------------- */

.status-line {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ---------------------------------------------------------
   Barrierefreiheit & Responsive
   --------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
