/* /assets/true.css */

/* ==========================================================================
   01. FARBPALETTE & BASIS-VARIABLEN
   ========================================================================== */
:root {
  --primary-blue: #00334e;
  --primary-gold: #d4af37;
  --bg-color: #f9f7f1;
  --text-color: #2c3e50;

  /* Dezente moderne Flächen */
  --surface-1: rgba(255, 255, 255, 0.82);
  --surface-2: rgba(248, 250, 252, 0.78);
  --surface-3: rgba(240, 246, 250, 0.70);
  --stroke: rgba(0, 51, 78, 0.10);
  --stroke-strong: rgba(0, 51, 78, 0.18);

  /* Schatten */
  --shadow-sm: 0 8px 22px rgba(10, 40, 60, 0.08);
  --shadow-md: 0 14px 34px rgba(10, 40, 60, 0.10);

  /* Abstand, damit die Autorencards nicht unter das schwebende Banner rutschen */
  --authors-grid-top: 78px;
}

/* ==========================================================================
   02. GLOBALE RESETS & GRUNDLAYOUT
   ========================================================================== */
html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  -webkit-tap-highlight-color: transparent;
}

* {
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent;
}

/* Wortumbruch für Texte */
.author-name, .book-item div, .suggestion-item, .author-link {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

#modalTitle {
  padding-right: 35px; 
  word-break: normal; 
  overflow-wrap: break-word;
}

*:focus:not(:focus-visible) {
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none; 
}

body {
  margin: 0;
  padding: 20px;
  font-family: 'Patrick Hand', cursive;
  background-color: var(--bg-color);
  background-image:
    radial-gradient(1200px 600px at 10% 0%, rgba(212, 175, 55, 0.10), rgba(0, 0, 0, 0) 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(0, 51, 78, 0.10), rgba(0, 0, 0, 0) 60%),
    linear-gradient(rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.50)),
    url('/data/background.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-color);
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; 
  position: relative;
  scroll-behavior: smooth;
}

/* COMMUNITY SEITE FIX: Nur auf der Community-Seite das Scrollen vom Body unterbinden */
body.community-layout {
  height: 100%;
  overflow: hidden;
  background-color: transparent;
  padding: 0;
}
html.community-layout {
  height: 100%;
  overflow: hidden;
  background-color: transparent;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  margin-top: 30px;
}

/* ==========================================================================
   03. KARTEN (CARDS) & SLOGANS
   ========================================================================== */
.card-style {
  background: linear-gradient(135deg, rgba(224, 234, 240, 0.92) 0%, rgba(251, 246, 232, 0.92) 100%);
  border: 1px solid var(--stroke);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  padding: 25px;
  margin-bottom: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.3s ease;
  overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); 
}

@media (hover: hover) {
  .card-style:hover {
    border-color: var(--stroke-strong);
    box-shadow: var(--shadow-md);
  }
}

.page-card {
  padding: 30px;
  margin-bottom: 0;
  position: relative;
  overflow: visible;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 252, 255, 0.85));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-md);
}

.slogan-card {
  padding: 15px 40px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-left: 5px solid var(--primary-gold);
  background: linear-gradient(135deg, rgba(224, 234, 240, 0.95) 0%, rgba(251, 246, 232, 0.95) 100%);
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 26px rgba(10, 40, 60, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.slogan-text { font-size: 1.5rem; text-align: center; margin: 0; }
.slogan-text .blue { color: var(--primary-blue); font-weight: bold; }
.slogan-text .gold { color: var(--primary-gold); font-weight: bold; }

/* ==========================================================================
   04. HEADER & LOGO
   ========================================================================== */
.header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100px;
  padding: 0 40px;
  border-bottom: 3px solid var(--primary-gold);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.70));
  border: 1px solid var(--stroke);
  box-shadow: 0 12px 28px rgba(10, 40, 60, 0.10);
  position: relative;
  z-index: 10;
  overflow: visible;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.logo-wrapper {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-logo {
  height: 420px;
  width: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
  margin-top: -10px;
  margin-left: -50px;
  margin-bottom: 0;
  object-fit: contain;
  filter: drop-shadow(5px 10px 10px rgba(0, 0, 0, 0.15));
  position: relative;
  z-index: 20;
}
@media (hover: hover) {
  .brand-logo:hover { transform: scale(1.02); }
}

.nav-buttons {
  display: flex;
  gap: 15px;
  margin-left: auto;
  z-index: 50;
}

.nav-btn {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.05rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 248, 250, 0.70));
  border: 1px solid rgba(0, 51, 78, 0.35);
  color: rgba(0, 51, 78, 0.95);
  padding: 8px 18px;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  cursor: pointer;
  user-select: none; 
  -webkit-user-select: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(10, 40, 60, 0.10);
  filter: saturate(0.88);
}
@media (hover: hover) {
  .nav-btn:hover {
    background: rgba(212, 175, 55, 0.28);
    border-color: rgba(212, 175, 55, 0.65);
    color: rgba(0, 51, 78, 0.98);
    transform: translateY(-1px);
  }
}

/* ==========================================================================
   05. VIEW SWITCHER (NEU)
   ========================================================================== */
.view-switcher-container {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
  margin-top: 10px;
  position: relative;
  z-index: 40;
}

.view-switcher {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 248, 250, 0.8));
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px;
  display: inline-flex;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}

.switcher-btn {
  background: transparent;
  border: none;
  padding: 10px 30px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 999px;
  color: var(--primary-blue);
  transition: all 0.3s ease;
  user-select: none;
  outline: none;
}

.switcher-btn:hover {
  background: rgba(0, 51, 78, 0.05);
}

.switcher-btn.active {
  background: var(--primary-gold);
  color: white;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* ==========================================================================
   06. SUCHE & FILTER
   ========================================================================== */
.mobile-filter-toggle {
  display: none; 
  width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 246, 250, 0.85));
  border: 2px solid var(--primary-gold); 
  color: var(--primary-blue);
  padding: 12px 20px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.25rem;
  font-weight: bold;
  border-radius: 15px;
  cursor: pointer;
  margin-top: 20px;
  margin-bottom: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(10, 40, 60, 0.08);
  transition: all 0.2s ease;
}
.mobile-filter-toggle.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--primary-blue);
}

.search-filter-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-top: 20px;
  position: relative;
  z-index: 30;
}
.search-filter-container .card-style { min-width: 0; }

.search-input {
  width: 100%;
  padding: 10px 15px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  outline: none;
  color: var(--primary-blue);
  transition: border-color 0.25s, box-shadow 0.25s;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 248, 250, 0.72));
}
.search-input:focus {
  border-color: rgba(212, 175, 55, 0.9);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

/* ==========================================================================
   07. GENRES
   ========================================================================== */
.genre-top-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}
.selected-genres-area { display: flex; gap: 6px; flex-wrap: wrap; }

.selected-tag {
  background: rgba(0, 51, 78, 0.88);
  color: rgba(255, 255, 255, 0.95);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(10, 40, 60, 0.12);
  transition: 0.2s ease;
  user-select: none;
}
@media (hover: hover) {
  .selected-tag:hover { background: rgba(192, 57, 43, 0.9); }
}
.selected-tag .tag-x { font-size: 1.1rem; line-height: 1; }

.genre-scroll-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  position: relative;
}
.genre-scroll-row::before,
.genre-scroll-row::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26px;
  pointer-events: none;
  z-index: 2;
}
.genre-scroll-row::before {
  left: 0;
  background: linear-gradient(90deg, rgba(250, 252, 255, 0.98), rgba(250, 252, 255, 0));
  border-radius: 999px;
}
.genre-scroll-row::after {
  right: 46px;
  background: linear-gradient(270deg, rgba(250, 252, 255, 0.98), rgba(250, 252, 255, 0));
  border-radius: 999px;
}

.genre-scroll-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 12px;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 248, 250, 0.68));
  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.8) transparent;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}
.genre-scroll-list::-webkit-scrollbar { height: 8px; }
.genre-scroll-list::-webkit-scrollbar-thumb {
  background-color: rgba(212, 175, 55, 0.75);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
}
.genre-scroll-list::-webkit-scrollbar-track { background: transparent; }

.genre-pill {
  padding: 7px 14px;
  border: 1px solid rgba(0, 51, 78, 0.28);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
  user-select: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 248, 250, 0.72));
  color: rgba(0, 51, 78, 0.95);
  scroll-snap-align: start;
  box-shadow: 0 8px 16px rgba(10, 40, 60, 0.08);
}
@media (hover: hover) {
  .genre-pill:hover {
    transform: translateY(-1px);
    background: rgba(0, 51, 78, 0.08);
    border-color: rgba(0, 51, 78, 0.40);
  }
}
.genre-pill.active {
  background: rgba(212, 175, 55, 0.26);
  border-color: rgba(212, 175, 55, 0.70);
}
.genre-pill.not-available {
  opacity: 0.45;
  border-style: dashed;
}
@media (hover: hover) {
  .genre-pill.not-available:hover { opacity: 0.7; }
}

.show-all-btn {
  background: rgba(212, 175, 55, 0.82);
  color: rgba(255, 255, 255, 0.95);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 10px 20px rgba(10, 40, 60, 0.12);
  transition: 0.2s ease;
  z-index: 3;
}
@media (hover: hover) {
  .show-all-btn:hover { transform: translateY(-1px); filter: saturate(0.95); }
}

/* ==========================================================================
   08. TAGESAUTOREN BANNER
   ========================================================================== */
.daily-authors-banner {
  width: 100%;
  position: relative;
  height: 88px;
  margin: 6px 0 6px 0;
  display: flex;
  justify-content: center;
  overflow: visible;
  z-index: 6;
}
.daily-authors-banner img {
  position: absolute;
  left: 50%;
  top: -142px;
  transform: translateX(-50%);
  height: 460px;
  width: min(1120px, 96%);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 16px 28px rgba(10, 40, 60, 0.14));
  opacity: 0.98;
}

/* ==========================================================================
   09. GRID (Startseite)
   ========================================================================== */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: var(--authors-grid-top);
  position: relative;
  z-index: 25;
}

.author-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stroke);
  cursor: pointer;
  height: 100%;
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(224, 234, 240, 0.92) 0%, rgba(251, 246, 232, 0.92) 100%);
  box-shadow: 0 10px 26px rgba(10, 40, 60, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.3s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

@media (hover: hover) {
  .author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(10, 40, 60, 0.14);
    border-color: var(--stroke-strong);
    background: linear-gradient(135deg, rgba(214, 226, 235, 0.98) 0%, rgba(247, 238, 215, 0.98) 100%);
  }
}

.author-img-placeholder,
.author-profile-img {
  width: 100%;
  height: 350px;
  background: linear-gradient(180deg, rgba(230, 242, 248, 0.95), rgba(240, 246, 250, 0.85));
  border-radius: 12px;
  margin-bottom: 15px;
  display: block;
  color: var(--primary-blue);
  font-size: 1.5rem;
  opacity: 0.98;
  object-fit: cover;
  border: 1px solid rgba(0, 51, 78, 0.08);
}
.author-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-name {
  margin: 0 0 10px 0;
  font-size: 1.6rem;
  border-bottom: 2px solid var(--primary-gold);
  display: inline-block;
  width: fit-content;
  color: var(--primary-blue);
}
.author-bio {
  font-size: 1.1rem;
  line-height: 1.4;
  color: #4b5963;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* -------------------- GRID FÜR DIE ALLE-AUTOREN-SEITE (trueall.php) -------------------- */
.authors-grid-all {
  display: grid;
  grid-template-columns: repeat(5, 1fr); 
  gap: 25px;
  margin-top: var(--authors-grid-top);
  position: relative;
  z-index: 25;
}

.authors-grid-all .author-img-placeholder,
.authors-grid-all .author-profile-img {
  height: auto;
  aspect-ratio: 1 / 1; 
  margin-bottom: 10px;
}

@media (max-width: 1200px) { .authors-grid-all { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .authors-grid-all { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .authors-grid-all { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
  }
  .authors-grid-all .author-name {
    font-size: 1.15rem; 
    margin-bottom: 5px;
  }
  .authors-grid-all .author-bio {
    font-size: 0.95rem; 
    -webkit-line-clamp: 2; 
  }
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
footer {
  margin-top: 50px;
  text-align: center;
  padding: 28px 0 40px 0;
  color: var(--text-color);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 248, 250, 0.70));
  border-top: 1px solid rgba(0, 51, 78, 0.12);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(10, 40, 60, 0.10);
  margin-bottom: 0;
}

.footer-links {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-btn {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.05rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 248, 250, 0.70));
  border: 1px solid rgba(0, 51, 78, 0.35);
  color: rgba(0, 51, 78, 0.95);
  padding: 8px 18px;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(10, 40, 60, 0.10);
  filter: saturate(0.88);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
}
@media (hover: hover) {
  .footer-btn:hover {
    background: rgba(212, 175, 55, 0.28);
    border-color: rgba(212, 175, 55, 0.65);
    color: rgba(0, 51, 78, 0.98);
    transform: translateY(-1px);
  }
}

/* ==========================================================================
   11. MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 40, 60, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none; 
  justify-content: center;
  align-items: center; 
  z-index: 9999 !important;
  padding: 20px; 
  -webkit-overflow-scrolling: touch;
}

.info-card {
  border: 1px solid rgba(212, 175, 55, 0.55);
  position: relative;
  width: min(900px, 100%); 
  max-height: 85vh; 
  overflow-y: auto; 
  margin: auto; 
  background: linear-gradient(135deg, rgba(235, 244, 250, 0.98) 0%, rgba(253, 245, 225, 0.96) 100%);
  padding: 30px;
  border-radius: 15px;
  animation: popUp 0.3s ease-out;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
}

.info-card.wide-modal { max-width: 900px; }
@media (min-width: 901px) {
  .info-card.wide-modal { max-width: 1100px; }
}

@keyframes popUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.close-modal {
  position: sticky;
  top: 0;
  float: right; 
  margin-top: -10px; 
  margin-right: -10px;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Patrick Hand', cursive;
  color: var(--primary-blue);
  z-index: 100;
  padding: 5px 15px; 
}

.logo-modal-content { text-align: center; }
.logo-large { max-width: 100%; height: auto; margin-bottom: -80px; }

.author-profile-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-top: 20px;
  position: relative;
}

.social-icons-container {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}
.social-icon {
  width: 38px;
  height: 38px;
  background: rgba(0, 51, 78, 0.90);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: 0.25s ease;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}
.social-icon svg { width: 20px; height: 20px; fill: rgba(255, 255, 255, 0.95); }
@media (hover: hover) {
  .social-icon:hover {
    background: rgba(212, 175, 55, 0.88);
    transform: translateY(-1px);
  }
}

.book-preview-list { display: flex; gap: 14px; flex-wrap: wrap; }
.book-item { width: 120px; cursor: pointer; text-align: center; }
.book-cover-small {
  width: 120px;
  height: 170px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(240, 240, 240, 0.95);
  background-position: center;
  background-size: cover;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.10);
  margin-bottom: 6px;
}

.book-detail-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}
.book-detail-cover {
  width: 260px;
  height: 360px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(240, 240, 240, 0.95);
  background-position: center;
  background-size: cover;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   12. DASHBOARD & FORMS
   ========================================================================== */
.dashboard-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-top: 40px;
  position: relative;
  z-index: 30;
}

.profile-wrapper, .settings-wrapper, .books-wrapper {
  min-width: 0;
  max-width: 100%;
}

.profile-edit-section { display: flex; flex-direction: column; gap: 20px; }

.profile-image-wrapper {
  position: relative;
  width: 150px;
  height: 200px;
  margin: 0 auto;
  border-radius: 15px;
  overflow: hidden;
  border: 3px solid rgba(212, 175, 55, 0.80);
  background: linear-gradient(180deg, rgba(230, 242, 248, 0.95), rgba(245, 250, 255, 0.85));
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(10, 40, 60, 0.10);
}
.profile-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.profile-image-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 51, 78, 0.62);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s;
  font-size: 0.9rem;
  text-align: center;
  padding: 5px;
}
@media (hover: hover) {
  .profile-image-wrapper:hover .profile-image-overlay { opacity: 1; }
}

.form-group { margin-bottom: 15px; position: relative; }
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--primary-blue);
}

.form-input,
.form-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box; 
  padding: 10px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  outline: none;
  transition: all 0.25s ease;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 248, 250, 0.78));
}
.form-input:focus,
.form-textarea:focus {
  border-color: rgba(0, 51, 78, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 51, 78, 0.12);
}
.form-textarea { height: 120px; resize: vertical; }

.submit-btn,
.action-btn {
  background-color: rgba(0, 51, 78, 0.90);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 9px 16px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.15rem;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.25s ease;
  width: 100%;
  box-shadow: 0 10px 22px rgba(10, 40, 60, 0.12);
  filter: saturate(0.88);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .submit-btn:hover,
  .action-btn:hover {
    background-color: rgba(212, 175, 55, 0.82);
    transform: translateY(-1px);
  }
}
.secondary-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(245, 248, 250, 0.68));
  border: 1px solid rgba(0, 51, 78, 0.30);
  color: rgba(0, 51, 78, 0.95);
}
@media (hover: hover) {
  .secondary-btn:hover { background: rgba(0, 51, 78, 0.10); }
}

.btn-small { width: auto; font-size: 1rem; padding: 5px 15px; display: inline-block; }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(0, 51, 78, 0.55);
  color: rgba(0, 51, 78, 0.95);
}
@media (hover: hover) {
  .btn-outline:hover { background: rgba(0, 51, 78, 0.10); color: rgba(0, 51, 78, 1); }
}

.book-edit-card {
  border: 1px dashed rgba(0, 0, 0, 0.18);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  position: relative;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, rgba(224, 234, 240, 0.92) 0%, rgba(251, 246, 232, 0.92) 100%);
  box-shadow: 0 10px 26px rgba(10, 40, 60, 0.10);
  width: 100%; 
  max-width: 100%;
  overflow: hidden; 
}
.book-edit-card.minimized {
  border: 1px solid rgba(212, 175, 55, 0.70);
  background: linear-gradient(180deg, rgba(249, 255, 249, 0.88), rgba(255, 255, 255, 0.74));
}

.book-covers-area { display: flex; gap: 15px; margin-top: 10px; }

.cover-upload-box {
  width: 100px;
  height: 150px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 248, 250, 0.76));
  border: 1px solid rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 10px;
  color: #666;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 18px rgba(10, 40, 60, 0.10);
}
@media (hover: hover) {
  .cover-upload-box:hover {
    background: rgba(230, 240, 245, 0.95);
    color: var(--primary-blue);
    transform: translateY(-1px);
  }
}

.genre-suggestions {
  position: absolute;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 250, 0.88));
  border: 1px solid rgba(0, 0, 0, 0.14);
  width: 100%;
  max-height: 150px;
  overflow-y: auto;
  z-index: 100;
  border-radius: 12px;
  display: none;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.12);
}
.suggestion-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
@media (hover: hover) {
  .suggestion-item:hover {
    background-color: rgba(230, 240, 245, 0.85);
    color: var(--primary-blue);
  }
}

.selected-genre-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 51, 78, 0.90);
  color: rgba(255, 255, 255, 0.95);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.95rem;
  margin-right: 5px;
  margin-bottom: 5px;
  box-shadow: 0 8px 16px rgba(10, 40, 60, 0.12);
}
.selected-genre-tag span {
  cursor: pointer;
  margin-left: 8px;
  font-weight: bold;
}

.switch-link {
  margin-top: 15px;
  text-align: center;
  font-size: 1rem;
  color: #5b6670;
}
.switch-link span {
  color: var(--primary-blue);
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 1rem;
}
.checkbox-group input {
  width: 20px;
  height: 20px;
  accent-color: rgba(0, 51, 78, 0.85);
}

.author-link {
  display: block;
  background-color: rgba(0, 51, 78, 0.90);
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 10px 18px rgba(10, 40, 60, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
@media (hover: hover) {
  .author-link:hover { background-color: rgba(212, 175, 55, 0.82); }
}

/* ==========================================================================
   13. A-Z & SOCIALS
   ========================================================================== */
.az-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.20);
  padding-bottom: 10px;
}
.az-tab {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: bold;
  color: rgba(0, 51, 78, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 248, 250, 0.68));
  border: 1px solid rgba(0, 0, 0, 0.10);
  transition: 0.2s ease;
  box-shadow: 0 8px 14px rgba(10, 40, 60, 0.08);
  user-select: none;
}
.az-tab.active {
  background-color: rgba(212, 175, 55, 0.30);
  color: rgba(0, 51, 78, 1);
  border-color: rgba(212, 175, 55, 0.50);
}
@media (hover: hover) {
  .az-tab:hover {
    background-color: rgba(212, 175, 55, 0.30);
    color: rgba(0, 51, 78, 1);
    border-color: rgba(212, 175, 55, 0.50);
  }
}

.mini-author-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
  background: linear-gradient(135deg, rgba(224, 234, 240, 0.92) 0%, rgba(251, 246, 232, 0.92) 100%);
  text-align: left;
  box-shadow: 0 10px 18px rgba(10, 40, 60, 0.08);
  backdrop-filter: blur(6px);
  user-select: none;
}
@media (hover: hover) {
  .mini-author-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.10);
    background: linear-gradient(135deg, rgba(214, 226, 235, 0.98) 0%, rgba(247, 238, 215, 0.98) 100%);
  }
}

.mini-author-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(180deg, rgba(230, 242, 248, 0.95), rgba(245, 250, 255, 0.85));
  border: 1px solid rgba(0, 51, 78, 0.10);
}
.mini-author-name {
  font-weight: bold;
  color: rgba(0, 51, 78, 0.95);
  margin: 0;
}

.all-genres-grid,
.all-authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.book-minimized-view { 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
  width: 100%; 
  max-width: 100%;
  min-width: 0; 
}

.mini-title {
  margin: 0;
  color: var(--primary-blue);
  white-space: normal;
  word-break: break-all;
  display: block; 
  width: 100%;
}

.mini-covers { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.mini-cover {
  width: 55px;
  height: 78px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: #f0f0f0;
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 14px rgba(10, 40, 60, 0.10);
}

/* ==========================================================================
   14. RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  :root { --authors-grid-top: 66px; }

  .mobile-filter-toggle {
    display: block;
    position: relative;
    z-index: 40;
  }
  
  .search-filter-container { 
    display: none; 
    grid-template-columns: 1fr; 
    gap: 10px; 
    margin-top: 5px; 
  }

  .search-filter-container .card-style {
    margin-bottom: 0 !important;
  }

  .search-filter-container.open {
    display: grid;
  }

  .authors-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-container { grid-template-columns: 1fr; }
  .genre-scroll-row::after { right: 46px; }

  .daily-authors-banner { height: 78px; margin: 22px 0 6px 0; }
  .daily-authors-banner img {
    height: 210px;
    top: -62px;
    width: min(980px, 96%);
    transform: translateX(-50%);
  }
}

@media (max-width: 600px) {
  body { padding: 12px; }

  .header-card {
    flex-direction: column;
    height: auto;
    padding: 10px;
    gap: 10px;
    text-align: center;
  }
  .logo-wrapper { align-items: center; margin-bottom: 20px; max-width: 100%; }
  .brand-logo {
    margin: 0 auto;
    height: 230px;
    margin-top: -120px;
    margin-bottom: -90px;
    margin-left: -70px;
    width: auto;
    max-width: 150%;
  }

  .nav-buttons {
    margin: 0;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    z-index: 50;
    gap: 10px;
  }
  .nav-btn {
    padding: 7px 14px;
    width: auto;
    flex: 1 1 auto;
    font-size: 1rem;
  }

  :root { --authors-grid-top: 42px; }
  .authors-grid { grid-template-columns: 1fr; gap: 20px; }

  .author-profile-container { grid-template-columns: 1fr; padding-bottom: 55px; }
  .author-profile-img,
  .author-img-placeholder {
    width: 100%;
    max-width: 200px;
    height: 280px;
    margin: 0 auto 15px auto;
  }

  .info-card {
    padding: 15px 20px;
    width: min(900px, 100%);
    max-height: 85vh;
  }

  .genre-top-row { flex-direction: column; align-items: stretch; }
  .genre-scroll-list { padding: 10px 10px; gap: 10px; }
  .genre-pill { padding: 9px 14px; font-size: 1.02rem; }
  .genre-scroll-row::before { width: 18px; }
  .genre-scroll-row::after { width: 18px; right: 46px; }

  .social-icons-container {
    position: relative;
    bottom: auto;
    right: auto;
    justify-content: center;
    margin-top: 18px;
  }

  .book-detail-container { grid-template-columns: 1fr; }
  .book-detail-cover {
    width: 100%;
    max-width: 260px;
    height: 360px;
    margin: 0 auto;
  }

  .daily-authors-banner {
    height: 102px;
    margin: 16px 0 6px 0;
  }
  .daily-authors-banner img {
    height: 220px;
    top: -28px;
    width: min(720px, 92%);
    transform: translateX(-50%);
  }

  footer {
    margin-top: 26px;
    padding: 22px 12px 30px 12px;
    border-radius: 14px;
  }
  .footer-links { gap: 10px; }
  .footer-btn {
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
  }
}

@media (max-height: 450px) and (orientation: landscape) {
  .header-card {
    height: 70px;
    padding: 0 20px;
    align-items: center;
    overflow: visible;
  }
  .logo-wrapper { position: relative; z-index: 30; max-height: none; }
  .brand-logo {
    height: 250px;
    margin-top: -60px;
    margin-left: -40px;
    margin-bottom: -60px;
  }
  .nav-buttons { z-index: 10; gap: 10px; }
  .nav-btn { padding: 6px 14px; font-size: 1rem; white-space: nowrap; }
}

.btn-inline {
  width: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
}

.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.action-btn.danger { background: #c0392b !important; }
@media (hover: hover) {
  .action-btn.danger:hover { filter: brightness(0.95); }
}

@media (max-width: 700px) {
  .book-covers-area {
    display: block !important;
    width: 100% !important;
  }
  .book-covers-area > div {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px 0 !important;
  }
  .book-covers-area .cover-upload-box {
    width: 100% !important;
    height: 180px !important;
  }
}

.book-detail-covers-row {
  display: flex;
  gap: 15px;
  justify-content: center;
  width: 100%;
}
.book-detail-cover {
  width: 220px;
  height: 330px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background-color: rgba(240, 240, 240, 0.95);
  background-position: center;
  background-size: cover;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

@media (max-width: 600px) {
  .book-detail-covers-row {
    flex-direction: column;
    align-items: center;
  }
  .book-detail-cover {
    width: 100%;
    max-width: 240px;
    height: 360px;
    margin-bottom: 15px;
  }
}

/* ==========================================================================
   15. TOAST NOTIFICATIONS
   ========================================================================== */
.toast-msg {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px); 
  background: linear-gradient(135deg, rgba(250, 252, 255, 0.95) 0%, rgba(253, 250, 245, 0.95) 100%);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; 
  padding: 12px 24px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.15rem;
  z-index: 9999;
  box-shadow: 0 12px 30px rgba(10, 40, 60, 0.15);
  border: 1px solid var(--stroke);
  opacity: 0; 
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none; 
}
.toast-msg.show {
  transform: translateX(-50%) translateY(0); 
  opacity: 1; 
}
.toast-msg.error-toast { color: #c0392b; border-left: 4px solid #c0392b; }
.toast-msg.success-toast { color: #27ae60; border-left: 4px solid #27ae60; }

/* ==========================================================================
   16. BLOGGER SPEZIFISCH
   ========================================================================== */
.rating-grid {
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 15px; 
  background: white; 
  padding: 15px; 
  border-radius: 10px; 
  border: 1px solid #ddd;
}
@media (max-width:600px){
  .rating-grid { grid-template-columns: 1fr; gap: 10px; padding: 10px; }
}

.rating-item { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; }
.rating-select { 
  padding: 8px; 
  border-radius: 8px; 
  border: 1px solid rgba(0, 0, 0, 0.14); 
  font-family: inherit; 
  font-size: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 248, 250, 0.78));
  color: var(--primary-blue);
  outline: none;
}

.tag-accordion {
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.tag-accordion summary {
  padding: 12px 15px;
  font-weight: bold;
  color: var(--primary-blue);
  background: rgba(0,51,78,0.03);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tag-accordion summary::-webkit-details-marker { display: none; }
.tag-accordion summary::after { content: '▾'; color: var(--primary-gold); font-size: 1.2rem; }
.tag-accordion[open] summary::after { content: '▴'; }
.tag-content { padding: 15px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid #eee; }

.tag-checkbox-label { 
  display: inline-block; 
  background: rgba(0,51,78,0.05); 
  border: 1px solid rgba(0,51,78,0.2); 
  padding: 6px 12px; 
  border-radius: 20px; 
  cursor: pointer; 
  transition: 0.2s; 
  user-select: none; 
  font-size: 0.95rem;
}
.tag-checkbox-label:hover { background: rgba(0,51,78,0.1); }
.tag-checkbox-label.checked { background: var(--primary-blue); color: white; border-color: var(--primary-blue); }
.tag-checkbox-label input { display: none; }

/* --- FIX FÜR DIE BILDER IM VORSCHAU-MODAL (4 BILDER) --- */
@media (max-width: 600px) {
  .book-detail-covers-row {
    justify-content: flex-start;
  }
}

@media (min-width: 601px) {
  .book-detail-covers-row {
    justify-content: center;
  }
  
  .book-detail-cover {
    width: 150px !important; 
    height: 225px !important;
    flex-shrink: 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }
}

/* ==========================================================================
   17. COMMUNITY FEED LAYOUT (.community-layout)
   ========================================================================== */
.community-layout .main-wrapper { display: flex; flex-direction: column; height: 100vh; }
.community-layout .collapsible { flex-shrink: 0; overflow: hidden; transition: max-height 0.25s ease, opacity 0.25s ease; }
.community-layout .collapsible.collapsed { max-height: 0 !important; opacity: 0; pointer-events: none; }
.community-layout .fixed-header-section { z-index: 60; }
.community-layout .fixed-header-section.collapsible { max-height: 380px; opacity: 1; }
.community-layout .fixed-compose-section { z-index: 55; }
.community-layout .fixed-compose-section.collapsible { max-height: 60vh; opacity: 1; }
.community-layout .composer-scroll { max-height: 56vh; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-right: 6px; scrollbar-width: none; -ms-overflow-style: none; }
.community-layout .composer-scroll::-webkit-scrollbar { display: none; }
.community-layout .scroll-content-section { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 40px; scrollbar-width: none; -ms-overflow-style: none; }
.community-layout .scroll-content-section::-webkit-scrollbar { display: none; }
.community-layout .feed-container { max-width: 650px; margin: 0 auto; padding: 0 10px; }

/* Sidebar */
.community-layout .sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,51,78,0.5); z-index: 1000; display: none; backdrop-filter: blur(2px); transition: 0.3s; }
.community-layout .sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: #f9f7f1; z-index: 1001; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 4px 0 15px rgba(0,0,0,0.1); display: flex; flex-direction: column; padding: 20px; border-right: 2px solid var(--primary-gold); overflow-y: auto; }
.community-layout .sidebar.open { left: 0; }
.community-layout .sidebar-header { font-family: 'Patrick Hand', cursive; font-size: 1.5rem; color: var(--primary-blue); border-bottom: 2px dashed var(--primary-gold); padding-bottom: 10px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
.community-layout .sidebar-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #c0392b; transition: 0.2s; }
.community-layout .sidebar-close:hover { transform: scale(1.2); }
.community-layout .sidebar-section-title{ font-family:'Patrick Hand', cursive; color: var(--primary-blue); font-size: 1.15rem; margin: 10px 0 8px; }
.community-layout .sidebar-spacer { flex: 1; }
.community-layout .sidebar-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.community-layout .sidebar-btn { background-color: #fff; border: 1px solid rgba(0,51,78,0.2); color: var(--primary-blue); font-family: inherit; font-size: 1.0rem; padding: 10px 15px; border-radius: 6px; cursor: pointer; text-align: center; text-decoration: none; transition: 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.05); width: 100%; }
.community-layout .sidebar-btn:hover { background-color: var(--primary-gold); color: #fff; border-color: var(--primary-gold); }
.community-layout .sidebar-btn.secondary { background: rgba(0,51,78,0.04); }

.community-layout .menu-toggle-btn { background: none; border: none; font-size: 1.8rem; color: var(--primary-blue); cursor: pointer; display: flex; align-items: center; margin-right: 15px; transition: 0.2s; position: relative; top: 4px; }
.community-layout .menu-toggle-btn:hover { color: var(--primary-gold); transform: scale(1.05); }

.community-layout .toggle-bar { display: flex; gap: 10px; justify-content: center; align-items: center; padding: 10px 10px; margin: 10px auto 0; max-width: 650px; position: sticky; top: var(--togglebar-safe-top); z-index: 70; }
.community-layout .toggle-pill { border: 1px solid rgba(0,51,78,0.2); background: rgba(255,255,255,0.92); color: var(--primary-blue); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); transition: 0.2s; white-space: nowrap; }
.community-layout .toggle-pill:hover { border-color: var(--primary-gold); transform: translateY(-1px); }

.community-layout .new-post-box { background: rgba(255, 255, 255, 0.9); border: 2px dashed var(--primary-gold); border-radius: 12px; padding: 20px; margin-bottom: 18px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: 0.3s ease; }
.community-layout .post-tools { display: flex; gap: 10px; margin-top: 15px; border-top: 1px dashed #eee; padding-top: 15px; flex-wrap: wrap; align-items: center; }
.community-layout .tool-btn { background: #ffffff; border: 1px solid rgba(0,51,78,0.15); color: var(--primary-blue); font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 20px; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.community-layout .tool-btn:hover { border-color: var(--primary-gold); background: rgba(212, 175, 55, 0.05); transform: translateY(-1px); }
.community-layout .custom-dropdown-container { position: relative; }
.community-layout .custom-dropdown-list { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: 200px; overflow-y: auto; background: #fff; border: 1px solid var(--primary-blue); border-radius: 8px; z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.15); margin-top: 5px; }
.community-layout .user-option { padding: 10px 15px; border-bottom: 1px solid #eee; cursor: pointer; transition: 0.2s; display:flex; justify-content:space-between; align-items:center; }
.community-layout .user-option:last-child { border-bottom: none; }
.community-layout .user-option:hover { background: rgba(0, 51, 78, 0.05); }

.community-layout .feed-post { position: relative; background: rgba(255, 255, 255, 0.8); border: 1px solid #eee; border-radius: 12px; padding: 20px 20px 20px 95px; margin-bottom: 35px; margin-left: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); min-height: 130px; transition: 0.2s; }
.community-layout .feed-post:hover { box-shadow: 0 6px 15px rgba(0,0,0,0.08); }
.community-layout .frayed-image { position: absolute; left: -35px; top: 20px; width: 110px; height: 110px; object-fit: cover; transform: rotate(-6deg); border: 4px solid #fff; box-shadow: 2px 4px 10px rgba(0,0,0,0.15); z-index: 2; clip-path: polygon(1% 2%, 15% 0%, 30% 2%, 45% 0%, 60% 1%, 80% 0%, 98% 2%, 100% 15%, 98% 30%, 100% 45%, 99% 60%, 100% 80%, 98% 98%, 80% 100%, 60% 98%, 45% 100%, 30% 99%, 15% 100%, 2% 98%, 0% 80%, 2% 60%, 0% 45%, 1% 30%, 0% 15%); }
.community-layout .post-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; min-height: 35px; }
.community-layout .feed-avatar { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-gold); flex-shrink: 0; background: #eee; }
.community-layout .post-author { font-weight: bold; color: var(--primary-blue); font-size: 1.1rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.community-layout .post-time { font-size: 0.8rem; color: #888; white-space: nowrap; }
.community-layout .frayed-text-card { background: #ffffff; padding: 15px 20px; margin: 15px 0; border-radius: 4px; border: 1px solid rgba(0,0,0,0.05); box-shadow: 1px 3px 10px rgba(0,0,0,0.05); clip-path: polygon(0% 1%, 100% 0%, 99.5% 99%, 0.5% 100%); transform: none !important;; position: relative; z-index: 1; }

.community-layout .post-text, .community-layout .post-text-short, .community-layout .post-text-full { font-size: 1.05rem; line-height: 1.6; color: #2c3e50; word-wrap: break-word; transform: none !important; }
.community-layout .read-more-link { color: var(--primary-gold); font-weight: bold; cursor: pointer; display: inline-block; margin-top: 5px; font-size: 0.9rem; }
.community-layout .read-more-link:hover { text-decoration: underline; }

.community-layout .mention-tag { color: var(--primary-blue); background: rgba(212, 175, 55, 0.2); padding: 1px 6px; border-radius: 4px; font-weight: bold; text-decoration: none; }
.community-layout .post-actions { display: flex; gap: 20px; border-top: 1px solid #f0f0f0; padding-top: 10px; margin-top: 10px; align-items: center; }

.community-layout .like-btn, .community-layout .comment-toggle-btn { background: none; border: none; font-size: 0.95rem; color: #666; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: 0.2s; }
.community-layout .like-btn:hover, .community-layout .comment-toggle-btn:hover { color: var(--primary-blue); }
.community-layout .like-btn.liked { color: var(--primary-gold); font-weight: bold; }
.community-layout .like-btn.liked .book-icon { animation: pop 0.3s ease; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

.community-layout .comments-section { margin-top: 15px; border-top: 1px dashed #ddd; padding-top: 10px; display: none; }
.community-layout .comments-section.open { display: block; }
.community-layout .single-comment { margin-bottom: 10px; font-size: 0.9rem; background: rgba(0,51,78,0.03); padding: 8px; border-radius: 6px; }
.community-layout .comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.community-layout .comment-author { font-weight: bold; color: var(--primary-blue); }
.community-layout .comment-actions { font-size: 0.8rem; display: flex; gap: 8px; }
.community-layout .comment-btn { background: none; border: none; cursor: pointer; color: #999; padding: 0; font-size: 1rem; }
.community-layout .comment-btn.edit:hover { color: var(--primary-blue); }
.community-layout .comment-btn.delete:hover { color: #c0392b; }
.community-layout .comment-edit-form textarea { width: 100%; border: 1px solid #ddd; border-radius: 4px; padding: 5px; font-family: inherit; font-size: 0.9rem; margin-bottom: 5px; }
.community-layout .toggle-comments-link { display: block; text-align: center; margin-top: 5px; font-size: 0.85rem; color: var(--primary-gold); cursor: pointer; text-decoration: underline; }
.community-layout .comment-form { display: flex; gap: 5px; margin-top: 10px; align-items: center; width: 100%; }
.community-layout .comment-input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid #ccc; border-radius: 20px; font-size: 0.95rem; box-sizing: border-box; }

.community-layout .embed-placeholder-btn { width:100%; background: #eee; border: 1px solid #ddd; padding: 15px; text-align: center; border-radius: 8px; cursor: pointer; color: var(--primary-blue); font-weight: bold; margin-bottom: 10px; transition: 0.2s; }
.community-layout .embed-placeholder-btn:hover { background: #e0e0e0; }

.community-layout .embed-container{ display:none; width:100%; max-width:520px; margin:10px auto 15px; border-radius:8px; overflow:hidden; }
.community-layout .embed-container.is-video{ aspect-ratio:16/9; }
.community-layout .embed-container.is-vertical{ max-width:360px; aspect-ratio:9/16; }
.community-layout .embed-container.is-instagram{ max-width:520px; aspect-ratio: auto !important; height: 780px; max-height: 480px; overflow: hidden; background: #fff; }
.community-layout .embed-container iframe{ width:100%; height:100%; border:0; display:block; }

.community-layout .feed-search-input { width: 100%; padding: 12px 20px; border-radius: 30px; border: 2px solid rgba(0,51,78,0.1); font-size: 1rem; margin-bottom: 15px; background: rgba(255,255,255,0.9); box-shadow: 0 2px 6px rgba(0,0,0,0.05); transition: 0.2s; outline: none; }
.community-layout .feed-search-input:focus { border-color: var(--primary-gold); background: #fff; }

.community-layout .post-options-btn { position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #888; z-index: 5; }
.community-layout .post-options-menu { display: none; position: absolute; top: 35px; right: 10px; background: white; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 10; width: 140px; }
.community-layout .post-options-menu.show { display: block; }
.community-layout .option-item { padding: 10px 15px; cursor: pointer; display: block; width: 100%; text-align: left; border: none; background: none; font-size: 0.95rem; border-bottom: 1px solid #eee; }
.community-layout .option-item:last-child { border-bottom: none; }
.community-layout .option-item:hover { background: #f5f5f5; }
.community-layout .option-item.delete { color: #c0392b; }

@media (max-width: 600px) {
  .community-layout :root{ --togglebar-safe-top: 6px; }
  .community-layout .toggle-bar{ gap: 8px; padding: 8px 8px; margin-top: 6px; }
  .community-layout .toggle-pill{ font-size: 0.9rem; padding: 8px 12px; }
  .community-layout .fixed-header-section.collapsible { max-height: 380px; } 
  .community-layout .fixed-compose-section.collapsible { max-height: 70vh; }
  .community-layout .composer-scroll { max-height: 62vh; }
  .community-layout .feed-post { margin-left: 5px; margin-top: 30px; padding: 15px; }
  .community-layout .frayed-image { left: 10px; top: -30px; width: 80px; height: 80px; }
  .community-layout .post-header { padding-left: 85px; min-height: 50px; align-items: flex-start; flex-direction: column; gap: 5px; }
  .community-layout .post-time { align-self: flex-start; }
  .community-layout .frayed-text-card { padding: 12px 15px; }
  .community-layout .comment-form { display: flex !important; visibility: visible !important; }
  .community-layout .comment-input { width: 100%; flex: 1; }
}

@media (min-width: 901px) {
  .community-layout #toggleHeaderBtn, .community-layout #sidebarHeaderBtn { display: none !important; }
}

/* ==========================================================================
   18. FOOTER MOBILE TOGGLE
   ========================================================================== */
.footer-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Der Pfeil ist auf dem Desktop standardmäßig unsichtbar */
.footer-chevron {
  display: none; 
  color: var(--primary-gold);
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.footer-chevron.rotated {
  transform: rotate(180deg);
}

/* Mobile Ansicht (unter 900px) */
@media (max-width: 900px) {
  .footer-header {
    cursor: pointer;
    padding: 5px 0;
  }
  
  /* Pfeil auf Mobile anzeigen */
  .footer-chevron {
    display: inline-block;
  }
  
  /* Links auf Mobile standardmäßig verstecken */
  .footer-links {
    display: none; 
    flex-direction: column; /* Optional: Links untereinander anordnen auf Mobile */
    gap: 8px;
    margin-top: 15px;
  }
  
  /* Klasse zum Anzeigen der Links (wird per JS hinzugefügt) */
  .footer-links.show {
    display: flex;
  }
}

/* ==========================================================================
   19. SUB GRID & DRAG DROP
   ========================================================================== */
.sub-grid-item { width: 110px; display: flex; flex-direction: column; align-items: center; cursor: grab; position: relative; transition: transform 0.2s, opacity 0.2s; user-select: none; }
.sub-grid-item:active { cursor: grabbing; }
.sub-grid-item.dragging { opacity: 0.4; transform: scale(0.95); }
.sub-grid-item.drag-over { transform: scale(1.05); }
.sub-grid-item.drag-over .sub-cover { border: 3px dashed var(--primary-gold); box-shadow: 0 0 15px rgba(212, 175, 55, 0.6); }
.sub-grid-item .sub-cover { width: 110px; height: 165px; object-fit: cover; border-radius: 8px; background: #e0e0e0; box-shadow: 0 6px 12px rgba(0,0,0,0.15); pointer-events: none; border: 2px solid transparent; transition: 0.2s; }
@media (hover: hover) { .sub-grid-item:hover .sub-cover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); } }
.sub-grid-item .sub-title { font-size: 0.85rem; text-align: center; margin-top: 8px; font-weight: bold; line-height: 1.2; color: var(--primary-blue); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; pointer-events: none; }
.badge-rank { position: absolute; top: -10px; left: -10px; background: var(--primary-blue); color: white; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: bold; border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 2; }
.badge-status { position: absolute; bottom: 40px; right: -5px; background: var(--primary-gold); color: var(--primary-blue); padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: bold; box-shadow: 0 2px 6px rgba(0,0,0,0.25); z-index: 2; border: 1px solid white; }

/* ==========================================================================
   20. TICKER CONTAINER
   ========================================================================== */
.news-ticker-container {
  background-color: var(--primary-blue);
  color: #fff;
  padding: 8px 0;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--primary-gold);
  margin-bottom: 20px;
  border-radius: 8px;
}

/* Das kleine 'News'-Badge */
.news-badge {
  background-color: var(--primary-gold);
  color: var(--primary-blue);
  font-weight: bold;
  padding: 2px 10px;
  border-radius: 4px;
  margin-left: 10px;
  margin-right: 15px;
  z-index: 2;
  position: relative;
  box-shadow: 2px 0 5px rgba(0,51,78,0.5);
}

/* Die eigentliche Laufschrift */
.ticker-text {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 220s linear infinite; /* Geschwindigkeit hier anpassen */
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

/* Pausieren bei Hover */
.news-ticker-container:hover .ticker-text {
  animation-play-state: paused;
}

/* NEU: Styling für die automatisch generierten Buttons im Ticker */
.ticker-link-btn {
  background-color: var(--primary-gold);
  color: var(--primary-blue);
  padding: 2px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  margin: 0 8px;
  transition: filter 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.ticker-link-btn:hover {
  filter: brightness(1.1);
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   21. PARTNER LOGO
   ========================================================================== */
.partner-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  /* Auf dem Desktop vergrößert und leicht nach rechts verschoben */
  transform: scale(1.4) translateX(15px);
}

/* Auf dem Handy (unter 900px) zentrieren */
@media (max-width: 900px) {
  .partner-logo {
    /* Nur noch leicht vergrößert, aber NICHT mehr verschoben (0px) */
    transform: scale(1.2) translateX(0px); 
  }
}

/* ==========================================================================
   22. DUNKELMODUS (DARK MODE) OVERRIDES
   ========================================================================== */
body.dark-mode {
  /* Basis-Variablen überschreiben */
  --primary-blue: #005a8a; /* Hellere Version deines Blaus für Lesbarkeit */
  --bg-color: #12181b; /* Sehr dunkles Blaugrau */
  --text-color: #e0e6ed;
  --stroke: rgba(255, 255, 255, 0.12);
  --stroke-strong: rgba(255, 255, 255, 0.25);
  
  /* Hintergrund abdunkeln */
  background-color: var(--bg-color);
  background-image:
    radial-gradient(1200px 600px at 10% 0%, rgba(212, 175, 55, 0.05), rgba(0, 0, 0, 0) 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(138, 180, 248, 0.05), rgba(0, 0, 0, 0) 60%),
    linear-gradient(rgba(18, 24, 27, 0.85), rgba(18, 24, 27, 0.95)),
    url('/data/background.webp');
}

/* Karten, Header und Footer abdunkeln */
body.dark-mode .card-style,
body.dark-mode .page-card,
body.dark-mode .header-card,
body.dark-mode .info-card,
body.dark-mode footer,
body.dark-mode .new-post-box {
  background: linear-gradient(135deg, rgba(30, 40, 50, 0.85) 0%, rgba(20, 25, 30, 0.90) 100%);
  border-color: var(--stroke);
  color: var(--text-color);
}

/* Texte, die sonst auf Weiß ausgelegt sind */
body.dark-mode .author-name,
body.dark-mode .slogan-text .blue,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode .form-group label {
  color: var(--primary-gold); 
}

body.dark-mode .author-bio,
body.dark-mode p {
  color: #b0c4de;
}

/* Buttons & Inputs im Dark Mode */
body.dark-mode .nav-btn,
body.dark-mode .footer-btn,
body.dark-mode .switcher-btn,
body.dark-mode .search-input,
body.dark-mode .form-input,
body.dark-mode .form-textarea,
body.dark-mode .genre-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .nav-btn:hover,
body.dark-mode .footer-btn:hover,
body.dark-mode .genre-pill:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--primary-gold);
  color: var(--primary-gold);
}

/* Modals & Overlay */
body.dark-mode .modal-overlay {
  background: rgba(0, 0, 0, 0.8);
}
body.dark-mode .close-modal {
  color: var(--primary-gold);
}

/* Fallback für sonstige helle Elemente */
body.dark-mode .mini-author-card,
body.dark-mode .toggle-pill,
body.dark-mode .feed-post,
body.dark-mode .frayed-text-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

/* DUNKELMODUS FIXES FÜR MODALS, BUTTONS & CO. */
/* 1. View-Switcher (Autoren / Buchblogger) */
body.dark-mode .view-switcher {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .switcher-btn {
  color: #b0c4de;
}
body.dark-mode .switcher-btn.active {
  background: var(--primary-gold);
  color: #12181b; /* Dunkle Schrift auf Gold für perfekten Kontrast */
}

/* 2. Suchfelder & Platzhalter (Placeholder) */
body.dark-mode .search-input::placeholder,
body.dark-mode .form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* 3. Sekundäre Buttons ("Alle anzeigen") */
body.dark-mode .secondary-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e0e6ed !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* 4. Genre Scroll-Leiste & die weißen Fade-Out Ränder */
body.dark-mode .genre-scroll-list {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}
body.dark-mode .genre-scroll-row::before {
  background: linear-gradient(90deg, var(--bg-color), transparent) !important;
}
body.dark-mode .genre-scroll-row::after {
  background: linear-gradient(270deg, var(--bg-color), transparent) !important;
}

/* 5. Challenge Modal (Weiße Box & inaktiver Button) */
body.dark-mode #challengeGenreContainer {
  background: rgba(0, 0, 0, 0.2) !important; /* Überschreibt das Inline #fafafa */
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode #challengeGenreContainer .genre-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e6ed;
  border-color: rgba(255, 255, 255, 0.2);
}
body.dark-mode #challengeStep1 p,
body.dark-mode #challengeStep2 p {
  color: #b0c4de !important;
}

/* 6. Autoren- und Buch-Modals (Schwarzer Text auf dunklem Grund fixen) */
body.dark-mode #modalContent p,
body.dark-mode #modalContent div,
body.dark-mode #modalContent span {
  color: #b0c4de !important; /* Zwingt alle Standard-Texte ins helle Blaugrau */
}
/* Ausnahmen für farbige Tags im Modal, damit die lesbar bleiben */
body.dark-mode #modalContent .selected-tag,
body.dark-mode #modalContent .badge-status {
  color: #fff !important;
}

/* 7. Buttons in den Modals ("Rezension ansehen", "Leseprobe lesen") */
body.dark-mode #modalContent .action-btn,
body.dark-mode #modalContent .action-btn span {
  background: var(--primary-gold) !important;
  color: #12181b !important; /* Dunkle Schrift für gute Lesbarkeit */
  border: none !important;
}

/* 8. Status-Box unter den Buchcovern (Inline-Style Rahmen) */
body.dark-mode #modalContent div[style*="border: 1px solid"] {
  background: rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(212, 175, 55, 0.4) !important;
}
body.dark-mode #modalContent div[style*="border: 1px solid"] b,
body.dark-mode #modalContent div[style*="border: 1px solid"] strong {
  color: #e0e6ed !important;
}

/* DUNKELMODUS: DASHBOARDS (AUTOR & BLOGGER) */
/* 1. Formular-Felder (Inputs, Textareas, Selects) */
body.dark-mode .form-input,
body.dark-mode .form-textarea,
body.dark-mode .rating-select,
body.dark-mode select {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #e0e6ed !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* 2. Dropdown-Menüs (Buchsuche, Genres) */
body.dark-mode .genre-suggestions,
body.dark-mode .custom-dropdown-list,
body.dark-mode #subGridSearchResults,
body.dark-mode #subSearchResults {
  background: #1a242f !important; /* Dunkelblau/Grau */
  border: 1px solid rgba(212, 175, 55, 0.5) !important;
  color: #e0e6ed !important;
}
body.dark-mode .suggestion-item,
body.dark-mode .book-option {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e0e6ed !important;
}
body.dark-mode .suggestion-item:hover,
body.dark-mode .book-option:hover {
  background: rgba(212, 175, 55, 0.2) !important;
  color: var(--primary-gold) !important;
}
body.dark-mode .book-option strong { color: var(--primary-gold) !important; }
body.dark-mode .book-option small { color: #b0c4de !important; }

/* 3. Dashboard-Karten (Buch bearbeiten, Einstellungen, etc.) */
body.dark-mode .book-edit-card,
body.dark-mode .new-book-card,
body.dark-mode .settings-card,
body.dark-mode div[style*="background: rgba(0,51,78,0.05)"], /* Externe Buch-Box Blogger */
body.dark-mode div[style*="background: rgba(255,255,255,0.85)"] /* SUB Such-Box */ {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .book-edit-card.minimized {
  background: rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(212, 175, 55, 0.4) !important;
}

/* 4. Texte, die durch Inline-Styles dunkel erzwungen werden (grau/schwarz) */
body.dark-mode .book-minimized-view div,
body.dark-mode .book-details-content label,
body.dark-mode .book-details-content span,
body.dark-mode .book-details-content p,
body.dark-mode .info-card p,
body.dark-mode .info-card div,
body.dark-mode .info-card small,
body.dark-mode .info-card label,
body.dark-mode .settings-wrapper p {
  color: #b0c4de !important;
}

/* Ausnahme für Status-Farben (Online=Grün, Offline=Rot) */
body.dark-mode span[style*="color:green"],
body.dark-mode span[style*="color:rgba(0,120,0,0.9)"] { color: #4ade80 !important; }
body.dark-mode span[style*="color:#c0392b"] { color: #f87171 !important; }

/* 5. Cover-Upload Platzhalter ("+ Bild" / graue Kästen) */
body.dark-mode .cover-upload-box,
body.dark-mode div[style*="background:#eee"],
body.dark-mode div[style*="background:#ddd"] {
  background: rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #b0c4de !important;
}

/* 6. Blogger-Spezifisch (Tags & Ratings) */
body.dark-mode .rating-grid,
body.dark-mode .tag-accordion {
  background: rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .tag-accordion summary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--primary-gold) !important;
}
body.dark-mode .tag-content {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .tag-checkbox-label {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #e0e6ed !important;
}
body.dark-mode .tag-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .tag-checkbox-label.checked {
  background: var(--primary-gold) !important;
  color: #12181b !important;
  border-color: var(--primary-gold) !important;
}

/* 7. Modals / Info Cards harte weiße Hintergründe entfernen */
body.dark-mode .info-card {
  background: linear-gradient(135deg, rgba(25, 35, 45, 0.98) 0%, rgba(18, 24, 27, 0.98) 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

/* DUNKELMODUS: TRUENOTES / COMMUNITY FEED */
/* 1. Sidebar (Mobile Menü) */
body.dark-mode .sidebar {
  background: var(--bg-color) !important;
  border-right: 2px solid var(--stroke-strong) !important;
  box-shadow: 4px 0 15px rgba(0,0,0,0.5) !important;
}
body.dark-mode .sidebar-header,
body.dark-mode .sidebar-section-title {
  color: var(--primary-gold) !important;
  border-bottom-color: rgba(212, 175, 55, 0.3) !important;
}
body.dark-mode .sidebar-btn {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #e0e6ed !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .sidebar-btn:hover {
  background-color: rgba(212, 175, 55, 0.2) !important;
  color: var(--primary-gold) !important;
  border-color: var(--primary-gold) !important;
}
body.dark-mode .menu-toggle-btn {
  color: #e0e6ed !important;
}

/* 2. Toggle-Bar (Die runden Buttons oben) */
body.dark-mode .toggle-pill {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #e0e6ed !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}
body.dark-mode .toggle-pill:hover {
  border-color: var(--primary-gold) !important;
  color: var(--primary-gold) !important;
}

/* 3. Beitrag erstellen Box (Composer) */
body.dark-mode .new-post-box {
  background: rgba(30, 40, 50, 0.95) !important;
  border-color: rgba(212, 175, 55, 0.4) !important;
}
body.dark-mode .new-post-box h4 {
  color: var(--primary-gold) !important;
}
body.dark-mode .tool-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #e0e6ed !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}
body.dark-mode .tool-btn:hover {
  background: rgba(212, 175, 55, 0.1) !important;
  border-color: var(--primary-gold) !important;
}
/* User-Erwähnungs-Dropdown im Composer */
body.dark-mode .user-option {
  background: #1a242f !important;
  color: #e0e6ed !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .user-option:hover {
  background: rgba(212, 175, 55, 0.2) !important;
}

/* 4. Die eigentlichen Feed-Beiträge */
body.dark-mode .feed-post {
  background: rgba(30, 40, 50, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}
body.dark-mode .post-author {
  color: var(--primary-gold) !important;
}
body.dark-mode .post-time {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Der Papier-Zettel-Effekt */
body.dark-mode .frayed-text-card {
  background: rgba(40, 50, 60, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .post-text, 
body.dark-mode .post-text-short, 
body.dark-mode .post-text-full {
  color: #e0e6ed !important;
}

/* 5. Kommentare & Aktionen */
body.dark-mode .post-actions {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .like-btn, 
body.dark-mode .comment-toggle-btn {
  color: #b0c4de !important;
}
body.dark-mode .like-btn:hover, 
body.dark-mode .comment-toggle-btn:hover {
  color: var(--primary-gold) !important;
}
body.dark-mode .comments-section {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .single-comment {
  background: rgba(0, 0, 0, 0.3) !important;
}
body.dark-mode .comment-author {
  color: var(--primary-gold) !important;
}
body.dark-mode .comment-content-text {
  color: #e0e6ed !important;
}
body.dark-mode .comment-input {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #e0e6ed !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}
body.dark-mode .comment-input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* 6. Post-Optionen (3 Punkte Menü) */
body.dark-mode .post-options-btn {
  color: rgba(255, 255, 255, 0.5) !important;
}
body.dark-mode .post-options-menu {
  background: #1a242f !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .option-item {
  color: #e0e6ed !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .option-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* 7. Embed Placeholder (Video Platzhalter) */
body.dark-mode .embed-placeholder-btn {
  background: rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #b0c4de !important;
}
body.dark-mode .embed-placeholder-btn:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Rand vom Profilbild auf dem Feed anpassen */
body.dark-mode .frayed-image {
  border-color: #1a242f !important; /* Passt sich dem dunklen Hintergrund an statt knallweiß zu sein */
}

/* DUNKELMODUS FIX: A-Z FILTER TABS */
body.dark-mode .az-tab {
  background: rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #e0e6ed !important; /* Helle Schrift */
}

body.dark-mode .az-tab:hover {
  background: rgba(212, 175, 55, 0.2) !important;
  color: var(--primary-gold) !important;
  border-color: var(--primary-gold) !important;
}

body.dark-mode .az-tab.active {
  background: var(--primary-gold) !important;
  color: #12181b !important; /* Sehr dunkle Schrift auf goldenem Grund */
  border-color: var(--primary-gold) !important;
}

/* DUNKELMODUS FIX: JS-MODALS & KARTEN */
/* 1. Die Rezensions-Karten & grauen Boxen im Modal (Screenshot 6) */
/* Das JS generiert Boxen mit #eee oder #f0f0f0 als Hintergrund. Wir zwingen sie ins Dunkle. */
body.dark-mode #modalContent div[style*="background: #eee"],
body.dark-mode #modalContent div[style*="background:#eee"],
body.dark-mode #modalContent div[style*="background: #f0f0f0"],
body.dark-mode #modalContent div[style*="background:#f0f0f0"],
body.dark-mode #modalContent div[style*="background: #e0e0e0"],
body.dark-mode #modalContent div[style*="background:#e0e0e0"] {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Text in diesen JS-Karten lesbar machen */
body.dark-mode #modalContent div[style*="background:"] > span,
body.dark-mode #modalContent div[style*="background:"] > div,
body.dark-mode #modalContent div[style*="background:"] > strong,
body.dark-mode #modalContent div[style*="background:"] > i {
  color: #e0e6ed !important;
}

/* 2. Goldene Buttons reparieren (Screenshots 3 & 4) */
/* Da das Blau jetzt hell ist, erzwingen wir auf den Buttons eine fast schwarze Schrift */
/* --- BUTTON FARBEN FIX --- */

/* 1. Standard-Buttons (z.B. Blau) im Dark Mode: Helle Schrift! */
body.dark-mode .action-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e0e6ed !important; /* Helle Schrift auf dunklem Button */
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .action-btn:hover {
  background: var(--primary-gold) !important;
  color: #12181b !important; /* Beim Hover (Gold) wechseln wir auf dunkle Schrift */
}

/* 2. Goldene Buttons (Bestseller-Button & Inline-Gold-Buttons): Dunkle Schrift! */
body.dark-mode .bs-btn,
body.dark-mode button[style*="background: var(--primary-gold)"],
body.dark-mode button[style*="background:var(--primary-gold)"] {
  background: var(--primary-gold) !important;
  color: #12181b !important; /* Dunkle Schrift ist auf Gelb/Gold am besten lesbar */
  font-weight: bold !important;
}
/* Falls noch ein <span> im Button liegt (z.B. Icon oder Zähler) */
body.dark-mode .action-btn span, 
body.dark-mode button[style*="var(--primary-gold)"] span {
  color: #12181b !important;
}

/* Sekundäre Buttons (wie "Alle anzeigen") wieder dunkel mit heller Schrift */
body.dark-mode .action-btn.secondary-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e0e6ed !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* 3. A-Z Buchstaben Filter (Screenshot 5) */
body.dark-mode .az-tab,
body.dark-mode .az-tabs span {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e0e6ed !important;
}
body.dark-mode .az-tab:hover {
  background: rgba(212, 175, 55, 0.2) !important;
  border-color: var(--primary-gold) !important;
  color: var(--primary-gold) !important;
}
body.dark-mode .az-tab.active {
  background: var(--primary-gold) !important;
  color: #12181b !important;
  border-color: var(--primary-gold) !important;
}

/* 4. Genre Pills im Challenge-Modal & Suche (Screenshot 1 & 2) */
body.dark-mode .genre-pill {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e0e6ed !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
body.dark-mode .genre-pill:hover {
  background: rgba(212, 175, 55, 0.2) !important;
  border-color: var(--primary-gold) !important;
  color: var(--primary-gold) !important;
}
body.dark-mode .genre-pill.active {
  background: var(--primary-gold) !important;
  color: #12181b !important;
  border-color: var(--primary-gold) !important;
}

/* Challenge auslosen Button (Disabled State - ausgegraut) */
body.dark-mode #btnRollChallenge:disabled,
body.dark-mode #btnRollChallenge[style*="opacity: 0.5"],
body.dark-mode #btnRollChallenge[style*="opacity:0.5"] {
  background: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* 5. Genre-Tags im Buch-Detail (Urban Fantasy etc. - Screenshot 4) */
body.dark-mode .selected-tag {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #e0e6ed !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* 6. Dunkle Social Media & Website-Buttons im Autor-Modal (Screenshot 3) */
body.dark-mode .author-link {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e0e6ed !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
body.dark-mode .author-link:hover {
  background: var(--primary-gold) !important;
  color: #12181b !important;
}
body.dark-mode .social-icon {
  background: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .social-icon:hover {
  background: var(--primary-gold) !important;
}
body.dark-mode .social-icon svg {
  fill: #e0e6ed !important;
}
body.dark-mode .social-icon:hover svg {
  fill: #12181b !important;
}

/* DUNKELMODUS FIX: SUCHE, MODALS & PFEILE */
/* 1. Die Suchfelder mit Lupe (z.B. Autor, Genre, Feed) 
   Das Icon ist oft in den Text/Placeholder integriert. 
   Wir sorgen für klaren, hellen Text. */
body.dark-mode .search-input,
body.dark-mode #mainSearchInput,
body.dark-mode #genreSearchInput,
body.dark-mode #challengeGenreSearch,
body.dark-mode #liveFeedSearch {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e0e6ed !important;
}
body.dark-mode .search-input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}
body.dark-mode .search-input:focus {
  border-color: var(--primary-gold) !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}

/* 2. Challenge Modal (Das weiße Vorschlagsfeld mit Genres) */
body.dark-mode #challengeGenreContainer,
body.dark-mode #challengeStep1 > div > div[style*="background:#fafafa"],
body.dark-mode #challengeStep1 > div > div[style*="background: #fafafa"] {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode #challengeStep1 .genre-pill {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #e0e6ed !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}
body.dark-mode #challengeStep1 .genre-pill:hover {
  background: rgba(212, 175, 55, 0.2) !important;
  border-color: var(--primary-gold) !important;
  color: var(--primary-gold) !important;
}
body.dark-mode #challengeStep1 .genre-pill.active {
  background: var(--primary-gold) !important;
  color: #12181b !important;
  border-color: var(--primary-gold) !important;
}

/* 3. Autoren-Profil (Über mich & Meine Werke) */
/* Der Text "Über mich" und "Meine Werke" ist teilweise hardcodiert auf Gold oder Grau */
body.dark-mode #modalContent h3,
body.dark-mode #modalContent h4 {
  color: var(--primary-gold) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}
/* Fließtext im Modal */
body.dark-mode #modalContent div[style*="color:#333"],
body.dark-mode #modalContent div[style*="color: #333"] {
  color: #b0c4de !important;
}
/* Die kleinen Buchkarten im Autor-Profil */
body.dark-mode #modalContent .book-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode #modalContent .book-item div[style*="color:var(--primary-blue)"] {
  color: #e0e6ed !important; /* Buchtitel aufleuchten lassen */
}
body.dark-mode #modalContent .book-item div[style*="color:#555"] {
  color: rgba(255, 255, 255, 0.6) !important; /* Snippet/Beschreibung */
}

/* 4. Buch Detailansicht (Status, Release, Format, Preis Box) */
body.dark-mode #modalContent div[style*="background: rgba(212, 175, 55, 0.1)"],
body.dark-mode #modalContent div[style*="background:rgba(212, 175, 55, 0.1)"] {
  background: rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(212, 175, 55, 0.3) !important;
  color: #e0e6ed !important;
}
body.dark-mode #modalContent div[style*="background: rgba(212, 175, 55, 0.1)"] strong,
body.dark-mode #modalContent div[style*="background:rgba(212, 175, 55, 0.1)"] strong {
  color: var(--primary-gold) !important; /* Label hervorheben */
}
/* Leseprobe Text */
body.dark-mode #modalContent div[style*="color:#2c3e50"],
body.dark-mode #modalContent div[style*="color: #2c3e50"] {
  color: #b0c4de !important;
}

/* 5. Mobile Filter & Pfeile anpassen */
body.dark-mode .mobile-filter-toggle {
  background: rgba(0, 0, 0, 0.3) !important;
  color: var(--primary-gold) !important; /* Die Schrift und der Pfeil werden gold */
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
body.dark-mode .mobile-filter-toggle.active {
  background: rgba(212, 175, 55, 0.15) !important;
  border-color: var(--primary-gold) !important;
}

/* Footer-Pfeil (Der "▼" Button unten) */
body.dark-mode .footer-header {
  color: #e0e6ed !important;
}
body.dark-mode .footer-chevron {
  color: var(--primary-gold) !important;
}

/* ==========================================================================
   23. MOBILE ANSICHT OPTIMIERUNGEN (ab 900px abwärts)
   ========================================================================== */

/* Desktop-Sichtbarkeit: Bottom Bar & Sidebar ausblenden */
.mobile-bottom-bar,
.mobile-sidebar,
.mobile-sidebar-overlay {
  display: none;
}

@media (max-width: 900px) {
  /* 1. Bottom Bar anzeigen & stylen */
  .mobile-bottom-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 250, 0.98)) !important;
    border-top: 2px solid var(--primary-gold) !important;
    
    /* BOMBEN-SICHERES FALLBACK FÜR iPHONE FIREFOX:
       Zuerst ein festes Padding definieren.
       Danach, falls der Browser es unterstützt, das Safe-Area-Padding drüberschreiben. */
    padding: 10px 15px !important; 
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    
    /* Die Höhe explizit erzwingen, damit die Bar niemals auf 0 Pixel kollabiert */
    min-height: 60px !important;
    
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1) !important;
    z-index: 999999 !important; /* Absolutes Maximum */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  .mobile-bottom-bar button {
    background: transparent !important;
    border: none !important;
    font-size: 1.4rem !important;
    color: var(--primary-blue) !important;
    cursor: pointer !important;
    padding: 5px !important;
    transition: transform 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 2. Platz unten schaffen, Fallback inklusive */
  body {
    padding-bottom: 80px !important; /* Fallback */
    padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important; 
  }

  /* 3. Alte Elemente auf Mobile ausblenden */
  .nav-buttons, /* Alte Navigation oben */
  
  .container > .page-card > .slogan-card, /* Alter Slogan (direkt unter page-card) */
  .container > .page-card > div[onclick="openDavinaModal()"] /* Alte Davina Card */ {
    display: none !important;
  }

  /* 4. Neue Sidebar links */
  .mobile-sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: -320px; /* Versteckt außerhalb des Bildschirms */
    width: 280px;
    height: 100vh;
    background: var(--bg-color);
    z-index: 2002;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto;
    border-right: 2px solid var(--primary-gold);
    padding: 20px;
  }

  .mobile-sidebar.open {
    left: 0;
  }

  .mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 78, 0.6);
    z-index: 2001;
    backdrop-filter: blur(3px);
  }
  .mobile-sidebar-overlay.show {
    display: block;
  }

  .sidebar-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed var(--stroke-strong);
    padding-bottom: 10px;
    margin-bottom: 20px;
  }

  .mobile-slogan p { text-align: left; }
  .mobile-davina-card {
    background: linear-gradient(135deg, rgba(0,51,78,0.03), rgba(212,175,55,0.08));
    border: 1px dashed var(--primary-gold);
    padding: 15px;
  }

  /* 5. Seitliches Scrollen für Autoren & Blogger OHNE Scrollbar (Perfekter Swipe) */
  .authors-grid {
    /* Flexbox ist für seitliches Scrollen auf Handys am besten */
    display: flex !important; 
    flex-wrap: nowrap !important;
    
    /* WICHTIG: Zwingt das Grid auf Bildschirmbreite, damit NUR der Inhalt scrollt */
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* Butterweiches Wischen auf dem iPhone */
    
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    gap: 15px;
    padding-bottom: 20px; /* Platz für den Kartenschatten */
    scroll-snap-type: x mandatory; /* Rastet sanft bei der nächsten Karte ein */
  }

  /* DER TRICK: Wenn das JS "display: none" setzt, blenden wir es absolut aus! 
     So gibt es keine Konflikte mehr zwischen Autoren- und Blogger-Liste. */
  .authors-grid[style*="display: none"],
  .authors-grid[style*="display:none"] {
    display: none !important;
  }

  .authors-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  .author-card {
    flex: 0 0 240px !important; /* Nagelt die Kartenbreite fest */
    max-width: 80vw;
    scroll-snap-align: start; /* Einrast-Punkt */
    touch-action: pan-x pan-y; /* Erlaubt dem Browser nur sauberes Scrollen */
  }
}

/* ==========================================================================
   24. MOBILE SIDEBAR BUTTONS & ACCORDIONS
   ========================================================================== */
.sidebar-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 248, 250, 0.8));
  border: 1px solid rgba(0, 51, 78, 0.2);
  color: var(--primary-blue);
  font-family: 'Patrick Hand', cursive;
  font-size: 1.15rem;
  padding: 12px 15px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  width: 100%;
}
.sidebar-btn:hover {
  background: var(--primary-gold);
  color: #12181b;
  border-color: var(--primary-gold);
  transform: translateY(-2px);
}
body.dark-mode .sidebar-btn {
  background: rgba(255,255,255,0.05);
  color: #e0e6ed;
  border-color: rgba(255,255,255,0.1);
}
body.dark-mode .sidebar-btn:hover {
  background: var(--primary-gold);
  color: #12181b;
}

@media (max-width: 900px) {
  /* Accordion Logik */
  .mobile-accordion.collapsed > *:not(.mobile-accordion-header) {
    display: none !important;
  }
  .mobile-accordion-header {
    cursor: pointer;
    transition: opacity 0.2s;
    padding-bottom: 10px;
    margin-bottom: 0 !important; 
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-accordion-header:active {
    opacity: 0.7;
  }
  .mobile-accordion:not(.collapsed) .mobile-accordion-header {
    border-bottom: 2px dashed var(--primary-gold);
    margin-bottom: 15px !important;
  }
  
  /* Der CSS-Pfeil */
  .accordion-title::after {
    content: '▼';
    display: inline-block;
    margin-left: 12px;
    color: var(--primary-gold);
    transition: transform 0.3s ease;
    font-size: 1.1rem;
    vertical-align: middle;
  }
  .mobile-accordion:not(.collapsed) .accordion-title::after {
    transform: rotate(180deg);
  }
}
.three-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .three-col-grid {
    display: none; 
    grid-template-columns: 1fr;
  }
  .three-col-grid.open {
    display: grid;
  }
}

.slanted-bg-section {
  position: relative;
  z-index: 1;
  padding: 60px 15px; 
  margin: 40px 0;  
}

@media (max-width: 900px) {
  .slanted-bg-section {
    margin-top: 15px;  
    padding-top: 1px; 
  }
}

.slanted-bg-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,51,78,0.85), rgba(212,175,55,0.6));
  transform: skewY(-3deg);
  transform-origin: center;
  z-index: -1;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
  border: 2px solid var(--primary-gold); 
  border-radius: 20px;
}

/* VIP Badge Styling auf der Card - GEFIXT */
.vip-badge-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--primary-gold), #ffdf73);
  color: var(--primary-blue);
  font-weight: bold;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  border: 2px solid white;
  z-index: 20;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.vip-badge-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}
/* Bestseller Grid Desktop */
.bestseller-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.bestseller-card {
  background: rgba(255,255,255,0.95);
  border: 2px solid var(--primary-gold);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}
.bestseller-card:hover {
  transform: translateY(-3px);
}
.bs-img-wrapper {
  flex-shrink: 0;
  width: 90px;
  height: 135px;
}
.bs-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.bs-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.bs-text {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
  margin: 0 0 10px 0;
  flex-grow: 1;
}
.bs-btn {
  background: var(--primary-gold);
  color: var(--primary-blue);
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  transition: 0.2s;
  display: block;
}
.bs-btn:hover {
  filter: brightness(0.95);
}

/* Bestseller Carousel Mobile */
@media (max-width: 900px) {
  .bestseller-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px; /* Platz für den Scrollbar */
    scroll-behavior: smooth;
  }
  .bestseller-wrapper::-webkit-scrollbar {
    display: none; /* Versteckt den unschönen Browser-Scrollbar */
  }
  .bestseller-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .bestseller-card {
    min-width: 85%; /* Card nimmt fast den ganzen Screen ein */
    flex-direction: column; /* Bild nach oben, Text nach unten */
    align-items: center;
    text-align: center;
    scroll-snap-align: center; /* Rastet beim Wischen ein */
  }
  .bs-img-wrapper {
    width: 140px;
    height: 210px;
    margin-bottom: 10px;
  }
}
/* --- BESTSELLER DARK MODE FIX --- */
body.dark-mode .bestseller-card {
  background: rgba(30, 40, 50, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .bestseller-card .bs-text {
  color: #b0c4de !important; /* Gut lesbares helles Graublau */
}

body.dark-mode .bestseller-card h4 {
  color: var(--primary-gold) !important;
}
body.dark-mode .partner-logo {
  content: url('/data/davina_logo_white.webp');
}
/* --- AUTOREN-TYP BADGE (PROFIL & MODAL) --- */
.pub-type-badge,
#modalContent .pub-type-badge {
  background: var(--primary-gold) !important;
  color: #00334e !important; 
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 0.85rem;
  border: 2px solid white;
  
  display: inline-block;
}

/* Wichtig: Das Badge soll auch im Dark Mode exakt so bleiben! */
body.dark-mode .pub-type-badge,
body.dark-mode #modalContent .pub-type-badge {
  background: var(--primary-gold) !important;
  color: #12181b !important; /* Dunkel fast schwarz für den perfekten Kontrast */
  border: 2px solid white;
}
/* DUNKELMODUS FIX: MOBILE BOTTOM BAR */
body.dark-mode .mobile-bottom-bar {
  background: linear-gradient(180deg, rgba(30, 40, 50, 0.95), rgba(20, 25, 30, 0.98)) !important;
  border-top-color: var(--stroke-strong) !important;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .mobile-bottom-bar button {
  color: var(--primary-gold) !important; /* Icons/Text in Gold statt Blau */
}

body.dark-mode .mobile-bottom-bar button:hover {
  color: #fff !important; /* Beim Antippen leuchten sie weiß auf */
}

/* ==========================================================================
   25. NEUE TOP NAVIGATION (DESKTOP)
   ========================================================================== */
.global-top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; /* Erzwingt die komplette Breite! */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 250, 0.95));
  border-bottom: 2px solid var(--primary-gold);
  box-shadow: 0 4px 15px rgba(0, 51, 78, 0.08);
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
}

.top-nav-inner {
  max-width: 1200px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.top-nav-brand {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  color: var(--primary-gold);
  font-weight: normal;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.top-nav-links {
  display: flex;
  gap: 8px;
}

.top-nav-links button {
  background: transparent;
  border: none;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.15rem;
  color: var(--primary-blue);
  cursor: pointer;
  transition: all 0.2s;
  padding: 5px 12px;
  border-radius: 8px;
}

.top-nav-links button:hover {
  color: var(--primary-gold);
  background: rgba(0, 51, 78, 0.05);
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle-top {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.theme-toggle-top:hover { transform: scale(1.1); }

.auth-btn-top {
  background: var(--primary-blue);
  color: white;
  border: none;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.05rem;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.auth-btn-top:hover { 
  background: var(--primary-gold); 
  color: var(--primary-blue); 
  transform: translateY(-1px);
}

/* Auf Mobile verstecken */
@media (max-width: 900px) {
  .global-top-nav { display: none !important; }
}

/* Damit die Seite nicht unter der Navbar verschwindet */
body {
  padding-top: 70px; /* Abstand für die fixierte Leiste */
}

@media (max-width: 900px) {
  body { padding-top: 12px; } /* Auf Mobile wieder zurücksetzen */
}

/* ==========================================================================
   26. BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-gold);
  color: var(--primary-blue);
  border: 2px solid white;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-blue);
  color: var(--primary-gold);
  transform: translateY(-3px) scale(1.05);
}

/* Mobile anpassen (über die Bottom Bar legen) */
@media (max-width: 900px) {
  .back-to-top {
    bottom: 90px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

/* DUNKELMODUS FIXES (TOP NAV & BACK TO TOP) */
body.dark-mode .global-top-nav {
  background: linear-gradient(180deg, rgba(20, 25, 30, 0.98), rgba(30, 40, 50, 0.95)) !important;
  border-bottom-color: rgba(212, 175, 55, 0.4) !important;
}
body.dark-mode .top-nav-links button {
  color: #e0e6ed !important;
}
body.dark-mode .top-nav-links button:hover {
  color: var(--primary-gold) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}
body.dark-mode .auth-btn-top {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e0e6ed !important;
}
body.dark-mode .auth-btn-top:hover {
  background: var(--primary-gold) !important;
  color: #12181b !important;
}
body.dark-mode .back-to-top {
  background: rgba(30, 40, 50, 0.9);
  color: var(--primary-gold);
  border-color: rgba(255, 255, 255, 0.2);
}
body.dark-mode .back-to-top:hover {
  background: var(--primary-gold);
  color: #12181b;
}

/* FIX: SCROLLBEREICH MOBILE SIDEBAR */
@media (max-width: 900px) {
  .mobile-sidebar {
    /* Gibt der Sidebar unten extra viel Platz, damit man den 
       Inhalt über die Bottom-Bar hinaus hochscrollen kann */
    padding-bottom: calc(120px + env(safe-area-inset-bottom)) !important;
  }
}

/* --- MAGAZIN TEASER (Startseite) --- */
.magazin-card {
  background-color: #ffffff;
}
.magazin-badge {
  background-color: var(--primary-blue);
  color: #ffffff;
}
.magazin-title {
  color: var(--primary-blue);
}
.magazin-text {
  color: #555555;
}

/* Dark Mode Anpassungen für Magazin Teaser */
body.dark-mode .magazin-card {
  background-color: rgba(30, 40, 50, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .magazin-badge {
  background-color: var(--primary-gold) !important;
  color: var(--primary-blue) !important;
}
body.dark-mode .magazin-title {
  color: var(--primary-gold) !important; /* Hebt den Titel edel hervor */
}
body.dark-mode .magazin-text {
  color: #e0e6ed !important; /* Helles Grau für gute Lesbarkeit */
}

/* ==========================================================================
   27. APP-LAYOUT: MOBILE OPTIMIERUNG (DASHBOARDS)
   ========================================================================== */
@media (max-width: 900px) {
  /* 1. Body Padding links/rechts/oben entfernen 
        (Padding-bottom lassen wir in Ruhe wegen der Bottom-Bar!) */
  body {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 2. Container auf 100% Breite zwingen und Top-Margin entfernen */
  .container {
    margin-top: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 3. Die Gesamtcard unsichtbar machen (nur noch als unsichtbarer Container) */
  .page-card.card-style {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 10px !important; /* Sorgt für einen leichten, sauberen Rand zum Bildschirm */
  }

  /* Dark Mode Fix für die unsichtbare Hauptkarte */
  body.dark-mode .page-card.card-style {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* 4. Abstände im Grid (Dashboard) deutlich verkleinern */
  .dashboard-grid {
    gap: 12px !important;
    margin-top: 10px !important;
  }

  /* 5. Innere Cards anpassen (weniger inneres Padding, moderner App-Radius) */
  .card-style {
    padding: 15px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06) !important; /* Etwas flacherer Schatten */
  }

  /* Header isolieren, damit er wie eine eigene App-Bar wirkt */
  .header-card {
    border-radius: 12px !important;
    margin-bottom: 15px !important;
  }
}

/* Noch engere Abstände für Smartphones (iPhones etc.) */
@media (max-width: 600px) {
  /* Fast bis an den Bildschirmrand herangehen */
  .page-card.card-style {
    padding: 8px 6px !important;
  }
  
  .card-style {
    padding: 12px !important;
    border-radius: 10px !important;
  }
}

/* Nur für Smartphones: Logo nach unten rücken */
@media (max-width: 600px) {
  .brand-logo {
    margin-top: -80px !important; /* Hier kannst du den Wert anpassen, z.B. -80px oder -100px */
  }
}

/* Verhindert, dass Modals von der Bottom-Bar verdeckt werden */
.modal-overlay {
  /* Schiebt das unsichtbare Padding unten hoch, inkl. iPhone-Balken */
  padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important;
}

.info-card {
  /* Begrenzt die maximale Höhe der Karte, damit sie sauber scrollbar bleibt */
  max-height: calc(100vh - 130px - env(safe-area-inset-bottom)) !important;
}

/* Hebt den Ticker über den unsichtbaren Rand des Logos */
.news-ticker-container {
  position: relative;
  z-index: 50 !important; /* Der Header hat z-index: 10, der Ticker liegt nun darüber */
}

/* Tauscht das Startseiten-Logo im Dark Mode aus */
body.dark-mode #mainBrandLogo {
  content: url('/data/truedark.webp') !important; /* Hier den Namen deines dunklen Logos eintragen! */
}

/* ==========================================================================
   28. LOKALE SCHRIFTARTEN (DSGVO-KONFORM)
   ========================================================================== */

/* Patrick Hand (Hauptschriftart) */
@font-face {
  font-family: 'Patrick Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap; /* Sorgt dafür, dass Text sofort sichtbar ist, bis die Schrift geladen ist */
  src: url('/assets/fonts/patrick-hand-v25-latin-regular.woff2') format('woff2');
}

/* Great Vibes (Für Slogans & Logos) */
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/great-vibes-v21-latin-regular.woff2') format('woff2');
}

/* SCHRIFTART WECHSLER (FONT TOGGLE) */
body.alt-font {
  /* Nutzt die perfekt lesbare Standard-Schrift des jeweiligen Betriebssystems */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif !important;
}

/* Wichtig: Alle Elemente, die eine eigene Font-Deklaration haben, 
   müssen hier gezwungen werden, die Schrift zu erben */
body.alt-font .nav-btn, 
body.alt-font .footer-btn, 
body.alt-font .action-btn, 
body.alt-font .form-input, 
body.alt-font .form-textarea,
body.alt-font .search-input,
body.alt-font .sidebar-btn,
body.alt-font .switcher-btn,
body.alt-font .close-modal,
body.alt-font .toast-msg,
body.alt-font .top-nav-links button, /* Fix für die obere Leiste */
body.alt-font .auth-btn-top,
body.alt-font .mtb-btn          /* Fix für den Login/Profil-Button oben */
{
  font-family: inherit !important;
}

/* ==========================================================================
   29. NATIVE APP HEADER (MOBILE TOP BAR)
   ========================================================================== */

/* Auf dem Desktop standardmäßig unsichtbar */
.mobile-top-bar {
  display: none;
}

@media (max-width: 900px) {
  /* Die neue, schlanke App-Bar einblenden */
  .mobile-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 250, 0.98));
    border-bottom: 2px solid var(--primary-gold);
    z-index: 1000;
    padding: 0 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Damit der Inhalt der Seite nicht unter der festen Leiste verschwindet */
  body {
    padding-top: 75px !important; 
  }

  /* WICHTIG: Den alten, klobigen Desktop-Header auf Handys radikal ausblenden! */
  .header-card {
    display: none !important;
  }

  /* --- Linke Seite (Logo & Brand) --- */
  .mtb-left {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
  }

  .mtb-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--primary-gold);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  .mtb-brand {
    font-family: 'Great Vibes', cursive;
    font-size: 1.6rem;
    color: var(--primary-blue);
    line-height: 1;
    padding-top: 4px; /* Leichter Ausgleich für geschwungene Schriften */
  }

  /* --- Rechte Seite (Uhrzeit & Button) --- */
  .mtb-right {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mtb-time {
    font-size: 0.85rem;
    color: #888;
    font-family: monospace;
    font-weight: bold;
    
    /* NEU: Verhindert Wackeln beim Wechseln und schiebt es nach rechts */
    min-width: 80px; 
    text-align: right;
    margin-right: 2px; /* Reduziert den Abstand zum Button */
    
    /* Verstecke die Uhrzeit auf sehr schmalen Displays (z.B. altes iPhone SE) */
    display: none; 
  }

  /* Ab 390px Breite (moderne Smartphones) ist genug Platz für die Uhrzeit */
  @media (min-width: 390px) {
    .mtb-time { display: block; }
  }

  .mtb-btn {
    font-family: 'Patrick Hand', cursive;
    font-size: 1rem;
    padding: 4px 14px;
    border-radius: 20px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  }

  .mtb-login {
    background: var(--primary-blue);
    color: white;
  }

  .mtb-logout {
    background: #c0392b;
    color: white;
  }

  /* --- Dark Mode Anpassungen --- */
  body.dark-mode .mobile-top-bar {
    background: linear-gradient(180deg, rgba(20, 25, 30, 0.95), rgba(30, 40, 50, 0.98));
    border-bottom-color: var(--stroke-strong);
  }
  body.dark-mode .mtb-brand {
    color: var(--primary-gold);
  }
  body.dark-mode .mtb-time {
    color: #aaa;
  }
  body.dark-mode .mtb-login {
    background: var(--primary-gold);
    color: #12181b;
  }
}

/* ==========================================================================
   30. FAQ AKKORDEON LOGIK
   ========================================================================== */
.faq-item.open .faq-answer { display: block !important; }
.faq-item.open .faq-arrow { transform: rotate(180deg); display: inline-block; }

/* Dark Mode Anpassung für FAQ */
body.dark-mode .faq-item .faq-answer { color: #b0c4de !important; border-top-color: rgba(255,255,255,0.1) !important; }

/* ==========================================================================
   31. ZUSÄTZLICHE HILFSKLASSEN & MEDIEN
   ========================================================================== */
@media (max-width: 768px) {
  .mobile-filter-toggle {
    display: block; /* oder flex, inline-block, je nach Layout */
    width: 100%;
    margin-bottom: 15px;
  }
}

@media (min-width: 901px) {
  .hide-on-desktop {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .hide-on-mobile {
    display: none !important;
  }
  /* Ändert die Schriftfarbe der Highlights-Überschrift NUR auf dem Handy */
  .mobile-white-title {
    color: #f0f4f8 !important;
  }
}

/* (Optional) Damit es im Dark Mode auf dem Handy trotzdem schön Gold bleibt: */
body.dark-mode .mobile-white-title {
  color: var(--primary-gold) !important;
}

.magazin-davina-logo {
  max-width: 140px; 
  margin-bottom: 15px; 
  mix-blend-mode: multiply; /* Entfernt den weißen Hintergrund im Light Mode */
}

body.dark-mode .magazin-davina-logo {
  mix-blend-mode: normal; /* Wichtig, sonst wird das weiße Logo unsichtbar! */
  content: url('/data/davina_logo_white.webp');
}

/* VIEWS, BADGES & SHARE BUTTONS */
.card-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode .card-footer-meta {
  border-top: 1px solid rgba(255,255,255,0.05);
}

.view-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-count {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.neu { background: #e0f2fe; color: #0284c7; }
.status-badge.lesenswert { background: #fef08a; color: #854d0e; }
.status-badge.highlight { background: #fee2e2; color: #b91c1c; }

body.dark-mode .status-badge.neu { background: #0c4a6e; color: #7dd3fc; }
body.dark-mode .status-badge.lesenswert { background: #422006; color: #fde047; }
body.dark-mode .status-badge.highlight { background: #450a0a; color: #fca5a5; }

.share-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--primary-gold);
  transition: transform 0.2s;
  padding: 5px;
}

.share-btn:hover {
  transform: scale(1.15);
}
/* ==========================================================================
   APP SUCHE: HYBRID LAYOUT (MOBILE = VOLLBILD, DESKTOP = MODAL)
   ========================================================================== */
.fullscreen-search-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 9990; /* HIER WAR EINE 9 ZU VIEL! Geändert auf 9990 */
    display: none; 
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    overflow: hidden;
    background: rgba(10, 40, 60, 0.62); 
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.fullscreen-search-content {
    display: flex;
    flex-direction: column;
    background: var(--bg-color, #ffffff);
    width: 100%;
    height: 100%;
}

/* Mobile-Ansicht: Echtes Vollbild (ohne abgedunkelten Rahmen) */
@media (max-width: 900px) {
    .fullscreen-search-overlay {
        background: var(--bg-color, #ffffff); 
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        z-index: 9990; /* Unter der Bottom Bar auf Mobile */
        justify-content: flex-start;
        align-items: stretch;
    }
}

/* Desktop-Ansicht: Schickes schwebendes Modal */
@media (min-width: 901px) {
    .fullscreen-search-content {
        width: min(1000px, 100%);
        height: 85vh; /* Etwas Platz oben und unten */
        border-radius: 15px;
        border: 1px solid rgba(212, 175, 55, 0.55);
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
        animation: popUp 0.3s ease-out;
    }
}

.fs-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid var(--primary-gold);
    background: var(--bg-color, #ffffff);
}
/* Desktop: Oben abgerundet, damit es in den Container passt */
@media (min-width: 901px) {
    .fs-header { border-top-left-radius: 15px; border-top-right-radius: 15px; }
}

.fs-header h2 { margin: 0; color: var(--primary-blue); font-size: 1.5rem; font-family: 'Great Vibes', cursive; font-weight: normal; }
.fs-header button { background: none; border: none; font-size: 1.8rem; color: var(--primary-blue); cursor: pointer; padding: 0; line-height: 1; }

.fs-filters {
    padding: 15px;
    display: flex; flex-direction: column; gap: 12px;
    background: rgba(0, 51, 78, 0.03);
    border-bottom: 1px solid #eee;
}

.fs-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.fs-tab { 
    flex: 1; padding: 8px 5px; 
    border: 1px solid var(--primary-gold); 
    background: transparent; color: var(--primary-blue); 
    border-radius: 5px; cursor: pointer; font-size: 0.9rem; font-weight: bold; transition: 0.2s;
    min-width: 80px; text-align: center;
}
.fs-tab.active { background: var(--primary-gold); color: var(--primary-blue); }

.fs-dropdowns { display: flex; gap: 10px; }
.fs-dropdowns select { flex: 1; padding: 10px; background: #fff; cursor: pointer; border: 1px solid #ccc; font-size: 0.95rem; }

.fs-results {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex; flex-direction: column; gap: 12px;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 50px;
}

/* Die schmalen Rechteck-Cards */
.fs-card {
    display: flex; align-items: center; padding: 10px 15px; gap: 15px;
    background: var(--card-bg, #ffffff);
    border: 1px solid #eee; border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer; transition: 0.2s;
}
.fs-card:active { transform: scale(0.98); background: #fafafa; }

.fs-card-img-book { 
    width: 45px; height: 65px; border-radius: 4px; object-fit: cover; border: 1px solid #ccc; flex-shrink: 0; 
}
.fs-card-img-book-placeholder { 
    width: 45px; height: 65px; border-radius: 4px; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; border: 1px solid #ccc; flex-shrink: 0; color: #999; 
}

.fs-card-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-gold); flex-shrink: 0; }
.fs-card-img-placeholder { width: 50px; height: 50px; border-radius: 50%; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 1rem; border: 2px solid var(--primary-gold); flex-shrink: 0; color: #999; font-weight: bold;}

.fs-card-info { flex: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.fs-card-name { font-weight: bold; color: var(--primary-blue); font-size: 1.05rem; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fs-card-badge { display: inline-block; padding: 3px 8px; font-size: 0.7rem; border-radius: 12px; font-weight: bold; width: fit-content; text-transform: uppercase; letter-spacing: 0.5px;}
.badge-author { background: rgba(0,51,78,0.1); color: var(--primary-blue); border: 1px solid var(--primary-blue); }
.badge-blogger { background: rgba(212,175,55,0.2); color: #8a6d1c; border: 1px solid var(--primary-gold); }
.badge-both { background: linear-gradient(135deg, rgba(0,51,78,0.1), rgba(212,175,55,0.2)); color: var(--primary-blue); border: 1px solid var(--primary-gold); }

/* Sidebar immer ganz nach vorne holen */
.mobile-sidebar {
    z-index: 10005 !important;
}
.mobile-sidebar-overlay {
    z-index: 10000 !important;
}

/* ==========================================================================
   APP SUCHE: DUNKELMODUS (DARK MODE OVERRIDES)
   ========================================================================== */
body.dark-mode .fullscreen-search-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
}

body.dark-mode .fullscreen-search-content {
    background: linear-gradient(135deg, rgba(30, 40, 50, 0.98) 0%, rgba(20, 25, 30, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .fs-header {
    background: transparent !important;
    border-bottom-color: rgba(212, 175, 55, 0.4) !important;
}

body.dark-mode .fs-header h2 { color: var(--primary-gold) !important; }
body.dark-mode .fs-header button { color: var(--primary-gold) !important; }

body.dark-mode .fs-filters {
    background: rgba(0, 0, 0, 0.2) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .fs-tab {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #e0e6ed !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .fs-tab:hover {
    border-color: var(--primary-gold) !important;
    color: var(--primary-gold) !important;
}

body.dark-mode .fs-tab.active {
    background: var(--primary-gold) !important;
    color: #12181b !important;
    border-color: var(--primary-gold) !important;
}

body.dark-mode .fs-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .fs-card:active {
    background: rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .fs-card-name {
    color: var(--primary-gold) !important;
}

body.dark-mode .fs-card-img-placeholder,
body.dark-mode .fs-card-img-book-placeholder {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #b0c4de !important;
}

body.dark-mode .fs-dropdowns select {
    background: rgba(0, 0, 0, 0.3) !important;
    color: #e0e6ed !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
/* =========================================
   MAGAZIN LAYOUT SPEZIFISCHES CSS
   ========================================= */
html, body {
    overflow-x: hidden;
    width: 100%;
}

* {
    box-sizing: border-box;
}

.magazin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    overflow-x: hidden;
}

.top-mag-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 50px;
}

.rect-card {
    background: linear-gradient(135deg, rgba(224, 234, 240, 0.92) 0%, rgba(251, 246, 232, 0.92) 100%);
    border: 1px solid var(--stroke);
    border-radius: 6px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    word-break: break-word;
}

body.dark-mode .rect-card {
    background: linear-gradient(135deg, rgba(30, 40, 50, 0.9) 0%, rgba(20, 25, 30, 0.9) 100%);
    border-color: rgba(255,255,255,0.1);
}

.rect-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-gold);
}

.mag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    grid-auto-flow: dense;
    margin-bottom: 50px;
}

.mag-card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.mag-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.mag-card.large .mag-img {
    height: 380px;
}

.mag-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    background: var(--primary-gold);
    color: var(--primary-blue);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    align-self: flex-start;
    margin-bottom: 10px;
}

.mag-subtitle {
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    opacity: 0.9;
    font-size: 1.2rem;
    margin-top: -5px;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.promo-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    height: 100%;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.promo-card:hover { transform: translateY(-5px); }

/* Layout für Blocksatz und Inlines */
.article-content-body {
    text-align: justify;
    hyphens: auto;
    word-wrap: break-word;
}
.article-meta {
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 10px;
    margin-bottom: 25px;
    font-style: italic;
}
.inline-img {
    width: 40%;
    max-width: 300px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.inline-left { float: left; margin: 5px 20px 10px 0; shape-outside: margin-box; }
.inline-right { float: right; margin: 5px 0 10px 20px; shape-outside: margin-box; }

/* =========================================
   MOBILE & RESPONSIVE LAYOUT FIXES
   ========================================= */
@media (max-width: 1000px) {
    .top-mag-grid { 
        grid-template-columns: 1fr; 
        display: flex; 
        flex-direction: column; 
    }
    /* Zieht den Fokus-Artikel auf mobilen Geräten nach ganz oben! */
    .pinned-mobile-first { 
        order: -1; 
    }
}

@media (max-width: 768px) {
    .magazin-container h1 { font-size: 3rem !important; }
    .magazin-container h2 { font-size: 2.2rem !important; }
    .mag-subtitle { font-size: 1rem !important; margin-top: 5px !important; line-height: 1.4; }
    .top-mag-grid { margin-bottom: 30px; gap: 20px; }
    .mag-grid { gap: 15px; margin-bottom: 30px; }
    .mag-card.large { grid-column: span 1; grid-row: span 1; }
    .mag-card.large .mag-img { height: 220px; }
    .inline-img { width: 100%; max-width: 100%; float: none; margin: 15px 0; }
    .promo-grid { grid-template-columns: 1fr; }
    #infoCard { padding: 20px !important; margin: 10px !important; width: calc(100% - 20px) !important; max-height: 90vh !important; }
    #modalContent h1 { font-size: 1.8rem !important; }
}