:root {
    color-scheme: dark;
    --ff-font-heading: "Space Grotesk", "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ff-font-body: "Sora", "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ff-color-bg: #040509;
    --ff-color-panel: rgba(8, 10, 15, 0.92);
    --ff-color-surface: rgba(6, 8, 12, 0.85);
    --ff-color-border: rgba(255, 255, 255, 0.09);
    --ff-color-muted: rgba(255, 255, 255, 0.65);
    --ff-color-strong: #f6f6fb;
    --ff-color-accent: #6e8bff;
    --ff-color-accent-2: #00c6ff;
    --ff-spacing-xs: 0.35rem;
    --ff-spacing-sm: 0.6rem;
    --ff-spacing-md: 1rem;
    --ff-spacing-lg: 1.4rem;
    --parallax-offset-x-1: 0px;
    --parallax-offset-y-1: 0px;
    --parallax-offset-x-2: 0px;
    --parallax-offset-y-2: 0px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--ff-font-body);
    font-size: 15px;
    line-height: 1.45;
    background: var(--ff-color-bg);
    color: var(--ff-color-strong);
    overflow-x: hidden;
}

.parallax-wrapper {
    display: none;
}

body[data-scroll-effects="enabled"] .parallax-wrapper {
    position: fixed;
    inset: 0;
    display: block;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background: transparent;
}

.parallax-layer {
    position: absolute;
    inset: -20vh -20vw;
    opacity: 0.6;
    transform: translate3d(0, 0, 0);
    background-attachment: scroll;
    background-repeat: repeat;
}

.parallax-layer--far {
    background-image: url('../images/parallax-stars.jpg');
    background-size: 720px 720px;
    opacity: 0.4;
    filter: blur(0.5px);
}

.parallax-layer--veil {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9));
    opacity: 0.7;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select {
    font: inherit;
    color: inherit;
}

.app {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

@media (max-width: 1100px) {
    .app {
        grid-template-columns: 100%;
    }
    .filters-panel {
        display: none;
    }
    .floating-filter-btn {
        display: inline-flex;
    }
}

.filters-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: var(--ff-spacing-lg) var(--ff-spacing-md);
    background: var(--ff-color-panel);
    border-right: 1px solid var(--ff-color-border);
    overflow-y: auto;
    backdrop-filter: blur(24px);
}

.filters-panel h1 {
    font-family: var(--ff-font-heading);
    font-size: 1.35rem;
    margin: 0 0 var(--ff-spacing-xs);
    letter-spacing: 0.06em;
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    color: var(--ff-color-muted);
    margin: 0 0 0.4rem;
}

.filters-section {
    margin-top: var(--ff-spacing-lg);
    padding-top: var(--ff-spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.filters-section h2 {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.section-hint {
    margin: 0 0 var(--ff-spacing-sm);
    font-size: 0.78rem;
    color: var(--ff-color-muted);
}

.provider-select {
    display: flex;
    gap: var(--ff-spacing-xs);
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    overflow-x: hidden;
}

.genre-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--ff-spacing-sm);
}

.genre-chip {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.provider-pill,
.genre-chip {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.genre-chip.is-excluded,
.genre-chip[data-state="exclude"] {
    border-color: rgba(255, 92, 92, 0.9);
    background: rgba(255, 92, 92, 0.18);
    color: #fff;
}

.provider-pill {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-weight: 600;
}

.provider-pill[data-active="true"],
.provider-pill.is-active,
.genre-chip[data-active="true"],
.genre-chip.is-active {
    border-color: var(--ff-color-accent);
    background: rgba(110, 139, 255, 0.2);
    color: #fff;
}

.date-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ff-spacing-sm);
}

select,
.field input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ff-color-strong);
    appearance: none;
}

select option {
    background: #05070c;
    color: #f9f9ff;
}

.filters-footer {
    display: flex;
    gap: var(--ff-spacing-xs);
    margin-top: var(--ff-spacing-sm);
}

.filters-hit-counter {
    margin-top: var(--ff-spacing-sm);
    padding: 0.45rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.filters-hit-counter--overlay {
    margin-top: var(--ff-spacing-md);
}

.hit-counter__label {
    margin: 0;
    text-transform: uppercase;
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    color: var(--ff-color-muted);
}

.hit-counter__value {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ff-color-strong);
    letter-spacing: 0.06em;
}

.primary-button,
.ghost-button {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 0.45rem 0.95rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: transform 0.2s ease, border 0.2s ease;
}

.primary-button {
    background: linear-gradient(115deg, var(--ff-color-accent), var(--ff-color-accent-2));
    border: none;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 198, 255, 0.25);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.content {
    padding: var(--ff-spacing-lg) clamp(1rem, 4vw, 2.8rem) var(--ff-spacing-lg);
    background: none;
    display: flex;
    flex-direction: column;
    gap: var(--ff-spacing-lg);
    position: relative;
}

.content__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ff-spacing-xs);
}

.status-pill {
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    color: var(--ff-color-muted);
}

.view-controls .ghost-button {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
}

.view-controls .ghost-button.is-active {
    border-color: var(--ff-color-accent);
    color: var(--ff-color-strong);
}

.highlights,
.recently-viewed,
.film-grid {
    border-radius: 0;
    border: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--ff-spacing-md);
}

.section-header h2,
.section-header h3 {
    margin: 0;
    font-family: var(--ff-font-heading);
    letter-spacing: 0.05em;
}

.highlight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--ff-spacing-sm);
}

.highlight-card {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: var(--ff-spacing-md);
    background: linear-gradient(140deg, rgba(110, 139, 255, 0.18), rgba(5, 6, 9, 0.8));
}

.highlight-card__summary {
    font-size: 0.82rem;
    color: var(--ff-color-muted);
}

.recently-viewed__chips {
    display: flex;
    gap: var(--ff-spacing-xs);
    flex-wrap: wrap;
}

.recent-chip {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    background: transparent;
}

.film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--ff-spacing-md);
}

@media (max-width: 1024px) {
    .film-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

.film-grid[data-layout="list"] {
    grid-template-columns: 1fr;
}

.film-card {
    display: flex;
    flex-direction: column;
    gap: var(--ff-spacing-sm);
    height: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 8, 12, 0.2);
    padding: var(--ff-spacing-md);
    backdrop-filter: blur(28px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.film-card__header {
    display: flex;
    gap: var(--ff-spacing-sm);
    align-items: center;
}

.film-card__poster {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--ff-color-muted);
    width: min(35%, 140px);
    flex: 0 0 auto;
}

.film-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.film-card__poster {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--ff-color-muted);
    font-weight: 600;
}

.film-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film-card__runtime {
    font-size: 0.78rem;
    color: var(--ff-color-muted);
}

.year-pill {
    align-self: flex-start;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.15rem 0.55rem;
    font-size: 0.7rem;
    color: var(--ff-color-muted);
}

.film-card h3 {
    margin: 0;
    font-family: var(--ff-font-heading);
    font-size: 1rem;
}

.film-card__genres {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.65rem;
    color: var(--ff-color-muted);
}

.film-card__details {
    margin-top: var(--ff-spacing-sm);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.film-card__cast {
    margin: 0;
    font-size: 0.8rem;
    color: var(--ff-color-muted);
}
.bbfc-icon {
    width: 34px;
    height: 34px;
    margin-top: 0.2rem;
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.bbfc-icon::after {
    content: attr(data-cert);
    color: #fff;
}

.bbfc-icon[data-cert="U"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%2300a859' stroke='%23fff' stroke-width='4'/%3E%3Ctext x='32' y='42' font-family='Arial' font-size='32' fill='%23fff' text-anchor='middle'%3EU%3C/text%3E%3C/svg%3E"); }
.bbfc-icon[data-cert="PG"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpolygon points='32,4 60,56 4,56' fill='%23f1c40f' stroke='%23fff' stroke-width='4'/%3E%3Ctext x='32' y='44' font-family='Arial' font-size='28' fill='%23000' text-anchor='middle'%3EPG%3C/text%3E%3C/svg%3E"); }
.bbfc-icon[data-cert="12"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23f39c12' stroke='%23fff' stroke-width='4'/%3E%3Ctext x='32' y='42' font-family='Arial' font-size='32' fill='%23fff' text-anchor='middle'%3E12%3C/text%3E%3C/svg%3E"); }
.bbfc-icon[data-cert="12A"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23f39c12' stroke='%23fff' stroke-width='4'/%3E%3Ctext x='32' y='42' font-family='Arial' font-size='28' fill='%23fff' text-anchor='middle'%3E12A%3C/text%3E%3C/svg%3E"); }
.bbfc-icon[data-cert="15"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23e74c3c' stroke='%23fff' stroke-width='4'/%3E%3Ctext x='32' y='42' font-family='Arial' font-size='32' fill='%23fff' text-anchor='middle'%3E15%3C/text%3E%3C/svg%3E"); }
.bbfc-icon[data-cert="18"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23c0392b' stroke='%23fff' stroke-width='4'/%3E%3Ctext x='32' y='42' font-family='Arial' font-size='32' fill='%23fff' text-anchor='middle'%3E18%3C/text%3E%3C/svg%3E"); }
.bbfc-icon[data-cert="R18"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%238e44ad' stroke='%23fff' stroke-width='4'/%3E%3Ctext x='32' y='42' font-family='Arial' font-size='28' fill='%23fff' text-anchor='middle'%3ER18%3C/text%3E%3C/svg%3E"); }

.bbfc-icon[data-cert="U"]::after,
.bbfc-icon[data-cert="PG"]::after,
.bbfc-icon[data-cert="12"]::after,
.bbfc-icon[data-cert="12A"]::after,
.bbfc-icon[data-cert="15"]::after,
.bbfc-icon[data-cert="18"]::after,
.bbfc-icon[data-cert="R18"]::after {
    color: transparent;
}

.film-card__summary {
    margin: 0;
    font-size: 0.88rem;
    flex: 1;
}

.film-card__ratings {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ff-spacing-xs);
}

.rating-badge {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
}

.film-card__providers {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ff-spacing-xs);
    align-items: center;
    font-size: 0.78rem;
    color: var(--ff-color-muted);
}

.provider-badge {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.15rem 0.45rem;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
}

.film-card__actions {
    display: flex;
    gap: var(--ff-spacing-xs);
}

.film-card__action {
    flex: 1;
    padding: 0.35rem 0.4rem;
    font-size: 0.75rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1024px) {
    .film-card__ratings {
        margin-top: auto;
    }

    .film-card__providers {
        margin-top: 0.15rem;
    }

    .film-card__actions {
        margin-top: 0.25rem;
    }
}

.load-state,
.empty-state {
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: var(--ff-spacing-md);
    text-align: center;
    color: var(--ff-color-muted);
}

.scroll-top {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    z-index: 6;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 600ms ease, transform 600ms ease;
}

.scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-4px);
}

.floating-status,
.scroll-top {
    left: 50%;
}

@media (min-width: 1100px) {
    .floating-status,
    .scroll-top {
        left: calc((100vw + 360px) / 2);
    }
}

.load-state .pulse {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    display: inline-flex;
    margin-right: 0.4rem;
    background: var(--ff-color-accent);
    animation: pulse 1.2s infinite ease-in-out;
}

.filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    display: none;
    align-items: flex-start;
    z-index: 50;
}

.filters-overlay[aria-hidden="false"] {
    display: flex;
}

.filters-overlay__sheet {
    width: 100%;
    background: var(--ff-color-panel);
    border-radius: 0;
    padding: var(--ff-spacing-sm) var(--ff-spacing-md);
    max-height: 100vh;
    overflow-y: auto;
    gap: var(--ff-spacing-xs);
}

.filters-overlay__body {
    display: flex;
    flex-direction: column;
    gap: var(--ff-spacing-md);
}

.filters-section {
    margin-top: 0;
    padding-top: 0;
    border: none;
}

.filters-section h2 {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.filters-section--bottom {
    margin-top: auto;
}

.filters-collapse summary {
    font-weight: 600;
    cursor: pointer;
    padding-bottom: var(--ff-spacing-xs);
}

.floating-status {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 65;
    pointer-events: none;
}

.floating-status__pill {
    pointer-events: auto;
    border-radius: 999px;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(5, 7, 10, 0.35);
    backdrop-filter: blur(18px);
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    color: var(--ff-color-strong);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.floating-filter-btn {
    position: fixed;
    bottom: 1.4rem;
    right: 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(110, 139, 255, 0.25), rgba(0, 198, 255, 0.35));
    padding: 0.65rem 1.2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 12px 30px rgba(15, 32, 75, 0.65);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: none;
    z-index: 60;
}
.floating-filter-btn:hover,
.floating-filter-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 32, 75, 0.85);
}

.floating-filter-btn.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.noscript {
    background: #c0392b;
    padding: 0.5rem;
    text-align: center;
}

.provider-summary {
    margin-top: var(--ff-spacing-md);
}

.summary-line {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ff-spacing-xs);
}

.summary-badge {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.25rem 0.45rem;
    font-size: 0.7rem;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    background: transparent;
    cursor: pointer;
}

.summary-badge[data-active="false"] {
    opacity: 0.35;
}

.summary-badge strong {
    font-size: 0.75rem;
}

.badge-dot {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 2px;
}

.infinite-sentinel {
    width: 100%;
    height: 2px;
}

@media (max-width: 900px) {
    .highlight-cards,
    .highlights {
        display: none !important;
    }
    .content {
        padding-bottom: 6rem;
    }
    .recently-viewed {
        display: none;
    }
    .floating-filter-btn {
        display: inline-flex;
    }
    .view-controls {
        display: none;
    }
    .content__header {
        display: none;
    }
}

@media (max-width: 768px) {
    .film-grid,
    .load-state,
    .empty-state {
        border: none;
        background: transparent;
        padding: var(--ff-spacing-md) 0;
        box-shadow: none;
    }
    .film-grid {
        gap: var(--ff-spacing-sm);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
.bbfc-icon--poster {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
}

