/* ── Detektiv-Notizbuch ── */
/* Fixierter Button unten links, überall sichtbar */
.notizbuch-float-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 100;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e1b2e 0%, #2d1f3d 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(245, 158, 11, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
  color: #f59e0b;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.notizbuch-float-btn:hover,
.notizbuch-float-btn:focus-visible {
  transform: scale(1.1);
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5), 0 0 25px rgba(245, 158, 11, 0.35);
  outline: none;
}

.notizbuch-float-btn:active {
  transform: scale(0.95);
}

/* Badge für neue Notizen */
.notizbuch-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  transition: transform 0.3s ease;
  line-height: 1;
}

.notizbuch-badge:empty {
  display: none;
}

/* ── Notizbuch-Modal ── */
.notizbuch-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: notizbuch-fade-in 0.25s ease;
}

.notizbuch-modal-overlay.is-open {
  display: flex;
}

@keyframes notizbuch-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.notizbuch-modal {
  position: relative;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  background: linear-gradient(145deg, #1a1625 0%, #231d33 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notizbuch-slide-up 0.3s ease;
}

@keyframes notizbuch-slide-up {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Modal-Kopf ── */
.notizbuch-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.notizbuch-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.notizbuch-modal-title-icon {
  font-size: 26px;
}

.notizbuch-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.notizbuch-modal-close:hover,
.notizbuch-modal-close:focus-visible {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  outline: none;
}

/* ── Modal-Inhalt (Seiten-Layout) ── */
.notizbuch-modal-pages-wrapper {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.notizbuch-modal-body {
  height: 100%;
  position: relative;
}

/* ── Einzelne Seite ── */
.notizbuch-page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 20px 24px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.notizbuch-page.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.notizbuch-page::-webkit-scrollbar {
  width: 5px;
}

.notizbuch-page::-webkit-scrollbar-track {
  background: transparent;
}

.notizbuch-page::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* ── Pfeil-Navigation ── */
.notizbuch-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.notizbuch-nav-arrow:hover,
.notizbuch-nav-arrow:focus-visible {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  outline: none;
}

.notizbuch-nav-arrow:active {
  transform: translateY(-50%) scale(0.9);
}

.notizbuch-nav-arrow--hidden {
  visibility: hidden;
  pointer-events: none;
}

.notizbuch-nav-arrow--prev {
  left: 2px;
}

.notizbuch-nav-arrow--next {
  right: 2px;
}

/* ── Einzelne Seite ── */
.notizbuch-page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 20px 40px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.notizbuch-page.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* ── Punkt-Indikatoren ── */
.notizbuch-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 14px;
  flex-shrink: 0;
}

.notizbuch-dots:empty {
  display: none;
}

.notizbuch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.notizbuch-dot.active {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

/* ── Seiten-Info ── */
.notizbuch-page-info {
  text-align: center;
  font-size: 12px;
  color: #475569;
  font-weight: 500;
  padding: 0 0 4px;
  flex-shrink: 0;
  user-select: none;
}

/* ── Fall-Gruppen ── */
.notizbuch-fall-gruppe {
  margin-bottom: 28px;
}

.notizbuch-fall-gruppe:last-child {
  margin-bottom: 0;
}

.notizbuch-fall-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.notizbuch-fall-icon {
  font-size: 20px;
}

.notizbuch-fall-name {
  font-size: 16px;
  font-weight: 700;
  color: #f59e0b;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.notizbuch-fall-count {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* ── Einzelne Notiz-Karte ── */
.notizbuch-notiz {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.notizbuch-notiz:last-child {
  margin-bottom: 0;
}

.notizbuch-notiz:hover {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}

/* Gesperrte Notiz */
.notizbuch-notiz--locked {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.notizbuch-notiz--locked:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

/* Neue (noch nie gesehene) Notiz */
.notizbuch-notiz--new {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.1);
}

.notizbuch-notiz--new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #f59e0b;
  border-radius: 0 3px 3px 0;
}

/* ── Notiz-Titel ── */
.notizbuch-notiz-titel {
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notizbuch-notiz--locked .notizbuch-notiz-titel {
  color: #64748b;
}

.notizbuch-notiz-titel .lock-icon {
  font-size: 14px;
  opacity: 0.6;
}

.notizbuch-notiz-titel .new-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

/* ── Notiz-Text ── */
.notizbuch-notiz-text {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  white-space: pre-line;
}

.notizbuch-notiz--locked .notizbuch-notiz-text {
  color: #475569;
}

/* ── Leerer Zustand ── */
.notizbuch-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.notizbuch-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.notizbuch-empty-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.notizbuch-empty-hint {
  font-size: 13px;
  color: #475569;
}