/* =========================
   Chucky & KxShiShi Love Diary
   styles.css mit Date-Pill, großen Hearts, Thumbnails & Modal
   ========================= */

:root {
  --bg: #05060a;
  --bg-soft: #020308;
  --timeline-line: rgba(255, 255, 255, 0.18);
  --text: #f5f5f5;
  --muted: #9ca3af;
  --accent: #9146ff;                 /* Chucky-Lila */
  --accent-soft: rgba(145, 70, 255, 0.4);
  --shishi: #ff4fa3;                 /* Shishi-Pink */
  --card-bg: rgba(9, 9, 15, 0.96);
  --border-soft: rgba(255, 255, 255, 0.06);
  --radius-xl: 22px;
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.6);
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1.4);
  --heart-red: #ff2757;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro", sans-serif;

  /* Oben Shishi-Glow, unten Chucky-Glow, dazwischen tiefer Dunkelverlauf */
  background:
    radial-gradient(
      circle at top center,
      rgba(255, 79, 163, 0.26) 0%,
      rgba(255, 79, 163, 0.10) 20%,
      rgba(255, 79, 163, 0.03) 35%,
      transparent 55%
    ),
    radial-gradient(
      circle at bottom center,
      rgba(145, 70, 255, 0.22) 0%,
      rgba(145, 70, 255, 0.10) 18%,
      rgba(145, 70, 255, 0.03) 34%,
      transparent 60%
    ),
    linear-gradient(
      180deg,
      #111827 0%,
      #05060a 40%,
      #020308 75%,
      #000000 100%
    );
  background-color: #000000;

  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 40px 12px;
}

body.modal-open {
  overflow: hidden;
}

.love-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.love-header {
  text-align: center;
  margin-bottom: 40px;
}

.love-header h1 {
  margin: 0 0 8px;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #9146ff, #ff4fa3);
  -webkit-background-clip: text;
  color: transparent;
}

.love-header p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
}

/* =========================
   Header Image + Hover-Quote
   ========================= */

.love-image {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.love-image img {
  width: 320px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.8);
  object-fit: cover;
  transition:
    transform 0.4s ease-out,
    box-shadow 0.4s ease-out,
    filter 0.4s ease-out;
}

/* Bild wird beim Hover wärmer und leicht intensiver */
.love-image:hover img {
  transform: scale(1.02);
  box-shadow: 0 0 36px rgba(255, 79, 163, 0.4);
  filter: saturate(1.15) contrast(1.05);
}

/* Schreibschrift-Quote final leicht gekürzt */
.love-quote {
  position: absolute;
  bottom: 11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 20px 7px;
  border-radius: 999px;
  width: 100%;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.98);
  font-family: "Dancing Script", cursive;
  font-size: 1.2rem;
  text-align: center;
  white-space: normal;
  text-shadow:
    0 0 8px rgba(255, 79, 163, 0.9),
    0 0 14px rgba(145, 70, 255, 0.7),
    0 3px 12px rgba(0, 0, 0, 0.95);
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.82)
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 14px rgba(255, 79, 163, 0.22);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.love-image:hover .love-quote {
  opacity: 1;
  transform: translateX(-50%) translateY(-3px);
}

@media (max-width: 600px) {
  .love-image img {
    width: 85%;
    border-radius: 14px;
  }

  .love-quote {
    font-size: 1.05rem;
    bottom: 8px;
    width: 98%;
    max-width: 98%;
    padding: 4px 14px 5px;
  }
}

/* =========================
   Timeline
   ========================= */

.timeline {
  position: relative;
  padding: 10px 0 40px;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--timeline-line);
  transform-origin: center top;
  transition:
    background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform 0.15s ease-out;
  z-index: 0;
}

.timeline-entries {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 110px;
  z-index: 1;
}

/* Einträge vom selben Tag näher zusammenziehen */
.timeline-entry[data-same-day="true"] {
  margin-top: -70px;
}

/* =========================
   Entries
   ========================= */

.timeline-entry {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.timeline-entry.left {
  justify-content: flex-start;
}

.timeline-entry.right {
  justify-content: flex-end;
}

/* =========================
   Date Marker (Pill auf Timeline)
   =========================
   Script erzeugt:
   <div class="heart-marker">
     <div class="heart-date">DD.MM.</div>
     <div class="heart-year">YYYY</div>
   </div>
*/

.heart-marker {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(-50%);
  width: 130px;
  height: 50px;
  z-index: 2;
  pointer-events: none;
  animation: markerPulse 2.6s ease-in-out infinite;
}

/* Pill Hintergrund + Border (neutral auf der Timeline) */
.heart-marker::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 3px solid var(--timeline-line);
  background: radial-gradient(circle at top, #070a12 0%, #020308 85%);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.9);
  z-index: -1;
}

/* Datum + Jahr in der Pill */

.heart-date,
.heart-year {
  width: 100%;
  text-align: center;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

.heart-date {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
}

.heart-year {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

/* Marker Puls */

@keyframes markerPulse {
  0%, 100% {
    transform: translateX(-50%) translateY(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-52%) scale(1.03);
  }
}

/* Marker Glow bei Hover (Klassen aus JS) */

.marker-active-chucky::before {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(145, 70, 255, 0.9);
}

.marker-active-shishi::before {
  border-color: var(--shishi);
  box-shadow: 0 0 18px rgba(255, 79, 163, 0.9);
}

/* =========================
   Entry Cards
   ========================= */

.entry-card {
  position: relative;
  max-width: 380px;
  padding: 14px 16px 12px;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  font-size: 0.9rem;
  line-height: 1.6;
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    border-color var(--transition-fast),
    background-color var(--transition-fast);
  cursor: default;
  z-index: 4;
}

.entry-card .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.7rem;
  color: var(--muted);
}

.entry-card .author {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entry-card .content {
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Seite je nach Sender */

.timeline-entry.left .entry-card {
  margin-left: 40px;
  border-left: 2px solid var(--accent-soft);
}

.timeline-entry.right .entry-card {
  margin-right: 40px;
  border-right: 2px solid rgba(255, 79, 163, 0.4);
}

/* Hover-Effekt Karten */

.timeline-entry.left .entry-card:hover {
  transform: translateY(-5px) translateX(3px) rotate(-0.45deg);
  box-shadow: 0 20px 60px rgba(145, 70, 255, 0.55);
  border-color: rgba(145, 70, 255, 0.9);
}

.timeline-entry.right .entry-card:hover {
  transform: translateY(-5px) translateX(-3px) rotate(0.45deg);
  box-shadow: 0 20px 60px rgba(255, 79, 163, 0.55);
  border-color: rgba(255, 79, 163, 0.95);
}

/* =========================
   Herz in den Nachrichten
   ========================= */

.entry-heart {
  margin-left: auto;
  font-size: 32px;
  display: inline-block;
  color: var(--heart-red);
  text-shadow: 0 0 10px rgba(255, 39, 87, 0.9);
  transform-origin: center;
  animation: heartBeat 1.2s infinite;
  transition:
    color var(--transition-fast),
    text-shadow var(--transition-fast),
    transform var(--transition-fast);
}

@keyframes heartBeat {
  0%, 100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.25);
  }
  30% {
    transform: scale(0.95);
  }
  45% {
    transform: scale(1.15);
  }
  60% {
    transform: scale(1);
  }
}

.entry-heart-chucky.entry-heart-active,
.timeline-entry.left .entry-card:hover .entry-heart-chucky {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(145, 70, 255, 0.95);
}

.entry-heart-shishi.entry-heart-active,
.timeline-entry.right .entry-card:hover .entry-heart-shishi {
  color: var(--shishi);
  text-shadow: 0 0 18px rgba(255, 79, 163, 0.95);
}

/* =========================
   Timeline Wobble (Line)
   ========================= */

@keyframes wobble-line-left {
  0% { transform: translateX(0); }
  20% { transform: translateX(-3px) rotate(-0.2deg); }
  40% { transform: translateX(2px) rotate(0.2deg); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

@keyframes wobble-line-right {
  0% { transform: translateX(0); }
  20% { transform: translateX(3px) rotate(0.2deg); }
  40% { transform: translateX(-2px) rotate(-0.2deg); }
  60% { transform: translateX(1px); }
  80% { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}

.timeline-line.wobble-left {
  animation: wobble-line-left 0.42s ease-out;
}

.timeline-line.wobble-right {
  animation: wobble-line-right 0.42s ease-out;
}

/* =========================
   Status Messages
   ========================= */

.love-loading,
.love-error {
  margin-top: 18px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* =========================
   Thumbnails unter den Einträgen
   ========================= */

.entry-media {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entry-media img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.entry-media img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.9);
}

/* =========================
   Bild-Modal (Zoom)
   ========================= */

.image-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
}

.image-modal[hidden] {
  display: none;
}

.image-modal-bg {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.image-modal-box {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 90vh;
  padding: 14px;
  border-radius: 16px;
  background: rgba(9, 9, 15, 0.98);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-box img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  display: block;
}

.image-modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease-out, transform 0.2s ease-out;
}

.image-modal-close:hover {
  color: var(--shishi);
  transform: scale(1.1);
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 760px) {
  body {
    padding: 24px 8px;
  }

  .love-header h1 {
    font-size: 2.1rem;
  }

  .entry-card {
    max-width: 92vw;
  }

  .timeline-entry.left .entry-card,
  .timeline-entry.right .entry-card {
    margin-left: 32px;
    margin-right: 32px;
  }

  .heart-marker {
    width: 110px;
    height: 46px;
  }

  .heart-date {
    font-size: 14px;
  }

  .heart-year {
    font-size: 10px;
  }
}

/* =========================
   Graues Wasserzeichen in jedem Beitrag
   ========================= */

.love-wrapper {
  --wm-size: 40px;           /* Größe */
  --wm-offset: 12px;         /* Abstand vom Rand */
  --wm-opacity: 0.6;         /* Sichtbarkeit */
  --wm-color: #8a8a8a;       /* Grau */
}

.timeline-entry .entry-card {
  position: relative; /* zur Sicherheit */
}

/* Wasserzeichen unten rechts */
.timeline-entry .entry-card::after {
  content: "";
  position: absolute;
  right: var(--wm-offset);
  bottom: var(--wm-offset);

  width: var(--wm-size);
  height: var(--wm-size);

  /* Graue Farbe + Maske aus deinem Herz */
  background: var(--wm-color);
  mask: url("img/watermark-heart.png") no-repeat center;
  mask-size: contain;

  /* Safari / iOS Support */
  -webkit-mask: url("img/watermark-heart.png") no-repeat center;
  -webkit-mask-size: contain;

  opacity: var(--wm-opacity);
  pointer-events: none;

  filter: drop-shadow(0 0 4px rgba(0,0,0,0.5));
}
