/* ── View transitions ────────────────────────────────────────────────────── */
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view-fade { animation: viewFadeIn 0.22s ease both; }

/* ── Fonts ────────────────────────────────────────────────────────────────── */

.movie-title,
.landing-title,
.archive-item-title,
.upcoming-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0c0c0e;
  --surface:    #17171a;
  --surface2:   #202025;
  --border:     #2c2c32;
  --text:       #f0ece4;
  --muted:      #6e6e7a;
  --accent:     #d4a843;
  --star:       #f5c518;
  --star-empty: #35353d;
  --green:      #4ade80;
  --red:        #f87171;
  --radius:     10px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ───────────────────────────────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  padding-left: max(2rem, calc(2rem + env(safe-area-inset-left)));
  padding-right: max(2rem, calc(2rem + env(safe-area-inset-right)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(50px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-right { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }

/* ── Hero logo ────────────────────────────────────────────────────────────── */
.site-hero {
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.5rem 0;
}

.site-logo-img {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
}

.link-btn {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.link-btn:hover { color: var(--text); border-color: var(--muted); text-decoration: none; }

/* ── Main layout ──────────────────────────────────────────────────────────── */
main {
  max-width: 660px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

/* ── Phase / section labels ───────────────────────────────────────────────── */
.phase-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ── Movie header with poster ─────────────────────────────────────────────── */
.movie-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.movie-header-info { flex: 1; min-width: 0; }

/* Poster on main page */
.poster-thumb {
  width: 100px;
  flex-shrink: 0;
  border-radius: 6px;
  aspect-ratio: 2/3;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

/* Poster in admin history list */
.poster-row-thumb {
  width: 36px;
  flex-shrink: 0;
  border-radius: 3px;
  aspect-ratio: 2/3;
  object-fit: cover;
}
.poster-row-empty {
  background: var(--surface2);
  border: 1px solid var(--border);
}

/* Admin poster upload area */
.poster-upload-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.poster-admin-thumb {
  width: 90px;
  flex-shrink: 0;
  border-radius: 6px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.poster-admin-placeholder {
  width: 90px;
  aspect-ratio: 2/3;
  flex-shrink: 0;
  border: 1px dashed var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

/* ── Movie info ───────────────────────────────────────────────────────────── */
.movie-title {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.movie-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.movie-description {
  font-size: 0.92rem;
  color: #aaa;
  line-height: 1.75;
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

/* ── Rating form ──────────────────────────────────────────────────────────── */
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.field label {
  font-size: 0.83rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="date"],
textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.97rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
textarea:focus { border-color: var(--accent); }

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}
input::placeholder,
textarea::placeholder { color: var(--muted); opacity: 0.7; }
textarea { font-family: inherit; }

/* ── Nickname hint ────────────────────────────────────────────────────────── */
.nick-hint {
  font-size: 0.82rem;
  color: var(--accent);
  margin-top: -0.75rem;
  margin-bottom: 1rem;
  min-height: 1.2em;
}

/* ── Star picker ──────────────────────────────────────────────────────────── */
.star-picker-wrap { margin-bottom: 1.5rem; }

.star-picker {
  display: flex;
  gap: 3px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0.5rem;
}

.star-item {
  position: relative;
  font-size: 2.6rem;
  color: var(--star-empty);
  line-height: 1;
  transition: transform 0.08s;
}
.star-item::before { content: '★'; }

.star-item.full { color: var(--star); }
.star-item.half::before {
  background: linear-gradient(to right, var(--star) 50%, var(--star-empty) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Invisible click targets covering each half of a star */
.star-item .star-left,
.star-item .star-right {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
}
.star-item .star-left  { left: 0; }
.star-item .star-right { right: 0; }

.rating-value-label {
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.4em;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: #0c0c0e;
  border: none;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 24px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  font-weight: 500;
}
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }

.btn-sm { font-size: 0.8rem; padding: 6px 14px; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: max(2rem, calc(1.5rem + env(safe-area-inset-bottom)));
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 0.88rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 200;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red);   }

/* ── Stats ────────────────────────────────────────────────────────────────── */
.avg-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.avg-number {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--star);
  line-height: 1;
  letter-spacing: -0.03em;
}
.avg-suffix { font-size: 1.1rem; color: var(--muted); }

/* Two-layer star display */
.stars-display {
  position: relative;
  display: inline-block;
  margin-bottom: 0.4rem;
}
.stars-display .stars-bg,
.stars-display .stars-fg {
  font-size: 1.5rem;
  letter-spacing: 2px;
  line-height: 1;
}
.stars-display .stars-bg { color: var(--star-empty); }
.stars-display .stars-fg {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--star);
  overflow: hidden;
  white-space: nowrap;
}

.total-count {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* Histogram */
.histogram {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.histogram-row {
  display: grid;
  grid-template-columns: 2.8rem 1fr 2.2rem;
  align-items: center;
  gap: 10px;
}
.histogram-label {
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.histogram-bar-track {
  background: var(--surface2);
  border-radius: 3px;
  height: 9px;
  overflow: hidden;
}
.histogram-bar {
  height: 100%;
  background: var(--star);
  border-radius: 3px;
  transition: width 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.histogram-count {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Waiting / empty state ────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
}
.empty-state .icon {
  font-size: 3.5rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}
.empty-state h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.empty-state p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Landing page ─────────────────────────────────────────────────────────── */
.landing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* On wider screens: film card full width, archive + upcoming side by side below */
@media (min-width: 600px) {
  .landing-grid {
    grid-template-columns: 1fr 1fr;
  }
  .landing-card-film {
    grid-column: 1 / -1;
  }
}

.landing-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.15s;
  /* reset button defaults */
  appearance: none;
  font-family: inherit;
  padding: 0;
}
.landing-card:not(.landing-card-empty):hover { border-color: var(--accent); transform: translateY(-2px); }
.landing-card-empty { cursor: default; opacity: 0.45; }

/* Film card — primary hero */
.landing-card-film { min-height: 400px; }

.landing-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.75;
}
.landing-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0c0c0e 5%, rgba(12,12,14,0.55) 55%, rgba(12,12,14,0.05) 100%);
}
.landing-card-content {
  position: relative;
  z-index: 1;
  padding: 1.75rem;
}

.landing-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.landing-title {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.landing-title-muted { color: var(--muted); font-size: 1.35rem; }
.landing-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* Primary CTA button on film card */
.landing-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #0c0c0e;
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: opacity 0.15s;
}
.landing-card:hover .landing-cta-btn { opacity: 0.88; }

/* Archive card — secondary, poster mosaic */
.landing-card-archive {
  min-height: 150px;
}
.landing-card-archive .landing-card-content {
  padding: 1.25rem 1.5rem;
}
.landing-card-archive .landing-title {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}
.landing-cta {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.4rem;
}

/* Mosaic poster strip for archive card */
.landing-archive-mosaic {
  position: absolute;
  inset: 0;
  display: flex;
}
.landing-archive-mosaic-img {
  flex: 1;
  object-fit: cover;
  min-width: 0;
}
.landing-archive-overlay {
  background: linear-gradient(to top, rgba(12,12,14,0.9) 0%, rgba(12,12,14,0.45) 100%);
}

/* ── Archive ──────────────────────────────────────────────────────────────── */
.archive-wrap { padding-bottom: 2rem; }

.archive-month-section { margin-bottom: 1.75rem; }

.archive-month-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.6rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.archive-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.archive-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.archive-item.open {
  border-color: var(--accent);
}
.archive-item--featured {
  border-color: rgba(212, 168, 67, 0.55);
  border-left: 3px solid var(--accent);
}

.archive-item-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  gap: 0.75rem;
  text-align: left;
  transition: background 0.1s;
  border-radius: 0;
  transform: none;
}
.archive-item-btn:hover { background: var(--surface2); opacity: 1; }
.archive-item-btn:active { background: var(--surface2); transform: none; }

.archive-item-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.archive-poster-wrap {
  width: 40px;
  flex-shrink: 0;
  border-radius: 4px;
  aspect-ratio: 2/3;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.archive-item-btn:hover .archive-poster-wrap {
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}
.archive-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
img.archive-poster {
  transform-origin: center;
}
.archive-item-btn:hover img.archive-poster {
  transform: scale(1.08);
}
.archive-poster-empty {
  background: var(--surface2);
  border: 1px solid var(--border);
}

.archive-item-info { flex: 1; min-width: 0; }

.archive-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.archive-item-tag {
  margin-bottom: 4px;
}
.archive-item-year {
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

.archive-item-date {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.archive-item-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

/* Inline star display for archive */
.archive-stars-wrap {
  position: relative;
  display: inline-block;
  line-height: 1;
}
.archive-stars-bg,
.archive-stars-fg {
  font-size: 0.85rem;
  letter-spacing: 1px;
}
.archive-stars-bg { color: var(--star-empty); }
.archive-stars-fg {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--star);
  overflow: hidden;
  white-space: nowrap;
}

.archive-avg {
  font-weight: 700;
  color: var(--star);
}
.archive-count { color: var(--muted); }

/* Expand chevron */
.archive-chevron {
  font-size: 1.2rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
  line-height: 1;
}
.archive-item.open .archive-chevron { transform: rotate(90deg); }

/* Expanded detail panel */
.archive-detail {
  border-top: 1px solid var(--border);
}
.archive-detail-inner {
  padding: 1.25rem 1rem 1rem;
}

/* ── Loading ──────────────────────────────────────────────────────────────── */
.loading {
  text-align: center;
  color: var(--muted);
  padding: 5rem;
}

/* ── Admin: movies table ──────────────────────────────────────────────────── */
.movies-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.movie-row {
  border-bottom: 1px solid var(--border);
}
.movie-row:last-child { border-bottom: none; }
.movie-row-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  gap: 1rem;
}
.movie-row-info { flex: 1; min-width: 0; }

/* Month accordion (admin history) */
.history-months { display: flex; flex-direction: column; gap: 0; }
.history-month { border-bottom: 1px solid var(--border); }
.history-month:last-child { border-bottom: none; }
.history-month-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.history-month-btn:hover { color: var(--accent); }
.history-chevron {
  display: inline-block;
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}
.history-chevron.open { transform: rotate(90deg); }
.history-month-films { padding-bottom: 0.25rem; }

/* Inline edit form inside history row */
.history-edit-form { padding-bottom: 0.5rem; }
.history-edit-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.5rem;
}

/* Inline delete confirmation */
.delete-confirm-area {
  border-top: 1px solid rgba(248, 113, 113, 0.2);
}
.delete-confirm-inner {
  background: rgba(248, 113, 113, 0.05);
  padding: 0.85rem 0.85rem 0.85rem 1rem;
}

/* Edit button active state */
.edit-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}
.movie-row-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.movie-row-week {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.movie-row-stats { text-align: right; flex-shrink: 0; }
.movie-row-avg {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--star);
}
.movie-row-count {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Landing card — absolute event tag ribbon (top-left over poster) */
.landing-event-tag {
  position: absolute;
  top: 1.1rem;
  left: 1.25rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: #0c0c0e;
  border-radius: 20px;
  padding: 4px 13px;
}

/* Event tag badge — inline, used in rating view header & archive */
.movie-header-info .event-tag-badge {
  display: inline-block;
  margin-top: 0.00rem;
  margin-bottom: 0.55rem;
}
.event-tag-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(212, 168, 67, 0.45);
  border-radius: 20px;
  padding: 2px 9px;
  vertical-align: middle;
}
.event-tag-sm {
  font-size: 0.6rem;
  padding: 1px 7px;
  opacity: 0.85;
}

/* Phase label + badge on same row */
.phase-label-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.phase-label-row .phase-label { margin-bottom: 0; }

/* Active film badge + row highlight */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.movie-row--active {
  background: rgba(212, 168, 67, 0.06);
  border-radius: var(--radius);
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

/* Admin form grid */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  header { padding: 0 1rem; }
  main { padding: 1.5rem 1rem; }
  .card { padding: 1.5rem; }
  .movie-title { font-size: 1.5rem; }
  .avg-number { font-size: 2.4rem; }
  .star-item { font-size: 3rem; }
  .star-picker { gap: 6px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .poster-thumb { width: 72px; }
  .poster-admin-thumb, .poster-admin-placeholder { width: 70px; }
  .header-social .social-link span { display: none; }
  .social-link { padding: 0.35rem 0.5rem; }
  .site-hero { padding: 2rem 1rem 0; }
  .site-logo-img { max-width: 200px; }
  .landing-card-film { min-height: 300px; }
  .landing-card-archive { min-height: 130px; }
}

/* ── Social links (header) ───────────────────────────────────────────────── */

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.social-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.social-instagram:hover {
  color: #ffffff;
  border-color: #e1306c;
  background: rgba(225, 48, 108, 0.07);
}

/* SVG-Icon beim Hover in Rahmenfarbe */
.social-instagram:hover svg {
  fill: #e1306c;            /* Icon in Rahmenfarbe */
}

/* Standard: Kreise neutral */
.social-letterboxd svg circle {
  fill: #999999; /* Grau */
  transition: fill 0.3s ease; /* sanfte Animation */
}

/* Hover: wenn die <a> gehovt wird, SVG Kreise färben */
.social-letterboxd:hover svg .circle-orange {
  fill: #FF8C00; /* Orange */
}

.social-letterboxd:hover svg .circle-green {
  fill: #00C040; /* Grün */
}

.social-letterboxd:hover svg .circle-blue {
  fill: #0095FF; /* Blau */
}

/* Button-Hintergrund / Text / Rahmen wie vorher */
.social-letterboxd:hover {
  color: #ffffff; /* Text weiß */
  border-color: #00C040; /* Rahmen grün */
  background: linear-gradient(
    to right,
    rgba(255, 140, 0, 0.12) 0%,
    rgba(255, 140, 0, 0.12) 33%,
    rgba(0, 192, 64, 0.12) 33%,
    rgba(0, 192, 64, 0.12) 66%,
    rgba(0, 149, 255, 0.12) 66%,
    rgba(0, 149, 255, 0.12) 100%
  );
}

.social-spotify:hover {
  color: #ffffff;
  border-color: #1db954;
  background: rgba(29, 185, 84, 0.07);
}

/* SVG-Icon beim Hover in Rahmenfarbe */
.social-spotify:hover svg {
  fill: #1db954;            /* Icon in Rahmenfarbe */
}

.social-youtube:hover {
  color: #ffffff;
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.07);
}

.social-youtube:hover svg {
  fill: #ff0000;
}

/* ── Film external links (IMDb / Letterboxd) ─────────────────────────────── */
.film-links {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin: 0;
}
.film-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.film-link:hover { color: var(--text); }
.film-link svg { display: block; flex-shrink: 0; }
.film-link-imdb svg { fill: currentColor; transition: fill 0.15s; }
.film-link-imdb:hover { color: var(--text); }
.film-link-imdb:hover svg { fill: #f5c518; }

/* Letterboxd */
.film-link-letterboxd svg .circle-orange,
.film-link-letterboxd svg .circle-green,
.film-link-letterboxd svg .circle-blue { fill: var(--muted); transition: fill 0.18s; }
.film-link-letterboxd:hover svg .circle-orange { fill: #FF8C00; }
.film-link-letterboxd:hover svg .circle-green  { fill: #00C040; }
.film-link-letterboxd:hover svg .circle-blue   { fill: #0095FF; }

/* ── Touch / Active states ────────────────────────────────────────────────── */

/* Archive items — visible press feedback on tap */
.archive-item-btn:active {
  background: var(--surface2);
  opacity: 0.7;
  transition: opacity 0.05s;
}

/* Landing cards — snap back on tap (no lift on touch) */
.landing-card:not(.landing-card-empty):active {
  transform: translateY(0);
  opacity: 0.85;
  transition: opacity 0.05s, transform 0.05s;
}

/* ── Toggle Switch (Admin) ───────────────────────────────────────────────── */

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}
.toggle-switch input { display: none; }
.toggle-slider {
  position: relative;
  width: 32px;
  height: 18px;
  background: var(--border);
  border-radius: 9px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(14px); }
.toggle-label { font-size: 0.7rem; color: var(--muted); white-space: nowrap; }
.toggle-switch:has(input:checked) .toggle-label { color: var(--accent); }

/* ── Upcoming View (Frontend) ─────────────────────────────────────────────── */
.upcoming-item {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  align-items: flex-start;
}
.upcoming-poster-wrap {
  flex-shrink: 0;
  width: 70px;
  border-radius: 6px;
  overflow: hidden;
}
.upcoming-poster { width: 100%; display: block; }
.upcoming-info { flex: 1; min-width: 0; }
.upcoming-date {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.upcoming-tag { margin-bottom: 0.25rem; }
.upcoming-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.upcoming-year { font-weight: 400; color: var(--muted); font-size: 0.9em; }
.upcoming-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.35rem; }
.upcoming-description {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.upcoming-item .film-links { margin-top: 0.5rem; }
.archive-detail-inner .film-links { margin-top: 0.75rem; }
.movie-header-info .film-links { margin-top: 0.1rem; }
/* Suppress hover effects on touch devices to avoid sticky hover states */
@media (hover: none) {
  .landing-card:not(.landing-card-empty):hover {
    border-color: var(--border);
    transform: none;
  }
  .archive-item-btn:hover {
    background: none;
  }
  .archive-item-btn:hover .archive-poster-wrap {
    box-shadow: none;
  }
  .archive-item-btn:hover img.archive-poster {
    transform: none;
  }
  .btn:hover:not(:disabled) {
    opacity: 1;
    transform: none;
  }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  margin-top: 3rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ── Legal (Impressum/Datenschutz) ───────────────────────────────────────── */
.legal-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
.legal-section {
  margin-bottom: 3rem;
}
.legal-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.legal-block {
  margin-bottom: 1.5rem;
}
.legal-block h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.legal-block p {
  font-size: 0.92rem;
  color: #9e9a94;
  line-height: 1.7;
  margin-bottom: 0.6rem;
}
.legal-block code {
  font-size: 0.85em;
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent);
}
.legal-back {
  margin-top: 2rem;
  font-size: 0.85rem;
}
.legal-back a {
  color: var(--muted);
}
.legal-back a:hover {
  color: var(--text);
}
