/* Text-Auswahl */
::selection {
  background: #2D2F36;
}
::-webkit-selection {
  background: #2D2F36;
}
::-moz-selection {
  background: #2D2F36;
}

/* Grundlegende Body-Styles */
body {
  font-family: 'Inter UI', sans-serif;
  margin: 0;
}
.page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-image: url('/static/images/candlesbackground.webp');
  background-size: cover;
  background-position: center center;
}
@media (max-width: 767px) {
  .page {
    flex-direction: column;
    height: auto;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
}

/* ======================
   Login-Container
   ====================== */
.login-container {
  display: flex;
  height: 370px;
  margin: 0 auto;
  width: 640px;
}
@media (max-width: 767px) {
  .login-container {
    flex-direction: column;
    height: 630px;
    width: 320px;
  }
}

.left {
  background: white;
  height: calc(100% - 40px);
  top: 20px;
  position: relative;   /* Anker für das absolut positionierte Widget */
  width: 50%;
}
@media (max-width: 767px) {
  .left {
    height: 100%;
    left: 20px;
    width: calc(100% - 40px);
    max-height: 270px;
  }
}

.login {
  font-size: 30px;
  font-weight: 900;
  margin: 50px 40px 40px;
}

.eula {
  color: #999;
  font-size: 14px;
  line-height: 1.5;
  margin: 40px;
}

.right {
  background: #474A59;
  box-shadow: 0px 0px 40px 16px rgba(0,0,0,0.22);
  color: #F1F1F2;
  position: relative; /* wichtig für z-index-Childs */
  width: 50%;
}
@media (max-width: 767px) {
  .right {
    flex-shrink: 0;
    height: 100%;
    width: 100%;
    max-height: 370px;
  }
}

svg {
  position: absolute;
  width: 320px;
}
/* --- FIX: SVG klick-durchlässig & hinter dem Formular halten --- */
.right svg,
.right svg * {
  pointer-events: none;
}
.right svg {
  z-index: 0;
}

path {
  fill: none;
  stroke: url(#linearGradient);
  stroke-width: 4;
  stroke-dasharray: 240 1386;
}

/* ======================
   Register-Container
   ====================== */
.register-login-container {
  display: flex;
  height: 442px;
  margin: 0 auto;
  width: 640px;
}
@media (max-width: 767px) {
  .register-login-container {
    flex-direction: column;
    height: 630px;
    width: 320px;
  }
}
.register-login-container svg {
  bottom: 0;
}
.register-login-container svg path {
  stroke-dashoffset: -2150px;
  stroke-dasharray: 240, 2150;
}

/* Formular-Styles */
.form {
  margin: 40px;
  position: absolute;
}

/* Label- und Input-Styles */
label {
  color: #c2c2c5;
  display: block;
  font-size: 14px;
  height: 16px;
  margin-top: 20px;
  margin-bottom: 5px;
}
input {
  background: transparent;
  border: 0;
  color: #f2f2f2;
  font-size: 20px;
  height: 30px;
  line-height: 30px;
  outline: none !important;
  width: 100%;
}
input::-moz-focus-inner { 
  border: 0; 
}

/* Submit-Button (Login) */
#submit {
  color: #707075;
  margin-top: 40px;
  transition: color 300ms;
}
#submit:focus {
  color: #f2f2f2;
}
#submit:active {
  color: #d0d0d2;
}

/* Submit-Button (Register) */
#register-submit {
  color: #707075;
  margin-top: 40px; /* Abstand zum vorherigen Feld */
  transition: color 300ms;
}
#register-submit:focus {
  color: #f2f2f2;
}
#register-submit:active {
  color: #d0d0d2;
}

/* ======================
   Overrides für Register & Discord-Widget
   ====================== */
/* Formular nicht absolut, damit Platz für das Widget bleibt */
.register-login-container .form {
  position: static;
  margin: 40px;
  /* --- FIX: Formular sicher über dem (absolut positionierten) SVG rendern --- */
  position: relative;
  z-index: 2;
}

/* Discord-Widget: fix am unteren Rand der weißen Box (ohne Box zu vergrößern) */
.register-login-container .discord-widget {
  position: absolute;  /* relativ zu .left */
  left: 40px;
  right: 40px;
  bottom: -20px;        /* fester Abstand zum unteren Rand */
  margin: 0;           /* kein Einfluss auf Layouthöhe */
  width: auto;         /* durch left/right definiert */
  height: 73px;        /* nur die Header-Leiste sichtbar */
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 2;
}
.register-login-container .discord-widget iframe {
  width: 100%;
  height: 250px;            /* groß genug für den Header */
  border: none;
}

/* ======================
   Overlay-Link für Invite
   ====================== */
.register-login-container .discord-widget .discord-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 73px;       /* Header-Höhe */
  z-index: 10;
  background: transparent;
  cursor: pointer;
}

/* Mobile kompakter, ohne die Box zu vergrößern */
@media (max-width: 767px) {
  .register-login-container .discord-widget {
    left: 20px;
    right: 20px;
    bottom: 20px;
    height: 60px;
  }
  .register-login-container .discord-widget .discord-overlay {
    height: 60px;
  }
}

/* === Eingabefelder rechts weiß (nur Farbe) ================== */
.right .form input:not([type="submit"]) {
  background: #ffffff !important;
  color: #111111;
}

/* Register-SVG vertikal feinjustieren – nach OBEN */
.register-login-container svg {
  transform: translateY(-18px);
}
