:root {
    --bg-main: #0f1014;
    --bg-secondary: #18191e;
    --bg-card: #202227;
    --bg-header: rgba(15, 16, 20, 0.85);

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    --accent: #e50914;
    /* Netflix Red-ish, very cinematic */
    --accent-hover: #b81d24;
    --accent-glow: rgba(229, 9, 20, 0.4);
    --fx-on-accent: #ffffff;
    --nav-hover-bg: color-mix(in srgb, var(--accent) 12%, transparent);
    --nav-active-bg: color-mix(in srgb, var(--accent) 16%, transparent);
    --search-focus-ring: color-mix(in srgb, var(--accent) 28%, transparent);
    --nav-drawer-bg: var(--bg-secondary);
    --nav-drawer-head-bg: color-mix(in srgb, var(--bg-main) 72%, var(--bg-secondary));

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);

    --font-main: 'Outfit', sans-serif;

    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

.site-header a:hover {
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Typo --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- Header: style w /assets/css/site-nav.css --- */

.site-header .site-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.1;
}

.site-header .site-brand-tagline {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .site-header .site-brand-tagline {
        font-size: 1.1rem;
    }
}

/* Podpowiedzi wyszukiwania */
.site-header.search-suggestions-open {
    z-index: 1250;
}

.search-bar .search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-top: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: hidden;
    overflow-y: auto;
    max-height: min(70vh, 420px);
    display: none;
    z-index: 10;
}

/* Mobilna wyszukiwarka — lupa i modal */
.header-mobile-actions {
    display: none;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
    gap: 0;
}

.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    flex-shrink: 0;
}

.mobile-search-toggle:hover,
.mobile-search-toggle.active {
    color: var(--accent);
}

.mobile-search-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-search-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.mobile-search-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    transition: transform 0.25s ease;
}

.mobile-search-modal.active .mobile-search-modal-panel {
    transform: translateY(0);
}

.mobile-search-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-search-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.mobile-search-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
}

.mobile-search-modal-close:hover {
    background: rgba(229, 9, 20, 0.25);
}

.mobile-search-modal-body {
    padding: 1rem;
}

.mobile-search-bar {
    position: relative;
    width: 100%;
}

.mobile-search-bar form {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    transition: var(--transition);
}

.mobile-search-bar form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.mobile-search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    padding: 8px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
}

.mobile-search-bar button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}

.mobile-search-bar button:hover {
    color: var(--text-primary);
}

.mobile-search-bar .search-suggestions {
    position: static;
    margin-top: 0.75rem;
    max-height: min(55vh, 360px);
}

body.mobile-search-open {
    overflow: hidden;
}

@media (max-width: 992px) {
    .header-mobile-actions {
        display: flex;
    }

    .mobile-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .site-header .header-mobile-actions .mobile-menu-toggle {
        margin-left: 0;
    }
}

.suggestion-item {
    display: flex;
    gap: 15px;
    padding: 10px;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.suggestion-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.suggestion-content {
    flex: 1;
    overflow: hidden;
}

.suggestion-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.suggestion-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.suggestion-type {
    color: var(--accent);
    font-weight: 500;
}

.suggestion-poster--person {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    align-self: flex-start;
}

.suggestion-item--person {
    align-items: center;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-banner {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-main) 10%, rgba(15, 16, 20, 0.8) 50%, rgba(15, 16, 20, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.hero-text {
    max-width: 700px;
}

.hero:not(.hero-slider) .hero-text {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-text p {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-featured {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* --- Hero Slider --- */
.hero-slider {
    position: relative;
    --hero-autoplay: 6s;
    --hero-transition: 2s;
    --hero-content-delay: 0.55s;
    --hero-content-duration: 1.35s;
}

.hero-slider .hero-text p {
    text-shadow:
        -1px -1px 0 #000,
        0 -1px 0 #000,
        1px -1px 0 #000,
        -1px 0 0 #000,
        1px 0 0 #000,
        -1px 1px 0 #000,
        0 1px 0 #000,
        1px 1px 0 #000,
        -2px 0 0 #000,
        2px 0 0 #000,
        0 -2px 0 #000,
        0 2px 0 #000,
        1px 2px 3px rgba(0, 0, 0, 0.35);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.hero-slide.is-leaving {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    z-index: 3;
}

.hero-slider.is-animated[data-direction="next"] .hero-slide.is-active:not(.is-leaving) {
    animation: heroPaneInNext var(--hero-transition) cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-slider.is-animated[data-direction="prev"] .hero-slide.is-active:not(.is-leaving) {
    animation: heroPaneInPrev var(--hero-transition) cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-slider.is-animated[data-direction="next"] .hero-slide.is-leaving {
    animation: heroPaneOutNext var(--hero-transition) cubic-bezier(0.55, 0, 0.45, 1) both;
}

.hero-slider.is-animated[data-direction="prev"] .hero-slide.is-leaving {
    animation: heroPaneOutPrev var(--hero-transition) cubic-bezier(0.55, 0, 0.45, 1) both;
}

.hero-slider:not(.is-animated) .hero-slide.is-active .hero-banner {
    transform: scale(1);
    filter: blur(0);
}

.hero-slider:not(.is-animated) .hero-slide.is-active .hero-text {
    opacity: 1;
    transform: none;
}

.hero-slide-transition {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.hero-slider.is-transitioning .hero-slide-transition {
    visibility: visible;
    animation: heroSlideTransitionFade var(--hero-transition) ease both;
}

.hero-slide-spinner {
    position: relative;
    width: clamp(120px, 18vw, 190px);
    height: clamp(120px, 18vw, 190px);
}

.hero-slider.is-transitioning .hero-slide-spinner {
    animation: heroSlideSpinnerScale var(--hero-transition) cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroSlideTransitionFade {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes heroSlideSpinnerScale {
    0% {
        opacity: 0;
        transform: scale(0.72);
    }

    12% {
        opacity: 1;
        transform: scale(1);
    }

    88% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

.hero-slide .hero-banner,
.hero-slide .hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide .hero-banner {
    transform: scale(1.2);
    filter: blur(20px);
    will-change: transform, filter;
}

.hero-slide.is-active:not(.is-leaving) .hero-banner {
    animation: none;
}

.hero-slider.is-animated .hero-slide.is-active:not(.is-leaving) .hero-banner {
    animation:
        heroBannerReveal var(--hero-transition) cubic-bezier(0.22, 1, 0.36, 1) both,
        heroSlideKenBurns var(--hero-autoplay) ease-out var(--hero-transition) forwards;
}

.hero-slider.is-animated .hero-slide.is-leaving .hero-banner {
    animation: heroBannerHide var(--hero-transition) cubic-bezier(0.55, 0, 0.45, 1) both;
}

.hero-slide .hero-overlay {
    background: none;
    opacity: 0;
}

.hero-slide .hero-content {
    position: relative;
    z-index: 2;
}

.hero-slide .hero-text {
    opacity: 0;
    transform: translateY(48px);
}

.hero-slide.is-active:not(.is-leaving) .hero-text {
    animation: none;
}

.hero-slider.is-animated .hero-slide.is-active:not(.is-leaving) .hero-text {
    animation: heroSlideContentIn var(--hero-content-duration) cubic-bezier(0.22, 1, 0.36, 1) var(--hero-content-delay) both;
}

.hero-slider.is-animated[data-direction="next"] .hero-slide.is-active:not(.is-leaving) .hero-text {
    animation-name: heroSlideContentInNext;
}

.hero-slider.is-animated[data-direction="prev"] .hero-slide.is-active:not(.is-leaving) .hero-text {
    animation-name: heroSlideContentInPrev;
}

@keyframes heroPaneInNext {
    from {
        opacity: 0;
        transform: translateX(14%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroPaneInPrev {
    from {
        opacity: 0;
        transform: translateX(-14%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroPaneOutNext {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(-12%) scale(1.06);
    }
}

@keyframes heroPaneOutPrev {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(12%) scale(1.06);
    }
}

@keyframes heroBannerReveal {
    from {
        transform: scale(1.2);
        filter: blur(20px);
    }

    to {
        transform: scale(1.08);
        filter: blur(0);
    }
}

@keyframes heroBannerHide {
    from {
        transform: scale(1);
        filter: blur(0);
    }

    to {
        transform: scale(1.1);
        filter: blur(14px);
    }
}

@keyframes heroSlideKenBurns {
    from {
        transform: scale(1.08);
    }

    to {
        transform: scale(1);
    }
}

@keyframes heroOverlayReveal {
    from {
        opacity: 0.2;
    }

    to {
        opacity: 1;
    }
}

@keyframes heroOverlayHide {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.15;
    }
}

@keyframes heroSlideContentIn {
    from {
        opacity: 0;
        transform: translateY(48px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroSlideContentInNext {
    from {
        opacity: 0;
        transform: translateX(72px) translateY(48px);
    }

    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes heroSlideContentInPrev {
    from {
        opacity: 0;
        transform: translateX(-72px) translateY(48px);
    }

    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.hero-nav:hover {
    background: rgba(229, 9, 20, 0.85);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 1.25rem;
}

.hero-next {
    right: 1.25rem;
}

.hero-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.hero-dot.is-active,
.hero-dot:hover {
    background: var(--accent);
    transform: scale(1.15);
}

/* --- Library Stats --- */
.library-stats {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 1.25rem 2.25rem;
    background:
        radial-gradient(circle at 12% 0%, rgba(229, 9, 20, 0.16), transparent 42%),
        radial-gradient(circle at 88% 100%, rgba(229, 9, 20, 0.1), transparent 38%),
        linear-gradient(180deg, rgba(15, 16, 20, 0.15), var(--bg-main));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.library-stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.05) 50%, transparent 80%);
    animation: libraryStatsShimmer 5s ease-in-out infinite;
    pointer-events: none;
}

.library-stats-grid {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.library-stat-card {
    position: relative;
    padding: 1.45rem 1.1rem 1.35rem;
    border-radius: var(--radius-lg);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    animation: libraryStatFloat 6s ease-in-out infinite;
}

.library-stat-card:nth-child(2) {
    animation-delay: -2s;
}

.library-stat-card:nth-child(3) {
    animation-delay: -4s;
}

.library-stat-card::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: conic-gradient(
        from 0deg,
        var(--accent),
        rgba(255, 255, 255, 0.45),
        transparent 35%,
        rgba(229, 9, 20, 0.35),
        var(--accent)
    );
    animation: libraryStatRingRotate 7s linear infinite;
    z-index: 0;
}

.library-stat-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--radius-lg) - 1px);
    background: linear-gradient(160deg, rgba(32, 34, 39, 0.98), rgba(20, 21, 25, 0.98));
    z-index: 0;
}

.library-stat-content {
    position: relative;
    z-index: 1;
}

.library-stat-icon-wrap {
    position: relative;
    width: 74px;
    height: 74px;
    margin: 0 auto 0.9rem;
}

.library-stat-rings {
    position: absolute;
    inset: 0;
    opacity: 0.9;
}

.library-stat-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #fff;
    z-index: 2;
    text-shadow: 0 0 16px rgba(229, 9, 20, 0.45);
    animation: libraryStatIconPulse 2.8s ease-in-out infinite;
}

.library-stat-value {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.45rem;
}

.library-stat-number {
    display: inline-block;
    background: linear-gradient(90deg, #fff 0%, #ffe3e5 25%, #fff 50%, #f0f0f0 75%, #fff 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: libraryStatNumberShine 3.2s linear infinite;
    filter: drop-shadow(0 0 14px rgba(229, 9, 20, 0.35));
}

.library-stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

@keyframes libraryStatsShimmer {
    0%,
    100% {
        transform: translateX(-35%);
        opacity: 0;
    }

    45%,
    55% {
        opacity: 1;
    }

    100% {
        transform: translateX(35%);
    }
}

@keyframes libraryStatFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes libraryStatRingRotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes libraryStatNumberShine {
    to {
        background-position: 220% center;
    }
}

@keyframes libraryStatIconPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.92;
    }
}

@media (max-width: 860px) {
    .library-stats-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

/* --- Promo Banner --- */
.promo-banner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 0 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-banner a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 750px;
    transition: opacity 0.25s ease;
}

.promo-banner a:hover {
    opacity: 0.92;
}

.promo-banner img {
    display: block;
    width: 100%;
    max-width: 750px;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.promo-banner--under-filter {
    padding: 1.15rem 1.25rem 1.35rem;
    background:
        radial-gradient(circle at 12% 0%, rgba(229, 9, 20, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(20, 21, 28, 0.65), var(--bg-main));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.promo-banner--after-plot {
    margin: 0 auto 2rem;
    padding: 0;
}

.promo-banner--in-stats {
    padding: 0;
}

@media (prefers-reduced-motion: reduce) {
    .library-stats::before,
    .library-stat-card,
    .library-stat-card::before,
    .library-stat-icon,
    .library-stat-number,
    .library-stat-rings span {
        animation: none !important;
    }

    .library-stat-number {
        color: #fff;
        background: none;
        filter: none;
    }
}

/* --- Sections --- */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
}

.section-title span {
    font-size: 1.5rem;
    font-weight: 600;
}

.section-title a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--accent) 24%, transparent),
        color-mix(in srgb, var(--accent) 10%, transparent)
    );
    border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 6px 18px color-mix(in srgb, var(--accent) 20%, transparent);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.section-title a i {
    font-size: 0.82rem;
    transition: transform 0.25s ease;
}

.section-title a:hover {
    color: #fff;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--accent) 44%, transparent),
        color-mix(in srgb, var(--accent) 26%, transparent)
    );
    border-color: var(--accent);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 8px 24px color-mix(in srgb, var(--accent) 34%, transparent);
    transform: translateY(-1px);
    text-decoration: none;
}

.section-title a:hover i {
    transform: translateX(4px);
}

/* --- Media Grid --- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.media-row-fill {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.media-row-fill .media-card {
    width: 100%;
    min-width: 0;
}

@media (max-width: 1200px) {
    .media-row-fill {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .media-row-fill {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.media-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.media-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.media-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.media-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-card:hover .media-poster img {
    transform: scale(1.1);
}

.poster-hover-spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 62%;
    height: 62%;
    max-width: 120px;
    max-height: 120px;
    z-index: 4;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.82);
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s ease;
    pointer-events: none;
}

.poster-hover-spinner.sync-spinner-rings span {
    animation-play-state: paused;
}

@media (hover: hover) and (pointer: fine) {
    .media-card:hover .poster-hover-spinner {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }

    .media-card:hover .poster-hover-spinner.sync-spinner-rings span {
        animation-play-state: running;
    }
}

.poster-vod-badges {
    position: absolute;
    top: 9px;
    right: 5px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    z-index: 3;
    pointer-events: none;
    max-width: 42px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.media-card:hover .poster-vod-badges {
    opacity: 1;
}

.poster-vod-badge {
    display: block;
    width: 33px;
    height: 33px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
}

.poster-vod-badge-fallback,
.poster-vod-badge-more {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.825rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    text-transform: uppercase;
}

.poster-vod-badge-more {
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.85);
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.media-card:hover .media-overlay {
    opacity: 1;
}

.media-play-icon {
    font-size: 3rem;
    color: #fff;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.media-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.media-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rating {
    color: #ffc107;
    /* Gold for stars */
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Detail Page --- */
.movie-header-bg {
    width: 100%;
    height: 56.25vw;
    /* 16:9 Aspect Ratio */
    max-height: 75vh;
    /* Cap height on desktops */
    min-height: 450px;
    background-size: cover;
    background-position: center 20%;
    position: relative;
}

.movie-header-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-main) 100%),
        linear-gradient(to right, var(--bg-main) 0%, transparent 50%);
}

.movie-details-container {
    max-width: 1400px;
    margin: -150px auto 0;
    padding: 2rem;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .movie-details-container {
        grid-template-columns: 1fr;
        margin-top: -100px;
        padding: 1.5rem;
        gap: 25px;
    }

    .poster-box {
        position: relative;
        top: 0;
        max-width: 260px;
        margin: 0 auto;
    }
}

.poster-box {
    position: sticky;
    top: 100px;
}

.poster-box img {
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    width: 100%;
}

.detail-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--accent);
    color: #fff;
}

.movie-info-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.tagline {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.badge {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #ddd;
}

.badge-accent {
    border-color: var(--accent);
    color: var(--accent);
}

.plot-box {
    margin-bottom: 2rem;
}

.plot-box h3,
.cast-box h3,
.media-box h3,
.reviews-box h3,
.production-info h3,
.watch-providers-box h3 {
    border-left: 3px solid var(--accent);
    padding-left: 10px;
    margin-bottom: 1rem;
}

.original-title {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.production-info {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.production-grid {
    display: grid;
    gap: 12px;
}

.production-item strong {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.production-item span {
    color: #ccc;
    line-height: 1.5;
}

.watch-providers-box {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.watch-providers-region {
    margin-bottom: 1.25rem;
}

.watch-providers-region--nested {
    margin-bottom: 1rem;
    margin-left: 0;
    padding-left: 0.75rem;
    border-left: 3px solid rgba(229, 9, 20, 0.35);
}

.watch-providers-region--nested:last-child {
    margin-bottom: 0;
}

.watch-providers-offer-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.watch-providers-offer-block:last-of-type {
    margin-bottom: 0.75rem;
    padding-bottom: 0;
    border-bottom: none;
}

.watch-providers-offer-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.watch-providers-offer-title .fas {
    color: var(--accent);
    font-size: 0.95rem;
}

.watch-providers-region:last-of-type {
    margin-bottom: 0.5rem;
}

.watch-providers-region-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.65rem;
    padding-bottom: 0;
    border-bottom: none;
}

.providers-offer-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin: 0 0 10px;
    font-weight: 500;
}


.providers-group {
    margin-bottom: 1rem;
}

.providers-group:last-child {
    margin-bottom: 0;
}

.providers-group h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.providers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.provider-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    max-width: 100px;
    text-align: center;
}

.provider-card img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
}

.provider-card span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.watch-providers-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.watch-providers-empty i {
    color: var(--text-muted);
}

.plot-text {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.8;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.stat-item strong {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.stat-item span {
    font-size: 1.1rem;
    font-weight: 500;
}

.poster-box .stats-grid {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 0;
    text-align: center;
}

.poster-box .stat-item {
    text-align: center;
}

.poster-box .stat-item strong,
.poster-box .stat-item span {
    text-align: center;
}


.movie-info-content {
    min-width: 0;
    /* Prevents grid blowout */
}

/* Horizontal Scroll List (Cast, Seasons, etc) */
.h-scroll-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-card);
    max-width: 100%;
    /* Ensure it respects container */
}

.h-scroll-list::-webkit-scrollbar {
    height: 8px;
}

.h-scroll-list::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.h-scroll-list::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.h-scroll-list .media-card {
    min-width: 200px;
    width: 200px;
    flex: 0 0 auto;
}

.cast-card {
    min-width: 140px;
    width: 140px;
    text-align: center;
}

.cast-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    border: 2px solid var(--bg-card);
    transition: var(--transition);
}

.cast-card:hover img {
    border-color: var(--accent);
}

.cast-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.char-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Video/Gallery */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.video-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.video-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.03em;
}

.video-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Trailer modal */
.trailer-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.trailer-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.trailer-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

.trailer-modal-content {
    position: relative;
    width: 100%;
    max-width: 960px;
    z-index: 1;
}

.trailer-modal-close {
    position: absolute;
    top: -2.75rem;
    right: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.trailer-modal-close:hover {
    background: var(--accent);
}

.trailer-modal-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.trailer-modal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Reviews */
.review-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.review-author {
    font-weight: 700;
    color: var(--text-primary);
}

.review-rating {
    background: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.review-content {
    font-size: 0.95rem;
    color: #ccc;
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 3rem 0;
}

.pagination-status {
    align-self: center;
    padding: 0 0.35rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pagination .btn {
    background: color-mix(in srgb, var(--bg-card) 88%, var(--bg-main));
    color: var(--text-primary);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, rgba(255, 255, 255, 0.1));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pagination a.btn:hover {
    background: var(--accent);
    color: var(--fx-on-accent);
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

.pagination .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--bg-card) 70%, transparent);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 900px) {
    .movie-details-container {
        grid-template-columns: 1fr;
        margin-top: -50px;
        gap: 20px;
    }

    .poster-box {
        position: static;
        width: 200px;
        margin: 0 auto;
        text-align: center;
    }

    .movie-info-content h1 {
        font-size: 2.5rem;
        text-align: center;
    }

    .meta-badges {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* --- Mobile Adjustments & Admin Styles --- */

@media (max-width: 600px) {

    .main-container,
    .admin-container {
        padding: 1rem;
        /* Better spacing on small screens */
    }

    .section-title {
        margin-top: 2rem;
        padding-left: 0.5rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .section-title a {
        padding: 0.5rem 0.9rem;
        font-size: 0.85rem;
    }
}

/* --- Admin Panel Styles --- */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

#update-all-vod-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

#update-all-vod-btn .vod-count-badge {
    margin-left: 4px;
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 600;
}

#update-all-vod-btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.feature-btn {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.feature-btn.is-featured {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.45);
}

.feature-btn:hover:not(:disabled) {
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.5);
}

.featured-sort-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.featured-sort-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: grab;
}

.featured-sort-item.is-dragging {
    opacity: 0.5;
}

.featured-sort-item.drag-over {
    border-color: var(--accent);
}

.featured-drag-handle {
    color: var(--text-secondary);
    cursor: grab;
}

.featured-pos {
    min-width: 28px;
    font-weight: 600;
    color: var(--accent);
}

.featured-sort-item .actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

@media (max-width: 600px) {
    .featured-sort-item {
        flex-wrap: wrap;
    }

    .featured-sort-item .actions {
        width: 100%;
        margin-left: 0;
    }
}

.admin-nav {
    display: flex;
    gap: 10px;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.admin-nav .btn {
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-nav .btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.admin-nav .btn-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Panel admina — menu z hamburgera na każdym urządzeniu */
body.admin-panel .site-header--admin .header-mobile-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

body.admin-panel .site-header--admin .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2005;
    margin-left: 0;
    flex-shrink: 0;
}

body.admin-panel .site-header--admin .mobile-search-toggle {
    display: none;
}

body.admin-panel.site-nav-menu-open {
    overflow: hidden !important;
}

body.admin-panel.site-nav-menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2999;
    pointer-events: auto;
}

body.admin-panel.site-nav-menu-open .site-header {
    z-index: 3001;
}

@media (min-width: 993px) {
    body.admin-panel .site-header--admin .site-nav-panel {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
        width: 0 !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        background: #121318 !important;
        z-index: 3000 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.28s ease, visibility 0.28s ease, width 0.28s ease;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        pointer-events: none !important;
    }

    body.admin-panel .site-header--admin .site-nav-panel.active {
        width: min(88vw, 320px) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
    }

    body.admin-panel .site-header--admin .site-nav-panel .site-nav-drawer-head {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        width: min(88vw, 320px) !important;
        min-height: 64px;
        padding: 0 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: #15161b;
    }

    body.admin-panel .site-header--admin .site-nav-panel > ul,
    body.admin-panel .site-header--admin .site-nav-panel ul {
        flex: 1 !important;
        width: min(88vw, 320px) !important;
        flex-shrink: 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        list-style: none !important;
        display: flex !important;
    }

    body.admin-panel .site-header--admin .site-nav-panel > ul > li {
        width: 100%;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    body.admin-panel .site-header--admin .site-nav-panel > ul > li > a,
    body.admin-panel .site-header--admin .site-nav-panel > ul > li > button {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        width: 100% !important;
        min-height: 52px !important;
        padding: 14px 22px !important;
        margin: 0;
        font-size: 1.05rem !important;
        font-weight: 500 !important;
        line-height: 1.35 !important;
        color: var(--text-secondary) !important;
        text-decoration: none !important;
        text-align: left;
        background: transparent !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-left: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.admin-panel .site-header--admin .site-nav-panel > ul > li > a::after,
    body.admin-panel .site-header--admin .site-nav-panel > ul > li > button::after {
        display: none !important;
    }

    body.admin-panel .site-header--admin .site-nav-panel > ul > li > a.active {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border-left: 4px solid var(--accent) !important;
        padding-left: 18px !important;
    }

    body.admin-panel .site-header--admin .site-nav-panel > ul > li > a:hover,
    body.admin-panel .site-header--admin .site-nav-panel > ul > li > button:hover {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }

    body.admin-panel .site-header--admin .site-nav-panel .nav-divider {
        display: block !important;
        width: 100% !important;
        height: 1px !important;
        min-height: 0 !important;
        margin: 8px 0 !important;
        padding: 0 !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: none !important;
    }
}

@media (max-width: 992px) {
    body.admin-panel .site-header--admin .mobile-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Front — hamburger z menu panelu admina (dla zalogowanych) */
.admin-nav-wrap {
    flex-shrink: 0;
    position: relative;
}

.admin-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    flex-shrink: 0;
    border-radius: 4px;
}

.admin-menu-toggle:hover,
.admin-menu-toggle.active {
    color: var(--accent, #e50914);
    background: rgba(229, 9, 20, 0.1);
}

.admin-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 0;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    background: #121318;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease, width 0.28s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.admin-nav-panel.active {
    width: min(88vw, 320px);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    width: min(88vw, 320px);
    min-height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #15161b;
}

.admin-nav-drawer-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-nav-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
}

.admin-nav-drawer-close:hover {
    background: rgba(229, 9, 20, 0.25);
    color: #fff;
}

.admin-nav-panel > ul {
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(88vw, 320px);
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
}

.admin-nav-panel > ul > li {
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-nav-panel > ul > li > a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 14px 22px;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text-secondary, #a0a0a0);
    text-decoration: none;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
}

.admin-nav-panel > ul > li > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.admin-nav-panel > ul > li > a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    border-left: 4px solid var(--accent, #e50914);
    padding-left: 18px;
}

body.admin-nav-menu-open {
    overflow: hidden;
}

body.admin-nav-menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2999;
    pointer-events: auto;
}

body.admin-nav-menu-open .site-header {
    z-index: 3001;
}

.admin-container .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* Admin Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: block;
    /* For responsive table scrolling if needed */
    overflow-x: auto;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table td {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Admin Forms */
.admin-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    max-width: 600px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.actions {
    display: flex;
    gap: 10px;
}

.admin-container {
    padding: 2rem 0;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* --- Zoptymalizowana Responsywnosc --- */
/* --- Zoptymalizowana Responsywnosc --- */
@media (max-width: 900px) {
    .movie-details-container {
        grid-template-columns: 1fr;
        margin-top: -50px;
        gap: 20px;
        padding: 1.5rem;
    }

    .poster-box {
        position: static;
        width: 180px;
        margin: 0 auto 20px;
        text-align: center;
    }

    .poster-box img {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }

    .movie-info-content h1 {
        font-size: 2.2rem;
        text-align: center;
    }

    .tagline {
        text-align: center;
        font-size: 1rem;
    }

    .meta-badges {
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    .detail-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .detail-actions .btn {
        width: auto;
        min-width: 140px;
    }
}

@media (max-width: 768px) {

    /* Main Container Padding */
    .main-container {
        padding: 15px !important;
    }

    /* Grid for Listing Pages - 2 Columns */
    .media-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .media-grid .media-card {
        width: 100% !important;
        margin: 0 !important;
    }

    .media-row-fill {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 15px !important;
    }

    .media-row-fill .media-card {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    /* Homepage Scroller - Keep Horizontal Scroll */
    .media-scroller {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        /* was 10px */
        padding-bottom: 20px;
        flex-wrap: nowrap !important;
    }

    .media-scroller .media-card {
        flex: 0 0 auto !important;
        width: 140px !important;
        min-width: 140px !important;
        scroll-snap-align: start;
        margin: 0 !important;
    }

    /* Hero Adjustments */
    .hero {
        height: 85vh;
        min-height: 600px;
        padding-bottom: 4rem;
        /* More padding at bottom for text breathing room */
    }

    .hero-banner {
        height: 85vh;
        min-height: 600px;
        mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    }

    .hero-text {
        text-align: center;
        padding: 0 15px;
        padding-top: 20px;
    }

    .hero-text h1 {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-top: 0;
        /* Pull text up into banner fade */
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-nav {
        width: 38px;
        height: 38px;
    }

    .hero-prev {
        left: 0.5rem;
    }

    .hero-next {
        right: 0.5rem;
    }

    .hero-dots {
        bottom: 0.75rem;
    }

    /* Movie Details */
    .movie-header-bg {
        height: 40vh;
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .media-grid {
        gap: 10px !important;
    }

    .hero-text h1 {
        font-size: 1.8rem !important;
    }
}

/* --- Episode List Styles --- */
.episode-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
    align-items: flex-start;
    position: relative;
}

.episode-poster {
    width: 140px;
    /* Slightly larger for better vis */
    flex-shrink: 0;
    position: relative;
}

.episode-poster img {
    width: 100%;
    border-radius: 4px;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.episode-content {
    flex-grow: 1;
    min-width: 0;
    /* Prevents text overflow issues */
}

/* Actions Default (Desktop): Overlay on Image */
/* Position relative to .episode-poster since content order: poster, actions */
/* Wait, in HTML structure: row > poster, actions, content */
/* If I want overlay, I need absolute positioning relative to .episode-poster IF actions are inside poster. */
/* But here actions are siblings. So absolute positioning is relative to .episode-row. */

.episode-actions {
    position: absolute;
    left: 10px;
    /* Inside image area */
    bottom: 15px;
    /* Inside image area if row padding matches */
    display: flex;
    gap: 5px;
    z-index: 5;
}

.ep-status-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.ep-status-btn:hover {
    transform: scale(1.1);
}

/* Specific Mobile/Tablet Rules */
@media (max-width: 992px) {
    .episode-poster {
        width: 120px;
        /* Smaller image on mobile */
    }

    .episode-actions {
        position: static;
        /* Remove absolute positioning */
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-left: auto;
        /* Push to right */
        justify-content: center;
        /* Center horizontally in col */
        align-self: center;
        /* Center vertically in row */
        order: 3;
        /* Ensure it is after content visually */
        padding-left: 10px;
        min-width: 40px;
        /* Ensure space */
    }

    .ep-status-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
        margin: 0 auto;
        /* Center in column */
    }

    .episode-content h4 {
        font-size: 0.95rem;
        /* Slightly smaller font */
    }
}

/* --- Advanced Filter Bar (compact) --- */
main {
    position: relative;
    z-index: 0;
}

.advanced-filter {
    position: relative;
    z-index: 1005;
    --filter-sheet-edge-top: max(0.65rem, calc(env(safe-area-inset-top, 0px) + 0.5rem));
    --filter-sheet-edge-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    --filter-sheet-edge-x: 1rem;
    --filter-genre-row-height: 2.35rem;
    --filter-genre-visible-rows: 5;
    --filter-genre-list-scroll-max: calc(var(--filter-genre-row-height) * var(--filter-genre-visible-rows) + 0.7rem);
    --filter-genre-panel-chrome: 8.5rem;
    background: rgba(20, 21, 28, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.advanced-filter:has(.filter-dd.open) {
    z-index: 5000;
}

.advanced-filter-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.advanced-filter-form {
    display: flex;
    flex-direction: column;
}

.filter-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0;
    flex-wrap: wrap;
}

.filter-type-tabs {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.filter-type-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.filter-type-tab:hover {
    color: var(--text-primary);
}

.filter-type-tab.active {
    color: var(--text-primary);
}

.filter-type-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.filter-dropdowns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.filter-dd {
    position: relative;
}

.filter-dd-trigger {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.filter-dd-trigger:hover {
    border-color: rgba(255, 255, 255, 0.22);
}

.filter-dd.is-active .filter-dd-trigger,
.filter-dd.open .filter-dd-trigger {
    border-color: var(--accent);
    background: rgba(229, 9, 20, 0.1);
    box-shadow: 0 0 0 1px var(--accent-glow);
}

.filter-dd-trigger .fa-chevron-down {
    font-size: 0.65rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.filter-dd.open .filter-dd-trigger .fa-chevron-down {
    transform: rotate(180deg);
}

.filter-dd-label {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-dd[data-dd="vod"] {
    flex-shrink: 0;
}

.filter-dd[data-dd="vod"] .filter-dd-label {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.filter-dd[data-dd="vod"] .filter-dd-trigger {
    text-transform: none;
    letter-spacing: 0.01em;
    font-weight: 500;
}

.filter-dd-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    max-width: 320px;
    max-height: 320px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1200;
    overflow: hidden;
    animation: filterDropIn 0.18s ease;
}

.advanced-filter:has(.filter-dd.open) .filter-dd-panel {
    z-index: 5010;
}

/* Otwarty filtr: od góry ekranu, wysokość wg treści (max. do krawędzi dolnej) */
.advanced-filter:has(.filter-dd.open) .filter-toolbar {
    position: relative;
    z-index: 5030;
}

.advanced-filter:has(.filter-dd.open)::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 4990;
}

.filter-dd.open .filter-dd-panel {
    position: fixed;
    top: var(--filter-sheet-edge-top);
    bottom: auto;
    left: var(--filter-sheet-edge-x);
    right: var(--filter-sheet-edge-x);
    width: auto;
    height: auto;
    min-width: 0;
    max-width: none;
    max-height: calc(100dvh - var(--filter-sheet-edge-top) - var(--filter-sheet-edge-bottom));
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
    animation: filterSheetIn 0.22s ease;
    z-index: 5020;
    -webkit-overflow-scrolling: touch;
}

.filter-dd.open .filter-dd-panel .filter-dd-search {
    flex-shrink: 0;
}

.filter-dd.open .filter-dd-list {
    flex: none;
    min-height: 0;
    max-height: none;
    overflow-y: visible;
}

.filter-dd.open[data-dd="genre"] .filter-dd-panel {
    overflow: hidden;
}

.filter-dd.open[data-dd="genre"] .filter-dd-list {
    flex: 1 1 auto;
    max-height: min(
        var(--filter-genre-list-scroll-max),
        calc(100dvh - var(--filter-sheet-edge-top) - var(--filter-sheet-edge-bottom) - var(--filter-genre-panel-chrome))
    );
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.06);
}

.filter-dd.open[data-dd="genre"] .filter-dd-collapse-bar {
    flex-shrink: 0;
}

.filter-dd.open .filter-dd-panel-vod {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.filter-dd.open .filter-dd-panel-vod .filter-vod-panel-block--platforms {
    flex: none;
    min-height: 0;
    display: block;
}

.filter-dd.open .filter-dd-panel-vod .vod-providers-scroll--panel {
    flex: none;
    min-height: 0;
    max-height: none;
    overflow-y: visible;
}

.filter-dd.open .filter-dd-collapse-bar {
    margin-top: 0;
}

@media (min-width: 768px) {
    .filter-dd.open .filter-dd-panel {
        left: 50%;
        right: auto;
        width: min(520px, calc(100vw - 2rem));
        transform: translateX(-50%);
    }
}

.filter-dd-panel-sm {
    min-width: 260px;
    max-height: none;
    padding: 1rem;
}

.filter-dd.open .filter-dd-panel {
    display: flex;
    flex-direction: column;
}

.filter-dd-collapse-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.75rem;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: auto;
    transition: color 0.2s ease, background 0.2s ease;
}

.filter-dd-collapse-bar:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.filter-dd-collapse-bar:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.filter-dd-collapse-bar i {
    font-size: 0.65rem;
}

.filter-dd.open .filter-dd-panel-sm .filter-dd-collapse-bar,
.filter-dd.open .filter-dd-panel-vod .filter-dd-collapse-bar {
    margin-top: 0.35rem;
}

@keyframes filterDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-dd-search {
    position: relative;
    padding: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-dd-search input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.filter-dd-search input:focus {
    border-color: var(--accent);
}

.filter-dd-search .fa-search {
    position: absolute;
    right: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.filter-dd-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    overflow-y: auto;
    max-height: 240px;
    flex: 1;
    min-height: 0;
}

.filter-dd-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.filter-dd-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.filter-dd-option.selected {
    color: var(--accent);
    font-weight: 600;
    background: rgba(229, 9, 20, 0.08);
}

.filter-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.filter-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-icon-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-filter-show {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    background: var(--accent);
    border: none;
    border-radius: 999px;
    color: var(--fx-on-accent);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.btn-filter-show:hover {
    color: var(--fx-on-accent);
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.filter-dd-panel-vod {
    min-width: 280px;
    max-width: 360px;
    padding: 0.75rem 0.85rem;
    max-height: min(420px, 70vh);
    overflow-y: auto;
}

.filter-vod-panel-block {
    margin-bottom: 0.7rem;
}

.filter-vod-panel-block:last-child {
    margin-bottom: 0;
}

.filter-vod-panel-title {
    margin: 0 0 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.filter-vod-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.filter-vod-chip {
    padding: 0.32rem 0.55rem;
    font-family: inherit;
    font-size: 0.78rem;
    line-height: 1.25;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-vod-chip:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.18);
}

.filter-vod-chip.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.vod-providers-scroll--panel {
    flex-wrap: wrap;
    align-content: flex-start;
    max-height: 150px;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 0.4rem;
}

.filter-dd-panel-vod .vod-pill {
    height: 52px;
    padding: 0.35rem 0.55rem;
}

.filter-dd-panel-vod .vod-pill img {
    max-height: 36px;
    width: auto;
}

.vod-providers-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.25rem 0 0.45rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.06);
    -webkit-overflow-scrolling: touch;
}

.vod-providers-scroll::-webkit-scrollbar {
    height: 5px;
}

.vod-providers-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
}

.vod-providers-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.vod-pill {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 60px;
    padding: 0.45rem 0.825rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    position: relative;
}

.vod-pill:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.vod-pill.active {
    border-color: var(--accent);
    background: rgba(229, 9, 20, 0.12);
    box-shadow: 0 0 0 1px var(--accent-glow);
}

.vod-pill img {
    display: block;
    max-width: 108px;
    max-height: 39px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.vod-pill-fallback {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.vod-provider-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.slider-header {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.slider-values {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
}

.slider-values .fa-star {
    font-size: 0.75rem;
    margin-left: 3px;
}

.dual-range {
    position: relative;
    height: 32px;
    --range-min: 0%;
    --range-max: 100%;
}

.dual-range::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 5px;
    transform: translateY(-50%);
    background: var(--bg-secondary);
    border-radius: 3px;
}

.dual-range::after {
    content: '';
    position: absolute;
    top: 50%;
    left: var(--range-min);
    right: calc(100% - var(--range-max));
    height: 5px;
    transform: translateY(-50%);
    background: var(--accent);
    border-radius: 3px;
    pointer-events: none;
}

.dual-range input[type="range"] {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 5px;
    margin: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.dual-range input[type="range"]:first-of-type {
    z-index: 1;
}

.dual-range input[type="range"]:last-of-type {
    z-index: 2;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.dual-range input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    cursor: pointer;
    pointer-events: auto;
}

.dual-range input[type="range"]::-webkit-slider-runnable-track,
.dual-range input[type="range"]::-moz-range-track {
    background: transparent;
    height: 5px;
}

.browse-header {
    margin-bottom: 1.5rem;
}

.browse-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.browse-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.browse-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.browse-empty p {
    margin-bottom: 1.25rem;
}

@media (max-width: 1023px) {
    .advanced-filter-inner {
        padding: 0 1.25rem;
    }
}

@media (max-width: 767px) {
    .advanced-filter {
        overflow: visible;
    }

    .advanced-filter-inner {
        padding: 0 1rem;
        overflow: visible;
    }

    .advanced-filter-form {
        overflow: visible;
    }

    .filter-toolbar {
        gap: 0.65rem;
        overflow: visible;
    }

    .filter-type-tabs {
        width: 100%;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding-bottom: 0.35rem;
    }

    .filter-dropdowns {
        width: 100%;
        overflow: visible;
        flex-wrap: wrap;
        padding-bottom: 0.15rem;
    }

    .filter-dd {
        position: static;
    }

    .filter-dd.open .filter-dd-panel-sm {
        padding: 1.25rem 1rem 0;
    }

    .filter-dd.open .filter-dd-panel-vod {
        padding: 0.85rem 0.85rem 0;
    }

    .filter-dd.open .filter-dd-panel:not(.filter-dd-panel-sm):not(.filter-dd-panel-vod) {
        padding-top: 0.35rem;
    }

    .filter-toolbar-actions {
        margin-left: 0;
    }

    .vod-pill {
        height: 54px;
        padding: 0.375rem 0.675rem;
    }

    .vod-pill img {
        max-height: 33px;
        max-width: 96px;
    }

    .dual-range input[type="range"]::-webkit-slider-thumb,
    .dual-range input[type="range"]::-moz-range-thumb {
        width: 22px;
        height: 22px;
    }
}

@keyframes filterSheetIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.filter-dropdown-open {
    overflow: hidden;
}

/* --- 404 Error Page --- */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}

.error-page-content {
    max-width: 520px;
    padding: 2rem 1rem;
}

.error-page-code {
    font-size: clamp(5rem, 18vw, 8rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-page h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.error-page-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Title view auto-sync loader */
.title-view-sync {
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem 1rem;
}

.title-view-sync-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: blur(18px);
    transform: scale(1.08);
}

.title-view-sync-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(229, 9, 20, 0.18), transparent 55%),
        linear-gradient(180deg, rgba(10, 10, 12, 0.72), rgba(10, 10, 12, 0.94));
}

.title-view-sync-content {
    position: relative;
    z-index: 2;
    width: min(100%, 420px);
    text-align: center;
    animation: titleViewSyncFadeIn 0.6s ease;
}

.title-view-sync-poster {
    position: relative;
    width: 180px;
    margin: 0 auto 1.5rem;
}

.title-view-sync-poster img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    display: block;
}

.title-view-sync-spinner {
    position: absolute;
    inset: -14px;
}

.sync-spinner-rings {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sync-spinner-rings span {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: titleViewSyncSpin 1.4s linear infinite;
}

.sync-spinner-rings span:nth-child(1) {
    inset: 0;
    border-top-color: var(--accent);
    border-right-color: rgba(229, 9, 20, 0.35);
}

.sync-spinner-rings span:nth-child(2) {
    inset: 14%;
    border-bottom-color: rgba(255, 255, 255, 0.85);
    animation-direction: reverse;
    animation-duration: 1.8s;
}

.sync-spinner-rings span:nth-child(3) {
    inset: 28%;
    border-left-color: rgba(255, 255, 255, 0.35);
    animation-duration: 2.2s;
}

.title-view-sync-name {
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.title-view-sync-status {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    min-height: 1.5rem;
}

.title-view-sync-progress {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.title-view-sync-progress-bar {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: titleViewSyncProgress 1.4s ease-in-out infinite;
}

@keyframes titleViewSyncFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleViewSyncSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes titleViewSyncProgress {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(320%);
    }
}

/* --- Page view statistics (admin) --- */
.stats-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stats-filters {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.stats-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stats-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stats-filters input,
.stats-filters select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    box-sizing: border-box;
}

.stats-filters-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stats-trend-table td:last-child {
    min-width: 180px;
}

.stats-trend-bar-wrap {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.stats-trend-bar {
    height: 100%;
    min-width: 2px;
    background: linear-gradient(90deg, var(--accent), #7c5cff);
    border-radius: inherit;
    transition: width 0.3s ease;
}

/* --- Pełna ekipa filmowa (strona filmu / serialu) --- */
.crew-full-box {
    margin-bottom: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.crew-full-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.crew-full-summary::-webkit-details-marker {
    display: none;
}

.crew-full-box[open] .crew-full-summary i.fa-chevron-down {
    transform: rotate(180deg);
}

.crew-full-summary i.fa-chevron-down {
    transition: var(--transition);
}

.crew-full-body {
    padding: 0 15px 15px;
    background: rgba(0, 0, 0, 0.2);
}

.crew-dept {
    margin-top: 1.25rem;
}

.crew-dept-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.crew-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.crew-member {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.crew-member-photo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.crew-member-photo--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.crew-member-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.crew-member-name {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.25;
}

.crew-member-job {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* --- Sezony: plakat i opis sezonu --- */
.season-poster-thumb {
    width: 34px;
    border-radius: 4px;
    flex-shrink: 0;
}

.season-intro {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.season-intro-title {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.season-intro-text {
    flex: 1;
    min-width: 0;
}

.season-intro-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.season-intro-overview {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.5;
    margin: 0;
}

/* --- Galeria mediów: lightbox --- */
.gallery-item {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    min-width: 150px;
    max-width: 100%;
    flex: 0 0 auto;
}

.gallery-item--backdrop {
    min-width: 300px;
}

.gallery-item img {
    border-radius: 8px;
    width: 100%;
    display: block;
    transition: var(--transition);
}

.gallery-item:hover img {
    opacity: 0.85;
}

.media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.media-lightbox.is-open {
    display: flex;
}

.media-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

.media-lightbox-figure {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.media-lightbox-figure img {
    max-width: 95vw;
    max-height: 80vh;
    border-radius: 8px;
    object-fit: contain;
}

.media-lightbox-caption {
    color: #ccc;
    font-size: 0.9rem;
    text-align: center;
}

.media-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.media-lightbox-close:hover {
    background: var(--accent);
}

/* --- Recenzje: rozwijanie treści --- */
.review-head-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.review-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.review-full {
    white-space: normal;
}

.review-toggle {
    display: inline-block;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 0.85rem;
    cursor: pointer;
    font-style: normal;
}

.review-toggle:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .crew-members {
        grid-template-columns: 1fr;
    }

    .season-intro {
        flex-direction: column;
    }
}
/* --- Etap 2/3: nowe sekcje karty tytułu --- */
.badge-age {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

a.cast-card,
a.crew-member-name,
a.recommendation-card,
a.keyword-chip,
a.person-link {
    text-decoration: none;
    color: inherit;
}

a.cast-card {
    display: block;
}

a.crew-member-name:hover {
    color: var(--accent);
}

.next-episode-box,
.collection-box,
.keywords-box,
.recommendations-box {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.next-episode-box h3,
.collection-box h3,
.keywords-box h3,
.recommendations-box h3,
.person-biography h2,
.person-filmography h2 {
    border-left: 3px solid var(--accent);
    padding-left: 10px;
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

.next-episode-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
}

.next-episode-name {
    font-size: 1.05rem;
    margin: 0;
}

.collection-box {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.collection-poster img {
    width: 92px;
    border-radius: var(--radius-sm);
    display: block;
}

.collection-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.collection-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.collection-name {
    font-size: 1.15rem;
    font-weight: 600;
}

.collection-link {
    color: var(--accent);
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: 4px;
}

.collection-link:hover {
    text-decoration: underline;
}

.keyword-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.keyword-chip:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.recommendation-grid,
.filmography-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.recommendation-card-wrap {
    position: relative;
}

.recommendation-import-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s, background 0.2s, opacity 0.2s;
}

.recommendation-import-btn:hover:not(:disabled) {
    transform: scale(1.06);
    background: var(--accent-hover, #5a9fd4);
}

.recommendation-import-btn:disabled {
    cursor: wait;
    opacity: 0.85;
}

.recommendation-import-btn.is-imported {
    background: #2ecc71;
    cursor: default;
}

.recommendation-card-wrap .recommendation-card--external.is-imported {
    pointer-events: auto;
}

.recommendation-card {
    display: block;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.recommendation-poster {
    display: block;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.recommendation-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recommendation-info {
    display: block;
    padding: 10px;
}

.recommendation-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
}

.recommendation-meta {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.recommendation-meta i {
    color: var(--accent);
}

.recommendation-role {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: var(--text-muted);
}


/* --- Profil osoby (person.php) --- */
.person-header {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.person-photo {
    flex: 0 0 220px;
    max-width: 220px;
}

.person-photo img {
    width: 100%;
    border-radius: var(--radius-md);
    display: block;
}

.person-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 2/3;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 3rem;
}

.person-name {
    margin: 0 0 0.35rem;
    font-size: 2rem;
    line-height: 1.15;
}

.person-department {
    color: var(--accent);
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

.person-facts {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.person-facts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.person-facts i {
    color: var(--accent);
    margin-top: 3px;
    min-width: 16px;
}

.person-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.person-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.person-link:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.person-biography,
.person-filmography {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.person-biography p {
    color: #ccc;
    line-height: 1.7;
    margin: 0 0 0.75rem;
}

.person-filmography-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 1.25rem;
}

.person-bio-toggle {
    display: inline-block;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 0.9rem;
    cursor: pointer;
}

.person-bio-toggle:hover {
    text-decoration: underline;
}

@media (max-width: 700px) {
    .person-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .person-facts li {
        justify-content: center;
        text-align: left;
    }

    .person-links {
        justify-content: center;
    }

    .collection-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

.recommendation-card--external .recommendation-name::after {
    content: "\f35d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.65rem;
    margin-left: 6px;
    color: var(--text-muted);
}
/* --- Odcinki: obsada gościnna --- */
.episode-guests {
    margin-top: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.episode-guests-label {
    color: var(--text-muted);
    margin-right: 4px;
}

.episode-guests-list {
    display: inline;
}

.episode-guest {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
    margin-right: 6px;
}

a.episode-guest:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.episode-guest-char {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* --- VOD: link do JustWatch --- */
.watch-providers-link-wrap {
    margin: 12px 0 0;
}

.watch-providers-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.watch-providers-link:hover {
    background: var(--accent);
    color: #fff;
}

