/* HGS whiteboard engine styles (/filme/, /workshops/, /blog/).
 * Owned by Agent B. Loaded after base.css — only adds to it, never overrides tokens. */

/* ---------- Photo background: fixed, heavily dimmed, slow Ken Burns drift ----------
 * One .page-bg div per board page holds the themed photo (src set per-page in HTML).
 * Sits behind all content via negative z-index; the ::after scrim keeps contrast high. */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: var(--bg);
}
.page-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.6) brightness(0.55);
  transform: scale(1);
  transform-origin: center center;
  animation: page-bg-kenburns 50s ease-in-out infinite alternate;
  will-change: transform;
}
.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 12, 16, 0.88) 0%,
    rgba(14, 12, 16, 0.8) 45%,
    rgba(14, 12, 16, 0.92) 100%
  );
}
@keyframes page-bg-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  .page-bg img { animation: none; }
}

/* Cards: modern frosted glass — gradient hairline ring, top highlight, hover lift */
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 20px;
  background:
    linear-gradient(rgba(22, 19, 26, 0.86), rgba(22, 19, 26, 0.86)) padding-box,
    linear-gradient(165deg, rgba(255, 158, 77, 0.4), rgba(242, 239, 233, 0.1) 38%, rgba(200, 107, 152, 0.28)) border-box;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  animation: card-in 0.4s ease backwards;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
}
.card:hover {
  background:
    linear-gradient(rgba(26, 22, 31, 0.9), rgba(26, 22, 31, 0.9)) padding-box,
    linear-gradient(165deg, rgba(255, 158, 77, 0.65), rgba(242, 239, 233, 0.16) 38%, rgba(200, 107, 152, 0.45)) border-box;
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
}
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .card:hover { transform: none; }
}

/* ---------- Compact page header (no full-viewport panel — list stays visible) ---------- */
.board-header {
  padding-top: calc(var(--nav-h) + 2.6rem);
  padding-bottom: 1.2rem;
}
.board-header .btn-primary { margin-top: 1.5rem; }

.board-status { margin-bottom: 1rem; }

/* ---------- Cards ---------- */
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.card-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.card-title-wrap h3 { margin: 0; }

/* Hairline pill housing the two icon buttons — calm, not loud */
.card-actions {
  display: flex;
  gap: 0.1rem;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem;
}
.icon-btn {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  opacity: 0.7;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { opacity: 1; color: var(--ink); background: rgba(242, 239, 233, 0.08); }
.icon-btn:focus-visible {
  opacity: 1;
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

/* Blog entry body: multiple paragraphs, calm spacing */
.entry-body p + p { margin-top: 0.7rem; }

.date-meta {
  display: block;
  margin-top: 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}
.justwatch-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px solid rgba(255, 158, 77, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.justwatch-link:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  opacity: 1;
  text-decoration: none;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tag.is-past { opacity: 0.5; }

.empty-card {
  text-align: center;
  padding: 3rem 1.5rem;
  background:
    linear-gradient(rgba(22, 19, 26, 0.6), rgba(22, 19, 26, 0.6)) padding-box,
    repeating-linear-gradient(135deg, rgba(242, 239, 233, 0.18) 0 6px, transparent 6px 12px) border-box;
}
.empty-card::before { display: none; }
.empty-card p { font-size: 1.02rem; margin: 0; }

/* ---------- Form validation ---------- */
.field-error {
  color: var(--accent-2);
  font-size: 0.82rem;
  margin-top: -0.15rem;
}
.input.invalid { border-color: var(--accent-2); }

/* Custom chevron on selects (mood choice) so it matches .input styling */
select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) center, calc(100% - 0.8rem) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

/* ---------- Code-modal shake (wrong access code) ---------- */
@keyframes hgs-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.modal-card.shake { animation: hgs-shake 0.4s ease; }

@media (max-width: 560px) {
  .card-head { flex-wrap: wrap; }
  .board-header { padding-top: calc(var(--nav-h) + 1.8rem); }
}

/* ---------- List group headings (Watchlist / Schon gesehen) ---------- */
.list-group-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0.4rem 0 0.2rem;
}
.list-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.watched-group-title { margin-top: 2.2rem; }
.list-group-count {
  order: 1;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
}

/* ---------- Movie list rows (listMode + watchable) ---------- */
.board-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.entry-row {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.15rem 1.4rem;
}
.entry-row .row-main { flex: 1; min-width: 0; }
.row-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.row-title-line h3 { font-size: 1.15rem; margin: 0; }
.row-desc { color: var(--ink-soft); font-size: 0.92rem; margin-top: 0.3rem; }
.row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.55rem;
}
.row-meta .justwatch-link { margin-top: 0; font-size: 0.78rem; padding: 0.28rem 0.8rem; }
.row-meta .date-meta { margin-top: 0; }

/* Custom checkbox */
.watch-check {
  position: relative;
  flex: none;
  margin-top: 0.15rem;
  cursor: pointer;
}
.watch-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.watch-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1.5px solid rgba(242, 239, 233, 0.4);
  color: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.watch-check:hover .watch-box { border-color: var(--accent); }
.watch-check input:checked + .watch-box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.watch-check input:focus-visible + .watch-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.watch-check input:disabled + .watch-box { opacity: 0.5; }

/* Watched state: settled and quiet */
.entry-row.is-watched { opacity: 0.62; }
.entry-row.is-watched:hover { opacity: 0.85; }
.entry-row.is-watched .row-title-line h3 {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 158, 77, 0.55);
  text-decoration-thickness: 2px;
}
.watched-tag {
  cursor: pointer;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
}

/* Inline date row ("Wann geschaut?") */
.watch-date-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
  padding: 0.7rem 0.9rem;
  border: 1px dashed rgba(255, 158, 77, 0.45);
  border-radius: 12px;
}
.watch-date-label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.watch-date-input { width: auto; padding: 0.4rem 0.6rem; font-size: 0.9rem; }
.btn-small { padding: 0.42rem 1rem; font-size: 0.85rem; }

@media (max-width: 560px) {
  .entry-row { flex-wrap: wrap; gap: 0.8rem; padding: 1rem; }
  .entry-row .row-main { order: 3; flex-basis: 100%; }
  .entry-row .card-actions { margin-left: auto; }
}

/* ---------- Empfehlungen (recommendations.js) ---------- */
.reco-section { padding-top: 0.5rem; }
.reco-title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.reco-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.reco-card { display: flex; flex-direction: column; padding: 0; }
.reco-card::before { display: none; }
.reco-poster { aspect-ratio: 2 / 3; overflow: hidden; }
.reco-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reco-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.reco-body h3 { font-size: 1rem; margin: 0; }
.reco-body .justwatch-link { margin-top: 0.3rem; font-size: 0.78rem; padding: 0.3rem 0.8rem; }
