/* ===================================================================
   Reset (applies site-wide, gate + main site)
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, a {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ===================================================================
   GATE - hässliche Windows-Vista-Anmeldebildschirm-Parodie
   =================================================================== */
#gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vista-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, #6fa8dc 0%, #2f6cb0 28%, #1b3a6b 60%, #061226 100%);
  z-index: -1;
}

.vista-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 140vmax;
  height: 140vmax;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 30%, transparent 60%);
  filter: blur(4px);
  pointer-events: none;
}

.logon-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 88vw);
  padding: 36px 32px 28px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(255,255,255,0.38), rgba(255,255,255,0.12));
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px;
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.8) inset,
    0 25px 50px rgba(0,10,30,0.55),
    0 0 0 9999px rgba(0,0,0,0) ;
}

.logon-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 46%;
  border-radius: 14px 14px 60% 60% / 14px 14px 100% 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.55), rgba(255,255,255,0));
  pointer-events: none;
}

.user-tile {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfe3f7 55%, #9fbfe0 100%);
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 6px 14px rgba(0,20,50,0.45), inset 0 -4px 8px rgba(0,40,90,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  line-height: 1;
}

.logon-headline {
  position: relative;
  margin: 0 0 22px;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4), 0 3px 10px rgba(0,10,30,0.85);
}

.logon-field { margin-bottom: 14px; }

.logon-input {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px;
  font-family: inherit;
  border-radius: 5px;
  border: 1px solid #2a4a73;
  background: #fefefe;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.6);
  outline: none;
  touch-action: manipulation;
}
.logon-input:focus {
  border-color: #5b9bd5;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.3), 0 0 0 3px rgba(125,190,255,0.55);
}
.logon-input.shake { animation: shake 0.45s ease; }

.logon-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Glossy Web-2.0-style buttons (intentionally over-the-top) */
.btn-ugly {
  position: relative;
  min-width: 110px;
  height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 rgba(0,0,0,0.25), 0 6px 10px rgba(0,0,0,0.35);
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}
.btn-ugly:active { transform: translateY(1px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(to bottom, #a9d6ff 0%, #4c95e0 45%, #1c6bc4 46%, #0b3f81 100%);
}
.btn-secondary {
  color: #2c2c2c;
  background: linear-gradient(to bottom, #fbfbfb 0%, #dcdcdc 45%, #c4c4c4 46%, #a8a8a8 100%);
  font-weight: 500;
  min-width: 80px;
}

/* Chase-game state: button escapes across the whole viewport */
#anmelden-btn.chasing {
  position: fixed;
  z-index: 50;
  transition: left 0.22s cubic-bezier(.34,1.56,.64,1), top 0.22s cubic-bezier(.34,1.56,.64,1);
}
#anmelden-btn.boing { animation: jumpBoing 0.32s ease; }

#anmelden-btn.is-head {
  position: fixed;
  z-index: 50;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px #ffd23f, 0 10px 26px rgba(0,0,0,0.5);
  transition: left 0.5s cubic-bezier(.34,1.56,.64,1), top 0.5s cubic-bezier(.34,1.56,.64,1);
  animation: headPulse 1.4s ease-in-out infinite;
}
#anmelden-btn.is-head .head-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vista-disclaimer {
  margin: 22px 0 0;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* ===================================================================
   Hässlicher Popup-Dialog (Tipp + Fehler)
   =================================================================== */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ugly-dialog {
  width: min(360px, 86vw);
  background: #fff8d1;
  border: 4px dashed #ff9d00;
  border-radius: 4px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.55);
  transform: rotate(-1deg);
  font-family: "Comic Sans MS", "Comic Sans", cursive, "Segoe UI", sans-serif;
  overflow: hidden;
}

.ugly-dialog-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 12px;
  background: linear-gradient(to right, #ff5fa2, #ff9d00 50%, #ffd000);
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.dialog-close {
  width: 36px;
  height: 36px;
  line-height: 1;
  border: 1px outset #ddd;
  background: linear-gradient(to bottom, #fff, #ccc);
  color: #900;
  font-weight: bold;
  border-radius: 2px;
  font-size: 16px;
}

.ugly-dialog-body {
  padding: 22px 18px 8px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.dialog-icon {
  font-size: 34px;
  animation: iconWiggle 1.1s ease-in-out infinite;
  flex-shrink: 0;
}

.ugly-dialog-body p {
  margin: 0;
  font-size: 15px;
  color: #553a00;
  line-height: 1.5;
}

.ugly-dialog-footer {
  padding: 14px 18px 18px;
  display: flex;
  justify-content: flex-end;
}

.btn-95 {
  min-width: 84px;
  min-height: 44px;
  padding: 6px 16px;
  font-size: 14px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(to bottom, #f0f0f0, #d4d4d4);
  border: 2px outset #fff;
  border-radius: 2px;
  color: #222;
}
.btn-95:active { border-style: inset; }

/* ===================================================================
   Transition / "Anmeldung wird durchgeführt"
   =================================================================== */
#transition-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: radial-gradient(circle at 50% 40%, #1b3a6b 0%, #04101f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  animation: spin 0.9s linear infinite;
}

.transition-text {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* ===================================================================
   Keyframes
   =================================================================== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}

@keyframes jumpBoing {
  0% { transform: scale(1); }
  40% { transform: scale(1.18, 0.85); }
  70% { transform: scale(0.93, 1.08); }
  100% { transform: scale(1); }
}

@keyframes headPulse {
  0%, 100% { box-shadow: 0 0 0 4px #ffd23f, 0 10px 26px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 0 0 9px rgba(255,210,63,0.55), 0 10px 26px rgba(0,0,0,0.5); }
}

@keyframes iconWiggle {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

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