﻿*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --lang-bar-height: 3.15rem;
}

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

body {
  font-family: "Rajdhani", Tahoma, sans-serif;
  font-size: 16px;
  color: #cccccc;
  background: #000;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.video-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #000;
}

.video-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/*
 * Notebooks / flache Displays: gesamtes Video sichtbar (Logo, Helikopter …).
 * Schwarze Ränder nur dort, wo das Seitenverhältnis nicht passt – kein Abschneiden.
 */
@media (max-height: 920px), (max-width: 1400px) and (max-height: 860px) {
  .video-bg video {
    object-fit: contain;
    object-position: center top;
  }
}

/* Sehr schmale Fenster: ebenfalls vollständiges Bild */
@media (max-width: 720px) {
  .video-bg video {
    object-fit: contain;
    object-position: center top;
  }
}

/* Sprachleiste: schmal, halbtransparent – Video/Logo scheint dahinter durch */
.lang-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--lang-bar-height);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.38) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}

.lang-bar__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 1.25rem;
  height: 100%;
  padding: 0 1rem;
}

.lang-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: none;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.lang-bar__item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.lang-bar__item--active {
  color: #ffffff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 -2px 0 #e8c547;
}

.lang-bar__flag {
  width: 22px;
  height: 15px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Hauptinhalt */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4.5rem 1rem 6rem;
  /* Slogan unter dem Logo. Bei object-fit: cover und object-position: top
     endet das Logo bei etwa 20 % der größeren Videokante (Höhe oder 9/16 der Breite). */
  padding-top: max(4.5rem, 24vh, 13.5vw);
  position: relative;
  z-index: 1;
}

.promo-headline {
  margin: 0 0 1.75rem;
  max-width: 560px;
  padding: 0 0.5rem;
  text-align: center;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #fff8dc 0%, #f5e6a8 40%, #e8c547 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.95))
          drop-shadow(0 0 20px rgba(0, 0, 0, 0.7));
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-panel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 1.5rem 1.5rem 1.25rem;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1) 0%, transparent 42%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(180deg, #3a424f 0%, #252b35 18%, #1a1f28 55%, #12161e 100%);
  border: 1px solid rgba(160, 172, 188, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    0 10px 40px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -12deg,
      transparent 0,
      transparent 3px,
      rgba(255, 255, 255, 0.025) 3px,
      rgba(255, 255, 255, 0.025) 4px
    ),
    repeating-linear-gradient(
      78deg,
      transparent 0,
      transparent 11px,
      rgba(0, 0, 0, 0.04) 11px,
      rgba(0, 0, 0, 0.04) 12px
    );
  pointer-events: none;
  opacity: 0.85;
}

.auth-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, transparent 100%);
  pointer-events: none;
}

.auth-panel > * {
  position: relative;
  z-index: 1;
}

.auth-panel--register,
.auth-panel--forgot {
  background:
    linear-gradient(160deg, rgba(245, 230, 168, 0.12) 0%, transparent 45%, rgba(0, 0, 0, 0.15) 100%),
    linear-gradient(180deg, #3d3a2e 0%, #2a2820 18%, #1e1c16 55%, #141210 100%);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 180, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    0 10px 40px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(212, 160, 23, 0.15);
}

.auth-panel--animating {
  animation: authPanelPulse 0.45s ease;
}

@keyframes authPanelPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.auth-panel__heading {
  margin: 0 0 1.1rem;
  font-family: "Orbitron", sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
  color: #cccccc;
  letter-spacing: 0.1em;
  transition: color 0.4s ease, letter-spacing 0.4s ease;
}

.auth-panel--forgot .auth-mode-tabs {
  display: none;
}

.auth-panel--register .auth-panel__heading,
.auth-panel--forgot .auth-panel__heading {
  color: #e8c547;
  letter-spacing: 0.12em;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.3rem;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.auth-mode-tab {
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.65rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.auth-mode-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.auth-mode-tab--active {
  color: #2a1f00;
  background: linear-gradient(135deg, #f5e6a8 0%, #e8c547 50%, #d4a017 100%);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.35);
}

.auth-mode-tab--active:hover {
  color: #2a1f00;
  filter: brightness(1.05);
}

.auth-mode-hint {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.98rem;
  line-height: 1.5;
  text-align: center;
  color: #c8dce8;
  background: rgba(0, 136, 204, 0.1);
  border: 1px solid rgba(0, 170, 255, 0.2);
  border-radius: 6px;
}

.auth-mode-hint.hidden {
  display: none;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.auth-field__label {
  font-size: 1.08rem;
  font-weight: 600;
  color: #dddddd;
  letter-spacing: 0.03em;
}

.auth-field input {
  width: 100%;
  padding: 0.9rem 1rem;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.25rem;
  color: #003399;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 136, 170, 0.4);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  border-color: #d4a017;
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.2);
}

.auth-field input::placeholder {
  color: rgba(0, 51, 153, 0.45);
}

.auth-message {
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.95rem;
  border-radius: 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.auth-message__action {
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(232, 197, 71, 0.5);
  border-radius: 4px;
  background: rgba(232, 197, 71, 0.15);
  color: #f5e6a8;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-message__action:hover {
  background: rgba(232, 197, 71, 0.28);
  color: #ffffff;
}

.auth-message__action.hidden {
  display: none;
}

.auth-message--error {
  color: #ff8888;
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid rgba(255, 100, 100, 0.3);
}

.auth-message--info {
  color: #88ddff;
  background: rgba(0, 136, 204, 0.15);
  border: 1px solid rgba(0, 170, 255, 0.3);
}

.auth-panel__footer {
  margin-top: 1rem;
}

.auth-panel__extras {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
  transition: opacity 0.3s ease;
}

#login-extras:not(.hidden),
#register-extras:not(.hidden) {
  animation: extrasFadeIn 0.35s ease;
}

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

.auth-panel__register-prompt {
  margin: 0;
  font-size: 1.08rem;
  color: #cccccc;
  line-height: 1.55;
}

.auth-form__actions {
  display: flex;
  justify-content: center;
  margin-top: 0.15rem;
}

.auth-field-reveal,
.auth-terms-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.4s ease,
    opacity 0.35s ease,
    margin 0.4s ease;
  margin-top: 0;
}

.auth-field-reveal > *,
.auth-terms-reveal > * {
  overflow: hidden;
}

.auth-panel--register .auth-field-reveal,
.auth-panel--register .auth-terms-reveal,
.auth-panel--forgot .auth-field-reveal {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 0;
}

.auth-terms-reveal {
  margin-top: 0;
}

.auth-panel--register .auth-terms-reveal {
  margin-top: 0.15rem;
}

.auth-terms {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
  color: #aaaaaa;
}

.auth-terms a {
  color: #e8c547;
  text-decoration: none;
  font-weight: 600;
}

.auth-terms a:hover {
  color: #f5e6a8;
  text-decoration: underline;
}

.btn {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, transparent 55%);
  pointer-events: none;
}

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

.btn--gold {
  min-width: 11rem;
  padding-left: 2rem;
  padding-right: 2rem;
  background: linear-gradient(135deg, #f5e6a8 0%, #e8c547 35%, #d4a017 70%, #b8860b 100%);
  color: #2a1f00;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--gold:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(212, 160, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.auth-link {
  font-size: 1.05rem;
  color: #77ccff;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

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

.auth-link--forgot {
  color: #c8dce8;
  font-size: 1.08rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-link--forgot:hover {
  color: #ffffff;
}

.auth-link--action {
  color: #e8c547;
  font-weight: 600;
  font-size: 1.08rem;
  margin-left: 0.25rem;
}

.auth-link--action:hover {
  color: #f5e6a8;
}

/* Footer fix am unteren Rand */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(15, 15, 20, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #ffffff;
}

.site-footer p {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.75);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.6rem;
}

.site-footer__links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
}

.site-footer__links a:hover {
  color: #e8c547;
  text-decoration: underline;
}

.site-footer__links span {
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 480px) {
  :root {
    --lang-bar-height: 2.5rem;
  }

  .page {
    padding: 4rem 0.75rem 5.5rem;
  }

  .auth-panel {
    padding: 1.25rem 1rem 1rem;
  }

  .lang-bar__nav {
    gap: 0.15rem 0.85rem;
    padding: 0 0.5rem;
  }

  .lang-bar__item {
    font-size: 0.82rem;
    padding: 0.25rem 0.4rem;
  }

  .lang-bar__flag {
    width: 20px;
    height: 13px;
  }

  .auth-mode-tab {
    font-size: 0.88rem;
    padding: 0.55rem 0.35rem;
  }

  .site-footer {
    font-size: 0.78rem;
    padding: 0.6rem 0.5rem;
  }
}

/*
 * Schmale Fenster: das 16:9-Video ist ein Streifen oben.
 * Sprachleiste und Slogan bleiben außerhalb davon, das Logo im Video bleibt frei.
 * 56.25vw = Videohöhe (9/16). In der Queransicht deckelt 42vh den Abstand.
 */
@media (max-width: 900px) {
  .video-bg video {
    top: var(--lang-bar-height);
    bottom: auto;
    height: calc(100% - var(--lang-bar-height));
    object-fit: contain;
    object-position: center top;
  }

  .page {
    justify-content: flex-start;
    padding-top: calc(var(--lang-bar-height) + min(56.25vw, 42vh) + 0.75rem);
  }
}
