

:root {

    --fx-wipe-bg: var(--on-primary, #fff);

    --fx-wipe-fg: color-mix(in srgb, var(--primary) 58%, #07060f);
    --fx-ease: cubic-bezier(0.3, 1, 0.8, 1);
    --fx-spring: cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@media (hover: hover) {
    .btn-premium.primary {
        isolation: isolate;
    }

    .btn-premium.primary::before {
        left: -40px;
        width: calc(100% + 80px);
        background: var(--fx-wipe-bg);
        transform: translate3d(-104%, 0, 0) skewX(-28deg);
        transition: transform 0.5s var(--fx-ease);
        z-index: -1;
    }

    .btn-premium.primary:hover::before {
        left: -40px;
        transform: translate3d(0, 0, 0) skewX(-28deg);
    }

    .btn-premium.primary:hover,
    .btn-premium.primary:hover .material-symbols-outlined,
    .btn-premium.primary:hover i {
        color: var(--fx-wipe-fg) !important;
    }
}

.btn-premium {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        scale 0.14s ease-out,
        translate 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-link {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1), scale 0.14s ease-out;
}

.nav-dd-table .ddt-row {
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.14s ease, scale 0.14s ease-out;
}

.btn-premium:active,
.nav-link:active,
.nav-dd-table .ddt-row:active,
.mnav-tile:active,
.mnav-btn:active,
.ai-nav-btn:active,
.fx-chip:active,
.fx-pal-item:active {
    scale: 0.96;
}

.row__poster-container:active {
    scale: 0.98;
}

@property --fx-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes fx-spin {
    to { --fx-angle: 360deg; }
}

.fx-ring {
    position: relative;
}

.fx-ring::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--fx-angle),
            transparent 0 52%,
            rgba(var(--primary-rgb), 0.9) 68%,
            #fff 78%,
            rgba(var(--primary-rgb), 0.9) 88%,
            transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: fx-spin 3.6s linear infinite;
    pointer-events: none;
}

.nav {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        translate 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-nav="bar"] .nav.fx-nav-hidden {
    translate: 0 -130%;
}

.nav-links.fx-pill-on {
    position: relative;
}

.fx-nav-pill {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--fx-w, 44px);
    height: var(--fx-h, 44px);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), inset 0 0 10px rgba(255, 255, 255, 0.02);
    transform: translate3d(var(--fx-x, 0px), var(--fx-y, 0px), 0);
    transition: transform 0.45s var(--fx-spring), width 0.45s var(--fx-spring), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.nav-links.fx-pill-on .fx-nav-pill {
    opacity: 1;
}

.fx-nav-pill.fx-no-anim {
    transition: none;
}

.nav-links.fx-pill-on .nav-link {
    position: relative;
    z-index: 1;
}

.nav-links.fx-pill-on .nav-link.active,
.nav-links.fx-pill-on .nav-link:hover {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.fx-mega {
    display: none;
}

@media (min-width: 1180px) and (hover: hover) {

    html[data-nav="bar"] .nav-dropdown-content.nav-dd-table.fx-has-mega {
        min-width: 826px;
        padding-right: 266px;
    }

    html[data-nav="bar"] .fx-mega {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 8px;
        right: 8px;
        bottom: 8px;
        width: 250px;
        padding: 10px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid rgba(255, 255, 255, 0.07);
        overflow: hidden;
    }
}

.fx-mega-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 2px 9px;
}

.fx-mega-title {
    font-family: var(--font-display, inherit);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray-text, #9a9aa6);
}

.fx-mega-cat {
    font-family: var(--font-display, inherit);
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fx-mega-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    transition: opacity 0.18s ease;
}

.fx-mega-grid.is-swapping {
    opacity: 0;
}

.fx-mega-wait {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    display: grid;
    place-items: center;
}

.fx-mega-item {
    position: relative;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s var(--fx-ease), border-color 0.25s ease, scale 0.14s ease-out;
}

.fx-mega-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fx-mega-item:hover,
.fx-mega-item:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.7);
    outline: none;
}

.fx-mega-item:active {
    scale: 0.96;
}

.fx-mega-item span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 7px 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fx-pal {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: min(14vh, 130px) 16px 16px;
    background: rgba(4, 5, 10, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}

.fx-pal.is-open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

html.no-gpu .fx-pal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(4, 5, 10, 0.9);
}

.fx-pal-box {
    width: min(660px, 100%);
    max-height: min(640px, calc(100dvh - 60px));
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: #0d0e19;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(var(--primary-rgb), 0.12);
    overflow: hidden;
    transform: translateY(-10px) scale(0.985);
    transition: transform 0.24s var(--fx-spring);
}

.fx-pal.is-open .fx-pal-box {
    transform: none;
}

.fx-pal-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.5);
    flex: none;
}

.fx-pal-top input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: 0;
    color: #fff;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
}

.fx-pal-top input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.fx-kbd {
    flex: none;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.fx-pal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.fx-pal-label {
    padding: 10px 10px 7px;
    font-family: var(--font-display, inherit);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray-text, #9a9aa6);
}

.fx-pal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 8px 6px;
}

.fx-pal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: none;
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, scale 0.14s ease-out;
}

.fx-pal-item.is-active {
    background: rgba(var(--primary-rgb), 0.16);
    border-color: rgba(var(--primary-rgb), 0.4);
}

.fx-pal-thumb {
    flex: none;
    width: 38px;
    height: 56px;
    border-radius: 7px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
}

.fx-pal-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary-soft);
    font-size: 0.95rem;
}

.fx-pal-main {
    flex: 1;
    min-width: 0;
}

.fx-pal-name,
.fx-pal-sub {
    display: block;
}

.fx-pal-name {
    font-weight: 700;
    font-size: 0.93rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fx-pal-sub {
    margin-top: 2px;
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fx-pal-tag {
    flex: none;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fx-pal-empty {
    padding: 34px 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    font-weight: 600;
}

.fx-pal-foot {
    flex: none;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    font-weight: 600;
}

.fx-pal-foot span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fx-pal-foot .fx-pal-foot-end {
    margin-left: auto;
}

@media (max-width: 600px) {
    .fx-pal { padding-top: 12px; }
    .fx-pal-foot { display: none; }
}

.fx-search-hint {
    display: none;
}

@media (min-width: 1100px) and (hover: hover) {
    .fx-search-hint {
        display: inline-flex;
        margin-left: 8px;
    }
}

.fx-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, scale 0.14s ease-out;
}

.fx-chip i {
    font-size: 0.8rem;
    color: var(--primary-soft);
    transition: color 0.2s ease;
}

.fx-chip:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (hover: hover) {
    .fx-chip:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #fff;
        transform: translateY(-1px);
    }
}

.fx-chip.is-active {
    background: var(--btn-bg, var(--primary));
    border-color: transparent;
    color: var(--on-primary, #fff);
    box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.35);
}

.fx-chip.is-active i {
    color: var(--on-primary, #fff);
}

.row__poster-container {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        border-color 0.4s ease, background 0.4s ease, scale 0.14s ease-out;

    animation-fill-mode: backwards;
}

.fx-card-actions.card-hover-actions {
    top: 10px;
    right: 10px;
    gap: 6px;
}

.fx-card-actions .card-hover-btn {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), scale 0.14s ease-out;
}

.fx-card-actions .card-hover-btn:active {
    scale: 0.9;
}

.fx-card-actions .card-hover-btn.active {
    background: rgba(var(--primary-rgb), 0.95);
    border-color: rgba(var(--primary-rgb), 0.95);
}

.fx-ghost {
    position: fixed;
    z-index: 5000;
    margin: 0;
    background-color: #0a0b13;
    background-size: cover;
    background-position: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    will-change: transform, opacity;
}

.fx-moods {
    margin: 26px 0 6px;
    padding: 0 40px;
}

.fx-moods-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.fx-moods-title {
    font-family: var(--font-display, inherit);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fff;
}

.fx-moods-sub {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
}

.fx-moods-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fx-moods-bar::-webkit-scrollbar {
    display: none;
}

.fx-moods-bar .fx-chip {
    flex: none;
    height: 40px;
    padding: 0 16px;
    font-size: 0.86rem;
}

.fx-mood-slot {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s cubic-bezier(0.3, 1, 0.4, 1);
}

.fx-mood-slot.is-open {
    grid-template-rows: 1fr;
}

.fx-mood-slot > .fx-mood-inner {
    min-height: 0;
    overflow: hidden;
}

.fx-mood-slot.is-open > .fx-mood-inner {
    overflow: visible;
}

@media (max-width: 768px) {
    .fx-moods { padding: 0 16px; margin-top: 18px; }
    .fx-moods-sub { display: none; }
}

html.reduce-motion .btn-premium.primary::before,
html.reduce-motion .fx-nav-pill,
html.reduce-motion .fx-pal,
html.reduce-motion .fx-pal-box,
html.reduce-motion .fx-mood-slot,
html.reduce-motion .nav {
    transition: none !important;
}

html.reduce-motion .fx-ring::after,
html.no-gpu .fx-ring::after {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .btn-premium.primary::before,
    .fx-nav-pill,
    .fx-pal,
    .fx-pal-box,
    .fx-mood-slot {
        transition: none !important;
    }

    .fx-ring::after {
        display: none;
    }

}
