/* Schrift und Farben */
body {
  background: linear-gradient(135deg, #0e0020, #1b0040, #350075);
  background-size: 400% 400%;
  animation: bgshift 15s ease infinite;
  font-family: "VT323", monospace;
  color: #ffdfff;
  margin: 0;
}

@keyframes bgshift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Header */
.intro-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 60px;
  gap: 30px;
  margin-bottom: 60px;
}

.intro-mascot {
  width: 230px;
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.04); filter: brightness(1.2); }
  100% { transform: scale(1); filter: brightness(1); }
}

.intro-text h1 {
  font-size: 30px;
  margin-bottom: 10px;
  text-shadow: none;
}

.intro-text p {
  font-size: 17px;
  opacity: 0.85;
  margin-top: 0;
}

.intro-title {
  font-size: 32px;
  margin-bottom: 10px;
  text-shadow: none;
  display: flex;
  align-items: center;
  gap: 15px;
}

.title-logo {
  height: 130px;
  transform: translateY(3px);
}

/* Navigation */
.main-nav {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.main-nav a {
  color: #9ff8ff;
  text-decoration: none;
  font-size: 20px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
  position: relative;
  overflow: visible;
}

.main-nav a {
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.9;

  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 4px;
}

.main-nav a:hover {
  border-bottom-color: transparent;
  color: #fff066;
}


.main-nav a::before,
.main-nav a::after {
  content:'';
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
}

.main-nav a:hover::before {
  animation: sparkle1 0.6s forwards;
}

.main-nav a:hover::after {
  animation: sparkle2 0.6s forwards;
}

@keyframes sparkle1 {
  0%   { transform: translate(0,0) scale(0); opacity:1; }
  50%  { transform: translate(-10px,-10px) scale(1); opacity:0.8; }
  100% { transform: translate(-10px,-10px) scale(0); opacity:0; }
}

@keyframes sparkle2 {
  0%   { transform: translate(0,0) scale(0); opacity:1; }
  50%  { transform: translate(12px,-8px) scale(1); opacity:0.8; }
  100% { transform: translate(12px,-8px) scale(0); opacity:0; }
}

@keyframes glitch {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-2px,2px); }
  40%  { transform: translate(2px,-2px); }
  60%  { transform: translate(-1px,1px); }
  80%  { transform: translate(1px,-1px); }
  100% { transform: translate(0,0); }
}

.main-nav a:hover {
  animation: glitch 0.3s ease-in-out forwards, weirdMove 0.5s ease forwards;
}

/* Hint */
.door-hint {
  position: relative;
  z-index: 3;
  text-align: center;
  margin-top: 100px;
  font-family: "VT323", monospace;
  font-size: 12px;
  opacity: 0.55;
  color: rgba(255, 223, 255, 0.6);
  transition: opacity 1.2s ease;
  pointer-events: none;
  min-height: 1.2em;
}

/* Punkte */
.sparkles .dot {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  opacity: 0.8;
  animation: float 5s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.sparkles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;  /* oder 0 oder 2 je nachdem, was sichtbar sein soll */
}

.dot.pink { top: 10%; left: 20%; }
.dot.yellow { top: 40%; left: 80%; }
.dot.blue { top: 75%; left: 30%; }
.dot.orange { top: 60%; left: 60%; }

/* Content */
.parts-container {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 500px;
  margin: 50px auto 100px;
  overflow: visible;
}

.part {
  position: absolute;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.part img {
  width: 350px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.part.focused img:hover {
  transform: scale(1) rotate(0deg) !important;
  filter: drop-shadow(0 0 10px #fff066) !important;
}

.part:hover img {
  transform: scale(1.2) rotate(-5deg);
  filter: drop-shadow(0 0 10px #fff066);
}

@keyframes floatRotate {
  0%   { transform: translate(0,0) rotate(0deg); }
  25%  { transform: translate(10px,-5px) rotate(10deg); }
  50%  { transform: translate(-10px,10px) rotate(-5deg); }
  75%  { transform: translate(5px,-10px) rotate(7deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}

.info-box {
  position: absolute;
  top: 50%;
  left: calc(53% + 140px);
  transform: none;
  width: 260px;

  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 200, 255, 0.3);
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  color: #ffdfff;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.info-box.active {
  opacity: 1;
  pointer-events: auto;
}

.part.focused {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%) scale(1.8) rotate(0deg) !important;
  z-index: 1000;
  transition: transform 0.6s ease;
}

.part {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.part.dimmed {
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

/* Footer */
.liminal-zone {
  position: relative;
  margin-top: 6rem;
  padding: 3rem 1.5rem 4rem;
}

.liminal-inner {
  padding-top: 4rem;
}

body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.35) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,200,255,0.25) 1px, transparent 1px);
  background-size: 80px 80px, 130px 130px;
  background-position: 0 0, 40px 60px;
  opacity: 0.35; /* gleiche Stärke wie Footer */
  mix-blend-mode: screen;
  pointer-events: none;
  animation: sparkle-move 40s linear infinite;
  z-index: 2;
}

.intro-container,
.main-nav,
.parts-container,
.info-box,
.liminal-zone,
.sound-toggle {
  position: relative;
  z-index: 3;
}

.liminal-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.liminal-columns {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 0 auto 2rem;
  z-index: 1;
}

.liminal-block {
  width: 100%;
  max-width: 260px;
  padding: 1.4rem 1.3rem;
  text-align: center;
  background: rgba(10, 5, 25, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 10px 35px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  transform: translateY(0);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.liminal-block.diary-block {
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.liminal-block:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 16px 45px rgba(0, 0, 0, 0.9);
}

.liminal-block h2 {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffd6ff;
  text-shadow: 0 0 6px #fff066;
}

.liminal-block p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: left;
}

.liminal-tagline {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.diary-block {
  font-family: "Comic Sans MS", "Comic Sans", system-ui, sans-serif;
}

.diary-text {
  font-size: 0.85rem;
  line-height: 1.5;
}

.diary-tag {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.75;
}

.diary-card {
  position: relative;
  width: 260px;
  margin: 1rem auto;
}

.diary-image {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.diary-overlay {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.3;
  font-family: "VT323", monospace;
  color: #fff;
  text-shadow: 0 0 5px #000;
  pointer-events: none;
}

.diary-title {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  font-size: 1rem;
  color: #ffd6ff;
  text-shadow: 0 0 6px rgba(0,0,0,0.6);
  pointer-events: none;
  font-family: "VT323", monospace;
  letter-spacing: 0.1em;
  text-transform: lowercase;
}

.diary-block:hover {
  transform: none;
  box-shadow: none;
}

.liminal-footer {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 0.8rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  opacity: 0.9;
  text-align: center;
}

.liminal-footer .credits,
.liminal-footer .links,
.glitch-message {
  flex-basis: 100%;
}

.liminal-footer .links {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  justify-content: center;
}

.liminal-footer a {
  color: #ffd6ff;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 214, 255, 0.5);
}

.liminal-footer a:hover {
  border-bottom-style: solid;
}

.glitch-message {
  margin-top: 0.4rem;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #ffb3ff;
  text-shadow:
    1px 0 rgba(255, 255, 0, 0.9),
    -1px 0 rgba(255, 60, 0, 0.9);
  cursor: crosshair;
  transition: transform 120ms ease-out, filter 120ms ease-out;
}

.glitch-message.glitch-active {
  animation: glitch-shake 0.3s steps(2, end);
  filter: hue-rotate(20deg) brightness(1.2);
}

@keyframes glitch-shake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-2px, 0); }
  80% { transform: translate(2px, 1px); }
  100% { transform: translate(0, 0); }
}

@media (max-width: 600px) {
  .liminal-zone {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Background Sound */
.sound-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  padding: 0;
  border: none;
  background: none;
  z-index: 20;
}

.sound-icon {
  width: 100px;
  height: auto;
  display: block;
}

.sound-icon[src*="EarOn"] {
  transform: translateX(13px);
}

.sound-icon[src*="EarOff"] {
  transform: translateX(0);
}

/* Rahmen */
body::after {
  content: "";
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 92vw);
  bottom: 40px;

  background: radial-gradient(
    circle at top,
    rgba(10, 5, 30, 0.96),
    rgba(3, 0, 12, 0.98)
  );
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 40px rgba(0, 0, 0, 0.8),
    0 0 35px rgba(255, 255, 150, 0.08);
  pointer-events: none;
  z-index: 1;
}
