/* Header & Nav */
.site-header {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.8rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(90deg, #9d4edd, #00f5ff);
          background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.nav-links a {
  margin-left: 2rem;
  color: var(--clr-text);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}
.nav-links a:hover {
  color: var(--clr-accent);
}

.term-content a {
  color: var(--clr-text);
  text-decoration: none;
  filter: brightness(150%);
}

.term-content a strong {
  text-shadow: rgba(255,162,0,0.8) 0px 0px 8px;
}

.term-content sup {
  font-size-adjust: 0.4;
}

/* Footer */
.site-footer {
  margin-top: 6rem;
  padding: 3rem 0;
  text-align: center;
  background: rgba(0,0,0,0.2);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Reset & Basics */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: #0f0f18;
  color: #e0e0ff;
  line-height: 1.6;
  min-height: 100dvh;
}

/* Custom Properties – dunkles, aber frisches Neon-Design */
:root {
  --clr-bg: #0f0f18;
  --clr-surface: #1a1a2e;
  --clr-primary: #9d4edd;
  --clr-accent: #00f5ff;
  --clr-text: #e0e0ff;
  --radius: 1rem;
  --transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fade-In beim Laden */
.fade-in { 
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}
@keyframes fadeIn { to { opacity: 1; } }

/* Container */
.container {
  width: min(100% - 2rem, 80rem);
  margin-inline: auto;
  container-type: inline-size;
}


/* ============================================================= */
/* HERO – SAUBER, RESPONSIV, PERFEKT                             */
/* ============================================================= */
.hero {
  padding: 8rem 0 6rem;
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}
.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(3rem, 8cqi, 7rem);
  font-weight: 800;
  line-height: 1.1;
}
@media (max-width: 500px) {
  .hero {
    padding: 6rem 0 4rem;
  }
}
.gradient-text {
  background: linear-gradient(90deg, #9d4edd, #00f5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
  display: inline-block;
}
.hero-subtitle {
  font-size: clamp(1.2rem, 3cqi, 1.6rem);
  opacity: 0.8;
  margin: 1rem 0 2.5rem;
  line-height: 1.6;
}
/* Button bleibt unverändert – du hattest ja schon .btn-primary */
.btn-primary, .back-link {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--clr-primary);
  color: white;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(157,78,221,0.4);
}
.btn-primary:hover, .back-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(157,78,221,0.6);
}




/* Lexikon Grid – Container Queries statt Media Queries */
.lexikon-grid {
  display: grid;
  gap: 1.5rem;
  /*padding: 4rem 0;*/
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

/* Term Card – voll animiert */
.term-card {
  container-type: inline-size;
  background: var(--clr-surface);
  padding: 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--clr-text);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.term-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(157,78,221,0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.term-card:hover::before { opacity: 1; }
.term-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.term-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  color: #90484a;
  filter: brightness(1.5);
  text-shadow: rgba(144, 72, 74, 0.8) 0px 0px 8px;
  /*background: linear-gradient(90deg, #9d4edd, #00f5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;*/
}
.term-card p { margin: 0; opacity: 0.85; }
.more {
  position: absolute;
  bottom: 0.5rem;
  right: 1.5rem;
  opacity: 0;
  color: var(--clr-accent);
  font-weight: 600;
  transition: all var(--transition);
}
.term-card:hover .more { opacity: 1; transform: translateX(8px); }

/* Detail Seite */
.term-detail h1 {
  font-size: clamp(2.1rem, 5cqi, 3.5rem);
  color: #90484a;
  filter: brightness(1.5);
  text-shadow: rgba(144, 72, 74, 0.8) 0px 0px 16px;
  /*background: linear-gradient(90deg, #9d4edd, #00f5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;*/
}
.back-link { margin-top: 3rem; }

/* Footer */
footer {
  text-align: center;
  padding: 4rem 0;
  background: #0a0a12;
  font-size: 0.9rem;
  opacity: 0.7;
}





/* ============================================================= */
/* ==================== BEGRIFFS-MENÜ – FINAL =================== */
/* Desktop: klassisches Dropdown | Mobile: Vollbild-Overlay     */
/* ============================================================= */
.term-menu {
  position: relative;
  display: inline-block;
}
/* --------------------- Button --------------------- */
.menu-trigger {
  background: rgba(157,78,221,0.15);
  border: 1px solid rgba(157,78,221,0.4);
  border-radius: 8px;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--clr-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}
.menu-trigger:hover,
.term-menu:focus-within .menu-trigger {
  background: rgba(157,78,221,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(157,78,221,0.25);
}
.menu-trigger .arrow {
  font-size: 0.8em;
  transition: transform 0.22s ease;
}
.term-menu:hover .arrow,
.term-menu:focus-within .arrow {
  transform: rotate(180deg);
}
/* Unsichtbare Hover-Brücke für Desktop (verhindert Gap) */
.term-menu::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto 0;
  height: 16px;
  background: transparent;
}
/* --------------------- Desktop Dropdown --------------------- */
.menu-content {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--clr-surface);
  border: 1px solid rgba(157,78,221,0.3);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  max-height: 60vh;                /* ← Feste Höhe für Desktop */
  overflow-y: auto;                /* ← Inhalt scrollt */
  width: 340px;
  z-index: 1000;
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}
.term-menu:hover .menu-content,
.term-menu:focus-within .menu-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}


/* --------------------- Mobile Vollbild-Overlay --------------------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,20,0.98);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s;
  overscroll-behavior: contain;
  pointer-events: none;
}
.menu-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.menu-overlay-header {
  position: sticky;
  top: 0;
  background: linear-gradient(90deg, var(--clr-primary), rgba(157,78,221,0.7));
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.menu-close {
  background: none;
  border: none;
  font-size: 2.2rem;
  font-weight: 300;
  color: white;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
}
.menu-overlay-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0 3rem;
}

/* --------------------- Gemeinsame Listeneinträge --------------------- */
.letter-group {
  display: flex;
  flex-direction: column;
}
.letter-header {
  background: linear-gradient(90deg, var(--clr-primary), rgba(157,78,221,0.4));
  color: white;
  font-weight: 800;
  font-size: 1.3rem;
  padding: 0.35rem 1.6rem;
  margin: 0.3rem 0 0.1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.menu-item {
  display: block;
  padding: 0.4rem 1.8rem;
  color: var(--clr-text);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.3;
  transition: background 0.15s ease, padding-left 0.2s ease, color 0.15s ease;
  position: relative;
}
.menu-item:hover {
  background: rgba(157,78,221,0.3);
  color: white;
  padding-left: 2.4rem;
}
.menu-item.active {
  background: var(--clr-primary);
  color: white;
  font-weight: 700;
}
.menu-item.active::before {
  content: "→";
  position: absolute;
  left: 0.8rem;
}

/* --------------------- Responsive Umschaltung --------------------- */
@media (max-width: 768px) { /* MOBILE */
  .menu-content { display: none !important; }
}
@media (min-width: 769px) { /* DESKTOP */
  .menu-overlay { display: none !important; }
}



/* TERM-PAGINATION – ZENTRIERT MIT FESTEM ABSTAND */
.term-pagination {
  display: flex;
  justify-content: center;     /* horizontal zentriert */
  align-items: center;
  gap: 5rem;                   /* ← deine gewünschte feste Lücke (anpassen nach Geschmack) */
  margin: 4rem auto 2rem;
  padding: 0 1.5rem;
  font-size: 1.1rem;
  flex-wrap: wrap;             /* erlaubt Umbruch bei sehr langen Titeln */
}
/* Links – nehmen nur so viel Platz wie nötig */
.term-prev,
.term-next {
  color: var(--clr-accent);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;         /* verhindert Zeilenumbruch innerhalb des Links */
  min-width: 0;                /* erlaubt truncate */
}
/* Hover-Effekt */
.term-prev:hover,
.term-next:hover {
  color: #fff;
  transform: translateY(-3px);
}
/* MOBILE: immer untereinander, zentriert */
@media (max-width: 768px) {
  .term-pagination {
    flex-direction: column;
    gap: 2.5rem;
  }
}



/* ============================================================= */
/* BUCH-PROMO – SAUBER, RESPONSIV, KEIN LAG                     */
/* ============================================================= */
.book-promo {
  margin: 5rem auto;
  text-align: center;
}
.book-promo-title {
  font-size: clamp(1.6rem, 4cqi, 2.4rem);
  margin: 0 0 2rem;
  background: linear-gradient(90deg, #9d4edd, #00f5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.book-promo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: center;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
/* 3D-Cover – butterweich */
.book-cover-wrapper {
  perspective: 1200px;
  padding: 2rem;
}
.book-cover {
  width: 260px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  transform: translateZ(0) rotateY(-18deg) rotateX(12deg) translateY(-12px) scale(1.03);
  box-shadow: 0 40px 80px rgba(157,78,221,0.4);
  transition: transform .45s cubic-bezier(.175,.885,.32,1.275), box-shadow .45s;
  will-change: transform;
  backface-visibility: hidden;
}
.book-cover-wrapper:hover .book-cover {
  box-shadow: 0 25px 50px rgba(0,0,0,0.7);
  transform: translateZ(0) rotateY(-12deg) rotateX(8deg);
}
/* Text-Block rechts */
.book-promo-content {
  flex: 1;
  min-width: 300px;
  text-align: left;
}
.book-promo-text {
  font-size: 1.15rem;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0 0 1.5rem;
}
.book-promo-note {
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0.75rem 0 0;
}
/* Amazon-Button – 100% sofort animiert */
/* Wrapper für perfekte Zentrierung */
.amazon-cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;                    /* Abstand zwischen Button und Hinweis */
  margin-top: 1.5rem;
}
/* Amazon-Button – Logo perfekt zentriert */
.amazon-cta-btn {
  display: inline-flex;
  align-items: center;           /* vertikal zentriert */
  justify-content: center;
  gap: 14px;                     /* horizontaler Abstand */
  padding: 1rem 2.4rem;
  background: rgba(255,255,255,0.8);
  color: #221F1F;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: all .35s cubic-bezier(.175,.885,.32,1.275);
  will-change: transform, background, color, box-shadow;
  transform: translateZ(0);
  backface-visibility: hidden;
  line-height: 1;                /* wichtig für exakte Zentrierung */
  white-space: nowrap;
}
.amazon-svg {
  height: 32px;
  margin: 10px -7px 0px -6px;
}
.amazon-cta-btn:hover {
  transform: translateY(-5px) translateZ(0);
  box-shadow: 0 20px 60px rgba(255,153,0,0.6);
}
/* Hinweis direkt darunter – perfekt zentriert */
.book-promo-note {
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0;
  text-align: center;
  line-height: 1.4;
}





/* ============================================================= */
/* IMPRESSUM – PASST PERFEKT ZUM REST DER SEITE                  */
/* ============================================================= */
.impressum {
  padding: 6rem 0 8rem;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}
.impressum h1 {
  font-size: clamp(2.5rem, 5cqi, 4rem);
  margin-bottom: 3rem;
  text-align: center;
  background: linear-gradient(90deg, #9d4edd, #00f5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.impressum h2 {
  margin: 3rem 0 1rem;
  font-size: 1.5rem;
  color: var(--clr-accent);
  font-weight: 700;
}
.impressum p {
  margin: 0.8rem 0;
  opacity: 0.9;
}
.impressum a {
  color: var(--clr-accent);
  text-decoration: underline;
  transition: color var(--transition);
}
.impressum a:hover {
  color: #fff;
}
.impressum-footer {
  margin-top: 5rem;
  font-size: 0.85rem;
  opacity: 0.6;
  text-align: center;
}
/* Mobile Optimierung */
@media (max-width: 768px) {
  .impressum {
    padding: 4rem 1rem 6rem;
  }
  .impressum h2 {
    font-size: 1.35rem;
  }
}

