/* Grundfarben und Variablen */
:root {
  --terracotta: #c46a4a;
  --cream: #f7f3e9;
  --gold: #f2d36b;
  --olive: #6b7a4a;
  --ink: #222222;
  --soft-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Reset / Basis */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Verdana", "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  transform-style: preserve-3d;
  perspective: 1200px;
  transition: transform 0.8s ease;
}
*{
    box-sizing:border-box;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff' d='M4 2h4v2h2v2h2v2h2v2h2v2h2v2h2v4h-4v-2h-2v6h-4v-8h-2v6H8V8H6V6H4z'/%3E%3Cpath fill='%23000' d='M2 0h8v2h2v2h2v2h2v2h2v2h2v2h2v8h-6v-2h-1v6H8v-8H6v6H4V10H2zm2 2v4h2v2h2v12h2v-6h4v8h2v-8h4v-2h-2v-2h-2V8h-2V6h-2V4h-2V2z'/%3E%3C/svg%3E") 4 2, pointer !important;

}


body.brainrot-3d-active {
  transform: rotateX(8deg) rotateY(-6deg) scale(1.01);
}

.brainrot-rain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9997;
}

.brainrot-image {
  position: absolute;
  top: -120px;
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.4), 0 0 24px rgba(255, 107, 107, 0.35);
  animation: brainrot-fall var(--fall-duration, 10s) cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform-style: preserve-3d;
}

  body::after {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 45;
      pointer-events: none;
      background:
        repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 1px, transparent 1px 4px),
        radial-gradient(circle at 50% 18%, rgba(255,255,255,.08), transparent 24%),
        radial-gradient(circle at 50% 80%, rgba(0,0,0,.18), transparent 46%);
      mix-blend-mode: screen;
      opacity: .42;
      animation: crt-flicker 4.5s steps(9, end) infinite;
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
      }
    }
   @keyframes mouse-pixel-fade {
      0% { opacity: 1; transform: translate(0, 0) scale(1); }
      100% { opacity: 0; transform: translate(var(--drift-x, 8px), var(--drift-y, 10px)) scale(.35); }
    }

.mouse-pixel {
  position: fixed;
  z-index: 1000;
  width: var(--pixel-size, 8px);
  height: var(--pixel-size, 8px);
  pointer-events: none;
  background: var(--pixel-color, var(--yellow));
  box-shadow: 2px 2px 0 var(--black);
  animation: mouse-pixel-fade .62s steps(5, end) forwards;
}



@keyframes brainrot-fall {
  0% {
    transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotate(0deg) scale(0.65);
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  100% {
    transform: translate3d(var(--drift), 115vh, 0) rotateX(720deg) rotateY(540deg) rotate(720deg) scale(1.16);
    opacity: 0;
  }
}


/* Dark Mode */
body.darkmode {
  background: #1e1e1e;
  color: #eeeeee;
  transition: background 0.4s ease, color 0.4s ease;
}

body.darkmode .site-header {
  background: linear-gradient(135deg, #333333, #555555);
}

body.darkmode .panel {
  background: #2a2a2a;
  border-color: #444444;
}

body.darkmode .main-nav {
  background: #333333;
}

body.darkmode a {
  color: #f2d36b;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--terracotta), var(--gold));
  color: var(--cream);
  padding: 1.5rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  cursor: pointer;
}

.title-block h1 {
  margin: 0;
  font-size: 2.4rem;
}

.subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
}

/* Dark Mode Button */
.dark-toggle {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 999px;
  background: rgba(247, 243, 233, 0.2);
  color: var(--cream);
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.3s ease, transform 0.2s ease;
}

.dark-toggle:hover {
  background: rgba(247, 243, 233, 0.4);
  transform: scale(1.05);
}

/* Navigation */
.main-nav {
  background: var(--gold);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.main-nav ul {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

/* Main Layout */
.page-main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
}

/* Panels / Sections */
.panel {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.8rem 1.6rem;
  margin-bottom: 2rem;
  border: 1px solid #e0d4c0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Fade-In Animation */
.fade {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.fade-show {
  opacity: 1;
  transform: translateY(0);
}

/* Headings */
h2 {
  margin-top: 0;
  font-size: 1.9rem;
  color: var(--terracotta);
}

h3 {
  font-size: 1.3rem;
  color: var(--olive);
}

/* Hero Images */
.hero-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-images figure {
  flex: 1 1 260px;
  margin: 0;
}

.hero-images img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
}

.hero-images figcaption {
  font-size: 0.85rem;
  margin-top: 0.4rem;
  color: #555555;
}






/* Bubble Labels */
.bubble {
  display: inline-block;
  background: var(--terracotta);
  color: var(--cream);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  margin-right: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Feature List */
.feature-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.feature-list li {
  margin-bottom: 0.6rem;
}

/* Tables */
.info-table,
.effect-table,
.brainrot-meter table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.info-table th,
.info-table td,
.effect-table th,
.effect-table td,
.brainrot-meter th,
.brainrot-meter td {
  border: 1px solid #ddd;
  padding: 0.6rem;
  text-align: left;
}

.info-table th,
.effect-table th,
.brainrot-meter th {
  background: #f2d36b;
}

/* Blockquote */
blockquote {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--terracotta);
  background: #a89e89;
  font-style: italic;
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.timeline-item {
  background: #b4ab98;
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

.timeline-year {
  display: inline-block;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 0.3rem;
}

/* Subgenres */
.subgenre-list {
  padding-left: 1.2rem;
}

.subgenre-list li {
  margin-bottom: 1.4rem;
}

.subgenre-media {
  margin-top: 0.6rem;
}

.subgenre-media img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
}

/* Quote Box */
.quote-box {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: #c1b8a4;
  border: 1px solid #f2d36b;
}

.quote-author {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #777777;
}

/* Brainrot Meter */
.brainrot-meter {
  margin-top: 1.4rem;
}

/* Links */
a {
  color: var(--olive);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Link List */
.link-list {
  padding-left: 1.2rem;
}

.link-list li {
  margin-bottom: 0.5rem;
}

/* Buttons */
button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: var(--olive);
  color: var(--cream);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  background: #556038;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

/* Easteregg Text */
.easteregg {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: #b84f4f;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  background: #bcae95;
  font-size: 0.9rem;
}

.site-footer hr {
  max-width: 600px;
  margin: 0 auto 1rem;
  border: none;
  border-top: 1px solid #d4c7b0;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .main-nav ul {
    justify-content: center;
  }

  .panel {
    padding: 1.4rem 1.2rem;
  }

  .hero-images {
    flex-direction: column;
  }
}

/* Seite bleibt hell */
body {
  background: #f5f5f5;
  color: #222;
  transition: color 0.8s ease;
}

/* Overlay für organische Infektion */
#infection-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;

  /* Mehrschichtiger organischer Noise */
  background:
    url("https://grainy-gradients.vercel.app/noise.svg"),
    radial-gradient(circle at 20% 30%, rgba(255, 200, 0, 0.4) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(255, 150, 0, 0.35) 0%, transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(255, 180, 0, 0.3) 0%, transparent 60%);

  opacity: 0;
  transform: scale(0.4);
  filter: blur(0px);
  mix-blend-mode: overlay;

  transition:
    opacity 1.6s ease-out,
    transform 1.6s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.6s ease-out;
}

/* Aktivierter organischer Befall */
body.infected #infection-overlay {
  opacity: 1;
  transform: scale(3.2);
  filter: blur(18px);
}

.popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-content {
  background: #fff;
  padding: 20px;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close {
  float: right;
  cursor: pointer;
  font-size: 1.5rem;
}

.popup-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.ad-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fff;
  border: 2px solid #ddd;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 20px auto;
}

.ad-banner img {
  width: 120px;
  height: auto;
  border-radius: 10px;
}

.ad-text h3 {
  margin: 0;
  font-size: 1.4rem;
}

.ad-text p {
  margin: 5px 0 0;
  color: #555;
}

#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: #f2f2f2;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: Arial, sans-serif;
}

#cookie-banner button {
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#cookie-ok {
  background-color: #4caf50;
  color: white;
}

#cookie-info {
  background-color: #2196f3;
  color: white;
}

/* --- Seiten-Ad Container --- */
.side-ad {
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100vh;
  background: #ffffff;
  padding: 20px;
  border-left: 2px solid #ddd;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

/* --- Schließen-Button (X) --- */
.close-side {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  z-index: 10000;
  /* WICHTIG: über allem */
  user-select: none;
}

/* --- Bild --- */
.side-ad img {
  width: 100%;
  border-radius: 10px;
  margin-top: 40px;
  /* Platz für das X */
  margin-bottom: 15px;
}

/* --- Titel --- */
.side-ad h3 {
  margin: 0;
  font-size: 1.3rem;
  text-align: center;
}

/* --- Text --- */
.side-ad p {
  text-align: center;
  color: #555;
  margin: 10px 0;
}

/* --- Button --- */
.side-ad button {
  margin-top: auto;
  padding: 12px 18px;
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease;
}

.side-ad button:hover {
  background: #e68900;
}

/* --- Mobile Optimierung --- */
@media (max-width: 600px) {
  .side-ad {
    width: 200px;
  }
}

.carousel {
  position: relative;
  width: 400px;
  /* Größe anpassen */
  height: 300px;
  overflow: hidden;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease;
}

.carousel-item {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  z-index: 10;
}

.carousel-btn.left {
  left: 10px;
}

.carousel-btn.right {
  right: 10px;
}