body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  background: black;
}

/* PRELOADER */
#preloader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  transition: opacity 0.8s ease;
}
#preloader.preloader-hidden {
  opacity: 0;
  pointer-events: none;
}
.preloader-inner { text-align:center; color:white; }
.preloader-logo-wrap {
  width:120px; height:120px; margin:0 auto 22px;
  border-radius:50%; border:2px solid rgba(255,255,255,0.6);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; box-shadow:0 0 25px rgba(255,255,255,0.15);
}
#preloader-logo {
  max-width:80%; max-height:80%;
  filter:grayscale(100%) contrast(180%);
  animation: preloader-rotate 2.8s linear infinite;
}
.preloader-text { font-size:1.1rem; opacity:0.85; letter-spacing:0.08em; }
@keyframes preloader-rotate { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

/* INTRO OVERLAY */
#intro-overlay { position:fixed; inset:0; z-index:10; }
#intro-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  filter:grayscale(100%) contrast(180%); }
.intro-ui { position:absolute; top:10vh; width:100%; text-align:center; color:white; }
.intro-text { font-size:1.4rem; text-shadow:0 0 8px black; margin-bottom:20px; }

/* Scrollbereich für die Portal-Animation */
#scroll-content {
  position: relative;
  width: 100%;
  height: 6000vh;
  overflow: visible;
  z-index: 1;
}

#animation-layer {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
}

/* Die drei Ebenen werden von GSAP skaliert */
#warp-bg,
#portal-layer,
#seemann {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#seemann {
  opacity: 0;
}

/* Browser-Scrollbar komplett ausblenden */
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
}

#scroll-hints-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.scroll-hint-floating {
  position: absolute;
  font-size: 1.1rem;
  opacity: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 1px;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255,255,255,0.35);
  transform: translate(-50%, -50%);
}

/* Intro Panel: Text + Buttons in einem Block */
#intro-panel {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 28px 14px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 22px;
  border: 1px solid rgba(255, 0, 0, 0.55);
  box-shadow: 0 0 26px rgba(255, 0, 0, 0.55);
  backdrop-filter: blur(22px);
  z-index: 6000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 90%;
}

.intro-panel-text {
  text-align: center;
  max-width: 720px;
}

.intro-title {
  margin: 0 0 4px;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-sub {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.intro-panel-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

/* Buttons im Panel */
.audio-btn {
  background: none;
  border: none;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  padding: 4px 6px;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
}

.audio-btn:hover {
  transform: translateY(-2px) scale(1.06);
  filter: drop-shadow(0 0 8px rgba(0, 234, 255, 0.9));
  opacity: 1;
}

.audio-btn .icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: inline-block;
  position: relative;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.7);
}

.icon-audio-on::before,
.icon-audio-off::before,
.icon-home::before,
.icon-fullscreen::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, #000000, #ffffff 70%);
}

.audio-btn .label {
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}

/* Mobile Anpassungen für Intro-Panel */
@media (max-width: 800px) {
  #intro-panel {
    bottom: 26px;
    padding: 12px 16px 10px;
  }
  .intro-title {
    font-size: 0.9rem;
  }
  .intro-sub {
    font-size: 0.78rem;
  }
}

@media (max-width: 600px) {
  #intro-panel {
    bottom: 20px;
    max-width: 96%;
  }
  .intro-panel-buttons {
    gap: 12px;
  }
  .audio-btn {
    font-size: 0.6rem;
  }
}
/* WHITE FLASH OVERLAY FÜR PORTAL → GAME */
#portal-flash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 9000;
}

/* GAME CONTAINER: initial unsichtbar, wird per JS aktiviert */
.game-container {
  position: relative;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.8s ease;
}

.game-container.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}


/* Cinematic Mystic Sin-City Effekt */
.cine-mystic-pulse {
  position: fixed;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  background:
    radial-gradient(circle at center,
      rgba(255,255,255,0.7),
      rgba(255,40,60,0.65) 40%,
      rgba(0,0,0,0.96) 80%);
  mix-blend-mode: screen;
  filter: saturate(170%) contrast(150%);
  opacity: 0;
}
