:root {
  --eon-red: #EA0016;
  --eon-red-dark: #c50013;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
}

/* =====================
   LOGIN PAGE
   ===================== */

body.login-page {
  background-color: var(--eon-red);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.star {
  position: fixed;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  pointer-events: none;
  animation: starDrift linear infinite;
}

@keyframes starDrift {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    transform: translateX(-200vw);
    opacity: 0;
  }
}

.login-form {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.login-form input[type="password"] {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 10px;
  color: #fff;
  font-size: 1.1rem;
  padding: 13px 22px;
  width: 290px;
  outline: none;
  transition: border-color 0.25s;
  text-align: center;
  letter-spacing: 0.15em;
}

.login-form input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

.login-form input[type="password"]:focus {
  border-color: rgba(255, 255, 255, 0.95);
}

.login-form input[type="password"].error {
  border-color: #ffe000;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-9px); }
  40%       { transform: translateX(9px); }
  60%       { transform: translateX(-6px); }
  80%       { transform: translateX(6px); }
}

.login-form button {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 0;
  width: 290px;
  cursor: pointer;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s;
}

.login-form button:hover {
  background: #1a1a1a;
}

.login-form button:active {
  transform: scale(0.97);
}

/* =====================
   ENERGY CANVAS
   ===================== */

#energyCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* =====================
   MAIN PAGE
   ===================== */

body.main-page {
  background: #f8f7f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 80px;
  min-height: 100%;
  font-family: 'Georgia', 'Times New Roman', serif;
}

.main-text {
  max-width: 680px;
  width: 100%;
  color: #1c1c1e;
  margin-bottom: 52px;
  position: relative;
  z-index: 1;
  background: rgba(248, 247, 244, 0.4);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  border-radius: 18px;
  padding: 40px 48px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
}

.main-text h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--eon-red);
  margin-bottom: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.main-text p {
  font-size: 1.08rem;
  line-height: 1.9;
  margin-bottom: 20px;
  color: #2c2c2e;
}

.main-text p:last-child {
  margin-bottom: 0;
}

.btn-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-bottom: 80px;
}

.surprise-btn {
  background: var(--eon-red);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 15px 40px;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 5px 18px rgba(234, 0, 22, 0.38);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.surprise-btn:hover {
  background: var(--eon-red-dark);
  box-shadow: 0 7px 22px rgba(234, 0, 22, 0.5);
}

.surprise-btn:active {
  transform: scale(0.97);
}

/* =====================
   MODAL
   ===================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 88vw;
  padding: 10px;
}

.modal-img-wrap {
  border-radius: 50%;
  transform: scale(0.04);
  filter: blur(14px);
  overflow: hidden;
  line-height: 0;
  transition:
    transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-radius 0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.55s ease 0.05s;
}

.modal-img-wrap.bloomed {
  border-radius: 10px;
  transform: scale(1);
  filter: blur(0px);
}

.modal-img {
  max-width: 82vw;
  max-height: 64vh;
  object-fit: contain;
  display: block;
}

.modal-text {
  max-width: 640px;
  width: 100%;
  color: #fff;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  line-height: 1.78;
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease 0.55s, transform 0.45s ease 0.55s;
}

.modal-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.modal-close {
  position: fixed;
  top: 18px;
  right: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  z-index: 101;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.1);
}

.modal-empty {
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 1rem;
  text-align: center;
  padding: 50px 20px;
  line-height: 1.6;
}

/* =====================
   KINDERBUENO ANIMATION
   ===================== */

.kb-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;   /* versteckt Bild + Inhalt bis Button geklickt wird */
}

.kb-overlay.active {
  pointer-events: all;
  visibility: visible;
}

.kb-container {
  position: fixed;
  left: 50%;
  top: 46%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.kb-img {
  max-width: 58vw;
  max-height: 55vh;
  object-fit: contain;
  display: block;
}

.kb-text {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  font-style: normal;
  color: #1c1c1e;
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  background: rgba(248, 247, 244, 0.80);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 10px 28px;
  border-radius: 10px;
}

.kb-text.visible {
  opacity: 1;
}

.kb-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 300;
  color: #000;
  cursor: pointer;
  opacity: 0;
  line-height: 1;
  padding: 6px;
  transition: opacity 0.4s ease;
  z-index: 201;
}

.kb-close.visible {
  opacity: 0.65;
}

.kb-close:hover {
  opacity: 1;
}

/* =====================
   SIGNATUR
   ===================== */

.signatur {
  margin-top: 8px;
  font-style: italic;
  color: #555;
}

/* =====================
   RESPONSIVE (MOBIL)
   ===================== */

@media (max-width: 600px) {
  body.main-page {
    padding: 32px 16px 56px;
  }

  .main-text {
    padding: 28px 22px;
    border-radius: 14px;
  }

  .main-text h1 {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  .main-text p {
    font-size: 1rem;
    line-height: 1.8;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .surprise-btn {
    padding: 14px 24px;
    font-size: 1rem;
  }

  .kb-img {
    max-width: 90vw;
    max-height: 50vh;
  }

  .kb-text {
    white-space: normal;
    font-size: 1.2rem;
    padding: 0 16px;
  }

  .modal-img {
    max-width: 94vw;
    max-height: 60vh;
  }
}
