@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  color-scheme: dark;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #f7f3ed;
  background: #10101a;
  font-synthesis: none;
  --ink: #f7f3ed;
  --muted: #aca9b5;
  --surface: #1a1926;
  --surface-raised: #232131;
  --line: #363346;
  --coral: #ff7162;
  --mint: #a9eacb;
  --yellow: #f8c85c;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 82% 5%, #2d223a 0, transparent 28rem), #10101a; }
a { color: inherit; }
button, input, select { font: inherit; }

main { min-height: 100vh; }
.hero { padding: .8rem max(1rem, calc((100vw - 1180px) / 2)) 3.5rem; border-bottom: 1px solid var(--line); }
.hero.hero-compact { padding-bottom: 2.5rem; }
nav { display: flex; align-items: center; justify-content: space-between; min-height: 2.4rem; border-bottom: 1px solid #ffffff0b; }
.brand { font: 800 1.05rem 'Manrope', sans-serif; text-decoration: none; letter-spacing: -.035em; }
.brand span { color: var(--coral); }
.nav-links { display: flex; align-items: center; gap: .45rem; }
.nav-links > a { color: var(--muted); text-decoration: none; font-size: .78rem; padding: .35rem .55rem; border-radius: .4rem; }
.nav-links > a:hover, .nav-links > a.active { color: var(--ink); background: #ffffff09; }
.prototype { color: #85818f; font-size: .68rem; border-left: 1px solid var(--line); padding: .15rem 0 .15rem .65rem; }
.hero-copy { margin-top: 4.5rem; max-width: 760px; }
.eyebrow { color: var(--coral); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 .65rem; }
h1, h2 { font-family: 'Manrope', sans-serif; letter-spacing: -.045em; }
h1 { font-size: clamp(2.8rem, 8vw, 6.7rem); line-height: .93; margin: 0; }
.hero-copy > p:last-child { color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); max-width: 570px; margin: 1.3rem 0 0; }

.filter-panel { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .55rem; align-items: end; max-width: 1180px; margin: -1.5rem auto 1rem; padding: .7rem; background: rgba(26, 25, 38, .94); border: 1px solid var(--line); border-radius: .8rem; box-shadow: 0 12px 36px #08080d70; backdrop-filter: blur(16px); }
.search-filter { grid-column: span 3; }
.venue-filter, .age-filter { grid-column: span 2; }
.sort-filter { grid-column: span 3; }
label span { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; margin: 0 0 .4rem .2rem; }
input, select { width: 100%; color: var(--ink); background: #11111b; border: 1px solid var(--line); border-radius: .65rem; padding: .62rem .75rem; outline: none; }
input:focus, select:focus { border-color: var(--coral); box-shadow: 0 0 0 3px #ff716225; }
.period-filter { grid-column: span 8; display: flex; gap: .3rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.period-filter legend { color: var(--muted); font-size: .75rem; font-weight: 600; margin: 0 0 .4rem .2rem; }
.period-filter button { flex: 1; min-width: 0; color: var(--muted); background: #11111b; border: 1px solid var(--line); border-radius: .55rem; padding: .62rem .45rem; cursor: pointer; }
.period-filter button:hover, .period-filter button.active { color: #15121a; background: var(--mint); border-color: var(--mint); }
.toggle-filter { grid-column: span 2; color: var(--muted); background: #11111b; border: 1px solid var(--line); border-radius: .55rem; padding: .62rem .55rem; cursor: pointer; }
.toggle-filter[aria-pressed="true"] { color: #15121a; background: var(--mint); border-color: var(--mint); }
.result-count { grid-column: span 2; display: flex; justify-content: flex-end; align-items: baseline; gap: .35rem; min-width: 88px; padding: .5rem; }
.result-count strong { font: 800 1.8rem 'Manrope', sans-serif; color: var(--mint); }
.result-count span { color: var(--muted); }

.source-strip, .venue-stats, .program-sections, .release-sections, .notice, .loading, .empty { max-width: 1180px; margin-left: auto; margin-right: auto; }
.venue-stats { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.3rem; padding: 0 .15rem; }
.venue-stat { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); text-decoration: none; font-size: .72rem; }
.venue-stat:hover { color: var(--ink); }
.source-strip { margin-top: -1.5rem; margin-bottom: 2rem; color: var(--muted); font-size: .72rem; }
.source-strip summary { cursor: pointer; width: max-content; }
.source-strip > div { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .6rem; }
.source { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); text-decoration: none; font-size: .7rem; }
.source:hover { color: var(--ink); }
.status-dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--mint); }
.source.empty .status-dot { background: var(--yellow); }
.source.error .status-dot { background: var(--coral); }

.program-sections, .release-sections { display: grid; gap: 2.4rem; padding-bottom: 3rem; }
.program-week, .release-week { display: grid; gap: .8rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 0 .15rem .55rem; }
.section-heading h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.section-heading span { color: var(--muted); font-size: .78rem; }
.movie-list { display: grid; gap: .75rem; }
.movie-card { display: grid; grid-template-columns: 165px 1fr; min-height: 238px; overflow: hidden; background: linear-gradient(145deg, var(--surface-raised), var(--surface)); border: 1px solid var(--line); border-radius: .9rem; box-shadow: 0 12px 32px #08080d30; }
.movie-card.is-scrob, .release-card.is-scrob { border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral), 0 16px 45px #08080d60; }
.poster-wrap { position: relative; min-height: 238px; background: #11111b; }
.poster { display: block; width: 100%; height: 100%; min-height: 238px; object-fit: contain; }
.poster.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--coral); background: linear-gradient(145deg, #2a2538, #151420); }
.poster.placeholder span { font: 800 4.6rem 'Manrope', sans-serif; letter-spacing: -.12em; }
.poster.placeholder small { letter-spacing: .45em; margin-left: .45em; }
.scrob-badge { position: absolute; left: .75rem; bottom: .75rem; padding: .5rem .65rem; background: var(--coral); color: #16121a; border-radius: .45rem; font-size: .75rem; font-weight: 700; }
.library-badge { position: absolute; left: .75rem; top: .75rem; padding: .45rem .6rem; background: #d5f7e8; color: #10261e; border-radius: .45rem; font-size: .72rem; font-weight: 700; }
.movie-content { padding: 1rem 1.15rem 1.1rem; min-width: 0; }
.movie-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.movie-actions { display: flex; align-items: center; gap: .45rem; }
.wishlist-button { flex: 0 0 auto; display: grid; place-items: center; width: 2.45rem; height: 2.45rem; padding: 0; color: var(--coral); background: #11111b; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 1.45rem; line-height: 1; }
.wishlist-button:hover, .wishlist-button.active { color: #17121a; background: var(--coral); border-color: var(--coral); }
.wishlist-button:disabled { cursor: wait; opacity: .6; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.9rem); line-height: 1.08; margin: 0; }
.trailer-button { flex: 0 0 auto; text-decoration: none; color: #10101a; background: var(--mint); border-radius: 999px; padding: .65rem .85rem; font-weight: 700; font-size: .82rem; }
.trailer-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.facts { display: flex; flex-wrap: wrap; gap: .4rem; margin: .65rem 0; }
.facts span { color: var(--muted); border: 1px solid var(--line); border-radius: .35rem; padding: .2rem .42rem; font-size: .72rem; }
.facts .format { color: var(--mint); }
.screening-notes { color: var(--yellow); font-size: .78rem; line-height: 1.4; margin: -.25rem 0 .7rem; }
.description { color: var(--muted); font-size: .86rem; line-height: 1.42; max-width: 75ch; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.dates { display: flex; flex-wrap: wrap; align-items: start; gap: .8rem; margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.date-row { min-width: 0; }
.date-row h3 { color: var(--muted); font-size: .72rem; margin: 0 0 .35rem; text-transform: uppercase; letter-spacing: .04em; }
.showtimes { display: flex; flex-wrap: wrap; gap: .4rem; }
.showtime { display: grid; grid-template-columns: .5rem auto; gap: .32rem; align-items: center; padding: .3rem .46rem; background: #12111c; border: 1px solid var(--line); border-radius: .5rem; }
.showtime:hover { border-color: var(--coral); background: #1a1722; }
.venue-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--coral); }
.venue-kamera .venue-dot { background: var(--yellow); }
.venue-lichtwerk .venue-dot { background: var(--mint); }
.venue-luna-ravensberger-park .venue-dot { background: #9da7ff; }
.venue-cinemaxx .venue-dot { background: #ff4f91; }
.venue-offkino-filmhaus .venue-dot { background: #63d4ff; }
.venue-filmhaus-bielefeld .venue-dot { background: #d4a5ff; }
.venue-vhs-murnausaal .venue-dot, .venue-rudolf-oetker-halle .venue-dot { background: #ffa65c; }
.venue-melodie-brackwede .venue-dot { background: #e8ef8f; }
.showtime[class*='venue-uni-'] .venue-dot { background: #8fe3a8; }
.showtime-main { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .84rem; }
.showtime.sold-out { opacity: .55; }
.workshop-section { padding: 1rem; border: 1px dashed var(--yellow); border-radius: 1rem; background: #f8c85c08; }
.workshop-section .section-heading h2 { color: var(--yellow); }

.release-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .85rem; }
.release-card { display: grid; grid-template-columns: 105px 1fr; min-height: 158px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; }
.release-card .poster-wrap { min-height: 158px; }
.release-poster { display: block; width: 105px; height: 100%; min-height: 158px; object-fit: contain; background: #11111b; }
.release-poster.placeholder { display: grid; place-items: center; color: var(--coral); font: 800 .85rem 'Manrope', sans-serif; }
.release-content { min-width: 0; padding: .8rem; }
.release-content .eyebrow { font-size: .66rem; margin-bottom: .35rem; }
.release-content h2 { font-size: 1.15rem; }
.release-content .description { -webkit-line-clamp: 3; font-size: .78rem; }
.release-links { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-top: .7rem; }
.release-links .trailer-button { padding: .45rem .65rem; font-size: .74rem; }
.cinema-link { color: var(--muted); font-size: .74rem; }
.cinema-link:hover { color: var(--mint); }
.notice, .loading, .empty { padding: 2rem; border: 1px solid var(--line); background: var(--surface); border-radius: 1rem; }
.notice.error { border-color: var(--coral); }
.empty { text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); }

.profile-page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 1180px; margin: -1.5rem auto 3rem; }
.profile-panel { padding: 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; }
.profile-panel h2 { margin-bottom: .6rem; }
.profile-panel.admin-panel { grid-column: 1 / -1; }
.profile-action { display: inline-flex; margin-top: 1rem; padding: .65rem .85rem; color: var(--ink); background: #11111b; border: 1px solid var(--line); border-radius: .55rem; text-decoration: none; cursor: pointer; }
.profile-action.primary, .profile-action:hover { color: #15121a; background: var(--mint); border-color: var(--mint); }
.profile-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.integration-form { display: grid; gap: .8rem; margin-top: 1rem; }
.integration-form .profile-action { justify-self: start; margin-top: 0; }
.profile-list { margin: .8rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.profile-list li + li { margin-top: .4rem; }
.user-list { display: grid; gap: .45rem; margin-top: 1rem; }
.user-row { display: grid; grid-template-columns: 1fr minmax(130px, 180px); gap: 1rem; align-items: center; padding: .7rem; background: #11111b; border-radius: .55rem; }
.user-row strong, .user-row small { display: block; }
.user-row small { color: var(--muted); margin-top: .2rem; }
.description.visible { display: block; }

.groups-page { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 1rem; max-width: 1180px; margin: -1.5rem auto 3rem; }
.groups-sidebar { grid-row: span 2; align-self: start; }
.groups-main, .voting-panel { min-width: 0; }
.voting-panel { grid-column: 2; }
.inline-form, .session-form, .candidate-form { display: grid; gap: .55rem; margin-top: 1rem; }
.inline-form { grid-template-columns: 1fr auto; }
.inline-form .profile-action, .session-form .profile-action, .candidate-form .profile-action { justify-content: center; margin-top: 0; }
.group-list, .session-list { display: grid; gap: .4rem; margin-top: 1rem; }
.group-select, .session-select { width: 100%; padding: .65rem .75rem; color: var(--muted); text-align: left; background: #11111b; border: 1px solid var(--line); border-radius: .55rem; cursor: pointer; }
.group-select:hover, .group-select.active, .session-select:hover, .session-select.active { color: var(--ink); border-color: var(--coral); background: #211b2a; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.panel-heading .profile-action { flex: 0 0 auto; margin-top: 0; }
.invite-output:empty { display: none; }
.invite-output { margin-top: .7rem; }
.invite-output input { color: var(--mint); font-size: .78rem; }
.group-members { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; }
.group-member { padding: .25rem .45rem; color: var(--muted); background: #11111b; border: 1px solid var(--line); border-radius: 999px; font-size: .7rem; }
.session-form { grid-template-columns: minmax(150px, 1.2fr) minmax(140px, .8fr) minmax(150px, 1fr) minmax(170px, .9fr) auto; align-items: end; }
.session-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.candidate-form { grid-template-columns: minmax(190px, 1.4fr) minmax(180px, 1fr) auto; }
.candidate-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; margin-top: 1rem; }
.candidate-card { display: grid; grid-template-columns: 82px minmax(0, 1fr); min-height: 124px; overflow: hidden; background: #11111b; border: 1px solid var(--line); border-radius: .7rem; }
.candidate-card.selected { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint); }
.candidate-poster { display: block; width: 82px; height: 100%; min-height: 124px; object-fit: contain; background: #0c0c14; }
.candidate-content { display: flex; flex-direction: column; align-items: start; min-width: 0; padding: .75rem; }
.candidate-content h3 { margin: 0; font: 700 1rem 'Manrope', sans-serif; }
.winner-badge { margin: .35rem 0; padding: .2rem .4rem; color: #10261e; background: var(--mint); border-radius: .35rem; font-size: .68rem; font-weight: 700; }
.candidate-content .description { margin: .35rem 0; }
.voter-list { display: grid; gap: .15rem; color: var(--muted); font-size: .7rem; }
.voter-list .yes-voters { color: var(--mint); }
.vote-actions { display: flex; gap: .4rem; margin-top: auto; padding-top: .7rem; }
.vote-button { padding: .4rem .65rem; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.vote-button:hover, .vote-button.active { color: #15121a; background: var(--mint); border-color: var(--mint); }
.vote-button.choose-button { color: var(--coral); border-color: var(--coral); }
.vote-button.choose-button:hover { color: #15121a; background: var(--coral); }
.vote-summary { color: var(--muted); font-size: .75rem; }
.vote-queue { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; padding: .55rem .7rem; color: var(--yellow); background: #2a2112; border: 1px solid #f8c85c55; border-radius: .55rem; font-size: .75rem; }
.vote-queue-action { padding: .25rem .45rem; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: .4rem; cursor: pointer; }
.vote-queue-action:first-of-type { margin-left: auto; }
.vote-queue-detail { flex-basis: 100%; color: var(--muted); }
.decide-toggle { margin-top: .8rem; }
.decide-toggle.active { color: #15121a; background: var(--yellow); border-color: var(--yellow); }
.decide-panel { max-width: 620px; margin: 1rem auto 0; padding: 1rem; overflow: hidden; background: linear-gradient(145deg, #211b2a, #11111b); border: 1px solid var(--line); border-radius: 1rem; }
.decide-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.decide-heading h3 { margin: 0; font: 750 1.25rem 'Manrope', sans-serif; }
.decide-progress { min-width: 3.2rem; padding: .35rem .55rem; color: #15121a; text-align: center; background: var(--yellow); border-radius: 999px; font-size: .75rem; font-weight: 800; }
.decide-error { color: var(--coral); font-size: .8rem; }
.decide-card { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); overflow: hidden; background: #0c0c14; border: 1px solid #ffffff24; border-radius: .8rem; outline: none; touch-action: pan-y; transition: transform .15s ease, border-color .15s ease; }
.decide-card:focus-visible { border-color: var(--yellow); box-shadow: 0 0 0 3px #f8c85c2d; }
.decide-poster { display: block; width: 100%; height: 100%; min-height: 260px; object-fit: contain; background: #08080e; }
.decide-poster.placeholder { display: grid; place-items: center; padding: 1rem; color: var(--coral); font: 800 .72rem 'Manrope', sans-serif; letter-spacing: .08em; }
.decide-content { display: flex; flex-direction: column; align-items: start; min-width: 0; padding: 1.2rem; }
.decide-content h4 { margin: 0; font: 750 clamp(1.25rem, 3vw, 1.8rem) 'Manrope', sans-serif; line-height: 1.08; }
.swipe-hint { margin: auto 0 .7rem; color: var(--muted); font-size: .72rem; }
.decide-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; width: 100%; }
.decide-vote { padding: .7rem; border: 1px solid var(--line); border-radius: .65rem; cursor: pointer; font-weight: 750; }
.decide-vote.no { color: var(--coral); background: #27171b; }
.decide-vote.yes { color: #10261e; background: var(--mint); border-color: var(--mint); }
.decide-vote:hover { filter: brightness(1.12); }
.decide-final-label { margin: 1rem 0 .3rem; color: var(--mint); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.decide-final-title { margin: 0 0 .8rem; font: 750 1.15rem 'Manrope', sans-serif; }

@media (max-width: 1220px) {
  .filter-panel, .source-strip, .venue-stats, .program-sections, .release-sections, .profile-page, .groups-page, .notice, .loading, .empty { margin-left: 1rem; margin-right: 1rem; }
}
@media (max-width: 760px) {
  .hero { padding-bottom: 3rem; }
  .hero-copy { margin-top: 3rem; }
  .filter-panel { position: static; grid-template-columns: 1fr 1fr; }
  .search-filter, .sort-filter, .period-filter { grid-column: 1 / -1; }
  .venue-filter, .age-filter, .toggle-filter, .result-count { grid-column: span 1; }
  .period-filter { grid-column: 1 / -1; }
  .result-count { justify-content: flex-end; }
  .movie-card { grid-template-columns: 120px 1fr; min-height: 180px; }
  .poster, .poster-wrap { min-height: 180px; }
  .movie-content { padding: 1rem; }
  .movie-heading { display: block; }
  .movie-actions { margin-top: .8rem; }
  .trailer-button { display: inline-block; }
  .description { display: none; }
  .groups-page { grid-template-columns: 1fr; }
  .groups-sidebar { grid-row: auto; }
  .voting-panel { grid-column: auto; }
  .session-form, .candidate-form { grid-template-columns: 1fr 1fr; }
  .session-form .profile-action, .candidate-form .profile-action { grid-column: 1 / -1; }
  .decide-panel { max-width: none; }
}
@media (max-width: 480px) {
  .nav-links { gap: .1rem; }
  .prototype { display: none; }
  .nav-links > a { padding-inline: .45rem; }
  .movie-card { grid-template-columns: 1fr; }
  .poster-wrap { max-height: 58vh; }
  .poster { aspect-ratio: 2 / 3; max-height: 58vh; }
  .filter-panel { grid-template-columns: 1fr; }
  .search-filter, .venue-filter, .age-filter, .sort-filter, .period-filter, .toggle-filter, .result-count { grid-column: auto; }
  .result-count { justify-content: flex-start; }
  .profile-page { grid-template-columns: 1fr; }
  .profile-panel.admin-panel { grid-column: auto; }
  .user-row { grid-template-columns: 1fr; }
  .inline-form, .session-form, .candidate-form { grid-template-columns: 1fr; }
  .session-form .profile-action, .candidate-form .profile-action { grid-column: auto; }
  .panel-heading { display: grid; }
  .decide-card { grid-template-columns: 1fr; }
  .decide-poster { max-height: 48vh; min-height: 220px; }
}

@media (prefers-reduced-motion: no-preference) {
  .trailer-button, .showtime { transition: .18s ease; }
}
