:root {
    --bg: #030c1d;
    --panel: #071730;
    --panel2: #0b2244;
    --card: #081426;
    --text: #f3f7ff;
    --muted: #93a6c4;
    /*--accent:#1fb6ff;*/
    --accent: #9e59f2;
    --line: rgba(255, 255, 255, .07);
    --shadow: 0 12px 30px rgba(0, 0, 0, .42);
    --radius: 16px;
    --radius-sm: 12px;
    --navh: 64px;
    --toph: 56px;
    --tabs: 54px;
    --maxw: 520px;
    --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none
}

button, input, textarea {
    font: inherit
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, .6)
}

body.modal-open,
body.splash-active {
    overflow: hidden;
}

.app {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(var(--navh) + env(safe-area-inset-bottom));
    opacity: 1;
    transition: opacity .35s ease;
}

@supports not (height: 100dvh) {
    .app {
        min-height: 100vh;
    }
}

.app.hidden {
    opacity: 0;
}

.container {
    /*max-width:var(--maxw);*/
    margin: 0 auto;
}

/* topbar */
.topbar {
    height: var(--toph);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar .title {
    font-weight: 700;
    font-size: 24px;
    letter-spacing: .2px;
}

.iconbtn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    display: grid;
    place-items: center;
    color: var(--text);
    cursor: pointer;
}

.iconbtn:active {
    background: rgba(255, 255, 255, .08);
}

/* tabs */
.tabs {
    height: var(--tabs);
    background: var(--panel);
    border-top: 1px solid rgba(0, 0, 0, .12);
    display: flex;
    align-items: flex-end;
    gap: 28px;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 19;
}

.tab {
    padding: 14px 0 12px;
    font-size: 18px;
    color: var(--muted);
    background: transparent;
    border: 0;
    position: relative;
    cursor: pointer;
}

.tab.active {
    color: var(--text);
    font-weight: 600;
}

.tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
}

.content {
    padding: 14px 14px 0;
}

/* grid / cards */
.grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 14px;
    align-items: stretch;
}

.card {
    background: transparent;
    display: grid;
    grid-template-rows:220px 92px;
    row-gap: 10px;
    height: 100%;
}

.player-wrapper {
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    overflow: hidden;
    position: relative;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #030c1d;
}

.player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
    background: #030c1d;
}

@media screen and (orientation: landscape) {
    .app {
        padding-bottom: 18vh;
    }

    .player-wrapper {
        position: relative;
        top: auto;

        height: 76vh;
        max-height: 76vh;

        width: 135.11vh;
        max-width: 100%;

        min-height: 0;
        padding-top: 0;

        margin-left: auto;
        margin-right: auto;

        border-radius: 0;
    }

    .player-wrapper iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
    }
}

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

.badge {
    position: absolute;
    left: 10px;
    top: 10px;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .18);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.meta {
    height: 92px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    padding: 18px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .8);
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    color: var(--muted);
    margin-top: 15px;
    text-shadow: 0 2px 6px rgba(47, 57, 65, .6),
    0 6px 18px rgba(47, 57, 65, .5);
}

.star {
    font-size: 18px;
}

.name {
    font-size: 20px;
    line-height: 1.15;
    max-height: 46px;
    overflow: hidden;
    word-break: break-word;
}

.rating-dual {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
    min-height: auto;
}

.rateItem {
    white-space: nowrap;
    padding-right: 10px;
}

.rateLabel {
    display: inline-block;
}

.rateValue,
.rateYear {
    color: rgba(255, 255, 255, .75);
}

.rateYear {
    font-size: 16px;
}

/* generic */
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 14px;
}

.sectionTitle {
    font-weight: 400;
    font-size: 20px;
    margin: 0;
}

.chev {
    font-size: 26px;
    color: var(--muted);
}

/* horizontal scroller */
.hscroll.grid.grid-2 {
    display: flex;
    gap: 12px;
    overflow: auto;
    scroll-snap-type: x mandatory;
    margin-bottom: 15px;
}

.hscroll::-webkit-scrollbar {
    height: 6px;
}

.hscroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
    border-radius: 6px;
}

.hscroll.grid.grid-2.watched .favorite-grid-item {
    max-width: 150px;
}

.mini {
    min-width: 132px;
    scroll-snap-align: start;
    display: grid;
    grid-template-rows:170px 84px;
    row-gap: 10px;
}

.mini .poster {
    height: 170px;
    border-radius: 16px;
}

.mini .meta {
    height: 84px;
}

.mini .name {
    font-size: 18px;
    max-height: 42px;
}

/* search */
.searchbar {
    background: var(--panel);
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.searchwrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 14px;
    padding: 10px 10px 10px 12px;
}

.searchwrap input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    outline: none;
    font-size: 16px;
}

.searchwrap input::placeholder {
    color: #fff;
}

.searchwrap .right {
    display: flex;
    gap: 8px;
    color: var(--muted);
}

.iconbtn .stop-rec {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.2);
    width: 34px;
    height: 34px;
    border-radius: 20px;
}

/* profile/list */
.list {
    padding: 0 14px;
}

.listhead {
    font-size: 22px;
    font-weight: 700;
    margin: 10px 0 14px;
}

.recent-grid {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 14px;
}

.recent-item {
    position: relative;
}

.recent-item .poster {
    height: 160px;
    border-radius: 16px;
}

.closex {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(0, 0, 0, .35);
    color: var(--text);
}

.profile-wrap {
    padding: 16px 14px;
}

.profile-title {
    font-size: 26px;
    font-weight: 800;
    margin: 10px 0 8px;
}

.profile-text {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.35;
}

.bigbtn {
    width: 100%;
    margin-top: 14px;
    padding: 16px 14px;
    border-radius: 16px;
    border: 0;
    background: var(--panel2);
    color: var(--text);
    font-size: 18px;
}

.promo {
    margin-top: 18px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(135deg, rgba(24, 160, 255, .25), rgba(0, 0, 0, 0));
}

.promo img {
    width: 100%;
    display: block;
}

.menu {
    margin-top: 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    overflow: hidden;
}

.menuitem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
}

.menuitem:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.menuitem .left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menuitem .miniico {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--muted);
}

/* bottom nav */
.bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1000;
    border-top: 1px solid rgba(0, 0, 0, .18);
    background: linear-gradient(
            180deg,
            rgba(10, 30, 60, .95) 0%,
            rgba(8, 25, 50, .98) 60%,
            rgba(5, 20, 45, 1) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .2),
    0 8px 30px rgba(0, 0, 0, .4),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.bottomnav .container {
    display: flex;
    justify-content: space-around;
    height: var(--navh);
    align-items: center;
}

.navitem {
    width: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
}

.navitem .ico {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    opacity: .95;
}

.navitem.active {
    color: var(--accent);
    font-weight: 600;
}

.navitem.active .ico {
    color: var(--accent);
}

.bottomnav-icons .navsvg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bottomnav-icons .navsvg polygon {
    fill: currentColor;
    stroke: none;
}

/* chips */
.chiprow {
    display: flex;
    gap: 14px;
    margin: 0 -14px;
    padding: 8px 14px 14px;
    position: sticky;
    top: var(--tabs);
    z-index: 18;
    background: var(--bg);
}

.chip {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .20);
    color: var(--text);
    cursor: pointer;
}

.chip:active {
    transform: translateY(1px);
    background: rgba(255, 255, 255, .10);
}

.chip.active {
    background: rgba(24, 160, 255, .18);
    border-color: rgba(24, 160, 255, .25);
}

.chipsvg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .95;
}

.modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    display: none;
    z-index: 60;
    align-items: stretch;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.modal .sheet {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 65px;
    max-width: var(--maxw);
    margin: 0 auto;
    background: #071730;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sheethead {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 0 0 auto;
}

.sheethead h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: .2px;
}

.sheethead .iconbtn {
    position: absolute;
    right: 10px;
    top: 10px;
}


.actions {
    padding: 12px;
    flex: 0 0 auto;
    background: #071730;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    bottom: 0;
    z-index: 2;
}

/* buttons */
.primary,
.secondary {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    outline: none;
    box-shadow: none;
}

.primary {
    background: var(--accent);
    color: #fff;
    border: 0;
}

.primary:active {
    opacity: .9;
    transform: translateY(1px);
}

.secondary {
    background: rgba(255, 255, 255, .08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, .12);
}

.secondary:active {
    opacity: .9;
    transform: translateY(1px);
}

.actions .primary,
.actions .secondary,
.primary.watch {
    width: 100%;
    display: block;
    border-radius: 16px;
    padding: 16px 14px;
    font-size: 18px;
    line-height: 1.2;
}

.primary.watch {
    margin-top: 20px;
}

/* facets */
.facetBlock {
    border-radius: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, .03);
}

.facetHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    margin-bottom: 10px;
}

.facetAll {
    background: transparent;
    border: 0;
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
}

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

.facetHint {
    color: var(--muted);
    font-size: 14px;
    padding: 6px 2px;
}

.facetChip {
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}

.facetChip:active {
    transform: translateY(1px);
}

.facetChip.active {
    background: rgba(24, 160, 255, .22);
    border-color: rgba(24, 160, 255, .55);
    color: #fff;
}

/* range */
.range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 24px;
    background: transparent;
    margin: 2px 0 0;
    outline: none;
}

.range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 0;
}

.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    border: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
    margin-top: -8px;
}

.range::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 0;
}

.range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    border: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}

.range::-moz-focus-outer {
    border: 0;
}

.range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 6px rgba(24, 160, 255, .18), 0 2px 8px rgba(0, 0, 0, .28);
}

.range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 6px rgba(24, 160, 255, .18), 0 2px 8px rgba(0, 0, 0, .28);
}

.compactGroup {
    margin-top: 10px;
}

.compactGroup:first-child {
    margin-top: 0;
}

.miniTitle {
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
}

.compactRangeBox {
    margin-top: 0;
    padding: 12px 12px 10px;
}

.compactRangeBox .rangeTop {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.rangeValue {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.compactFacet {
    margin-top: 12px;
}

/* sort modal */
#sortModal {
    z-index: 70;
}

#sortModal.open {
    display: block;
}

#sortModal .backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background: rgba(0, 0, 0, .12);
}

.sortDropdown {
    position: absolute;
    right: 14px;
    top: 108px;
    width: 220px;
    max-width: calc(100vw - 28px);
    background: #071730;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .32);
    overflow: hidden;
    z-index: 71;
    backdrop-filter: blur(10px);
}

.sortItem {
    width: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    padding: 14px 16px;
    padding-right: 40px;
    font-size: 16px;
    line-height: 1.2;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    transition: background .16s ease, color .16s ease;
    position: relative;
}

.sortItem:last-child {
    border-bottom: 0;
}

.sortItem.active {
    color: var(--accent);
    background: rgba(255, 255, 255, .04);
    font-weight: 600;
}

.sortItem.active::after {
    content: "✓";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--accent);
}

.sortItem:active {
    background: rgba(255, 255, 255, .08);
}

/* watched */
.grid.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
    gap: 15px;
    align-items: start;
}

.hscroll .favorite-grid-item {
    min-width: 145px;
}

.grid.grid-2 .poster {
}

.grid.grid-2 .card {
    grid-template-rows:160px auto;
}

.grid.grid-2 .meta {
    height: auto;
    min-height: 0;
}

.grid.grid-2 .name {
    font-size: 16px;
    max-height: 38px;
}

.watched-remove {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(0, 0, 0, .35);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.watched-remove:active {
    transform: translateY(1px);
}

.watched-compact {
    display: grid;
    grid-template-rows:160px auto;
    row-gap: 10px;
}

.watched-compact .meta {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    padding-bottom: 2px;
}

.watched-rating-line {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 16px;
    line-height: 1;
    white-space: nowrap;
    color: var(--muted);
}

.wr-label {
    color: var(--muted);
    font-weight: 600;
}

.wr-value {
    color: rgba(255, 255, 255, .75);
    font-size: 11px;
    line-height: 1;
}

.wr-dot {
    color: rgba(255, 255, 255, .5);
    padding: 0 1px;
    flex: 0 0 auto;
}

.wr-year {
    color: var(--muted);
}

.watched-name {
    font-size: 12px;
    line-height: 1.15;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.watched-year {
    font-size: 11px;
    line-height: 1;
    color: var(--muted);
}

.catalogLoader {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding: 16px 10px 8px;
}

.rate-source-icon {
    display: block;
    flex: 0 0 auto;
}

.kp-icon {
    height: 14px;
    fill: #fff;
    opacity: .75;
}

.imdb-icon {
    height: 12px;
    fill: #fff;
    opacity: .75;
}

/* hero */
.hero {
    position: relative;
    width: 100%;
    height: 521px;
    overflow: hidden;
    background: #030c1d;
}

.hero-bg {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to bottom,
            transparent 35%,
            rgba(3, 12, 29, .6) 55%,
            rgba(3, 12, 29, .85) 75%,
            rgba(3, 12, 29, .95) 90%,
            #030c1d 100%
    );
}

.hero-content {
    position: absolute;
    bottom: 20px;
    z-index: 2;
    color: #fff;
    padding: 0 20px;
    width: 100%;
}

.title {
    font-size: 36px;
    font-weight: 500;
    line-height: 34px;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(47, 57, 65, .6),
    0 6px 18px rgba(47, 57, 65, .5);
}

.subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, .9);
    margin-top: 5px;
    text-shadow: 0 2px 6px rgba(47, 57, 65, .6),
    0 6px 18px rgba(47, 57, 65, .5);
}

.hero .iconbtn {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
    color: #fff;
}

.hero .iconbtn.favorite-btn {
    right: 10px;
    left: auto;
    padding: 10px;
}

.favorite-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('icons/favorite.svg') no-repeat center/contain;
    /*filter: brightness(0) invert(1);*/
}

.favorite-btn[aria-pressed="true"] .favorite-icon,
.watched-remove .favorite-icon {
    background: url('icons/favorite-a.svg') no-repeat center/contain;
    /*filter: brightness(0) invert(1);*/
}

.hero .iconbtn .icon,
.iconbtn .icon-mic {
    fill: #fff;
}

/* details */
.details-card {
    margin-top: 14px;
    padding: 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    overflow: hidden;
}

.details-card.watched-wrap .row {
    padding-top: 0;
}

.details-card.watched-wrap .hscroll.grid.grid-2 {
    margin-bottom: 0;
}

.details-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.details-poster {
    width: 110px;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.details-poster-m {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, .06) url('img/no-poster.svg') no-repeat center / 100%;
}

.details-meta {
    min-width: 0;
    flex: 1;
}

.details-title {
    font-size: 24px;
    line-height: 1.15;
    font-weight: 800;
    color: #eef3f7;
    word-break: break-word;
}

.details-origin {
    margin-top: 8px;
    font-size: 15px;
    color: var(--muted);
    line-height: 1.4;
    word-break: break-word;
}

.details-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.details-row {
    font-size: 15px;
    line-height: 1.5;
    color: #d7dee5;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.details-row span:first-child {
    color: rgba(255, 255, 255, .75);
}

.details-divider {
    height: 1px;
    margin: 18px 0;
    background: rgba(255, 255, 255, .07);
}

.details-block {
    display: flex;
    flex-direction: column;
}

.details-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #eef3f7;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.details-toggle:active {
    opacity: .8;
}

.details-chevron {
    display: inline-block;
    font-size: 18px;
    color: var(--muted);
    transition: transform .28s ease;
    flex: 0 0 auto;
}

.details-collapsible {
    margin-top: 12px;
}

.details-card.open .details-chevron {
    transform: rotate(180deg);
}

.details-subtitle {
    font-size: 22px;
    line-height: 1.25;
    color: #eef3f7;
}

.details-text {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.5;
    color: #c7d0d8;
    word-break: break-word;
}

/* picker bar + modal */
.picker-bar {
    display: block;
    margin: 14px;
}

.picker-bar[hidden],
.picker-modal[hidden] {
    display: none !important;
}

.picker-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.picker-trigger:active {
    opacity: .85;
    transform: translateY(1px);
}

.picker-trigger-label {
    font-size: 18px;
}

.picker-trigger-value {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.picker-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.picker-trigger-value {
    font-weight: 600;
}

.picker-trigger span:last-child {
    margin-left: auto;
}

.select-arrow {
    width: 28px;
    height: 26px;
}

.select-arrow .icon {
    fill: #fff;
    transform: rotate(-90deg);
}

.picker-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 2000;
    display: block;
}

.picker-modal-backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
    .picker-modal-backdrop {
        background: rgba(0, 0, 0, .72);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.picker-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 18px 18px 0 0;
    background: #071730;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    overflow: hidden;
    transform: translate3d(0, 100%, 0);
    transition: transform .2s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

body.modal-open .picker-sheet {
    transform: translate3d(0, 0, 0);
}

.picker-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 12px;
}

.picker-sheet-title {
    font-size: 24px;
    font-weight: 800;
    color: #eef3f7;
}

.picker-sheet-body {
    padding: 0 16px 16px;
}

.picker-sheet-actions {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 10px;
    padding: 0 16px 16px;
}

.picker-sheet-actions .primary,
.picker-sheet-actions .secondary {
    min-height: 54px;
    border-radius: 14px;
}


body.modal-open .picker-sheet {
    transform: translateY(0);
}


/* wheel */
.wheel-wrap {
    position: relative;
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 14px;
    height: 240px;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid #030c1d;
}

.wheel-wrap::before,
.wheel-wrap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 2;
    pointer-events: none;
}

.wheel-wrap::before {
    top: 0;
    background: linear-gradient(to bottom, #030c1d 0%, rgba(11, 34, 68, 0) 100%);
}

.wheel-wrap::after {
    bottom: 0;
    background: linear-gradient(to top, #030c1d 0%, rgba(11, 34, 68, 0) 100%);
}

.wheel-col {
    position: relative;
    padding: 10px 0 0;
    min-width: 0;
}

.wheel-label {
    text-align: center;
    font-size: 16px;
    color: rgba(255, 255, 255, .8);
    position: relative;
    z-index: 4;
}

.wheel {
    height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 68px 0;
    position: relative;

    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}

.wheel::-webkit-scrollbar {
    display: none;
}

.wheel-item {
    height: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8b95;
    font-size: 20px;
    font-weight: 600;
    transition: transform .15s ease, color .15s ease, opacity .15s ease;
    opacity: .35;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    z-index: 1;
    transform: translateZ(0);
}

.wheel-item.active {
    color: #eef3f7;
    opacity: 1;
    font-weight: 500;
    transform: scale(1.03) translateZ(0);
    z-index: 4;
}

.wheel-highlight {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
    border-radius: 14px;
    border: 1px solid rgba(24, 160, 255, .38);
    background: rgba(24, 160, 255, .10);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03),
    0 0 0 1px rgba(24, 160, 255, .08);
    pointer-events: none;
    z-index: 3;
}

/* genres */
.genre-details {
    margin-top: 5px;
}

.genre-details .genre {
    font-size: 14px;
    padding: 5px 10px;
    margin: 6px 4px 0 0;
    text-transform: capitalize;
    display: inline-block;
    border-radius: 14px;
    background: rgba(158, 89, 242, .5);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
    color: rgba(255, 255, 255, .8);
}

.logo {
    text-align: center;
}

/* splash */
.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    background: radial-gradient(circle at center, #0b2244 0%, #071730 45%, #030c1d 100%);
    transition: opacity .45s ease, visibility .45s ease;
}

.splash.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(24, 160, 255, 0));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(24, 160, 255, .6));
    }
}

/* utility cards */
.catalog-grid {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.movie-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
}

.movie-title {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.movie-meta {
    margin-top: 4px;
    font-size: 12px;
    opacity: .7;
}

.mine-empty {
    grid-column: 1 / -1;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .8);
}

.mine-card-link {
    color: inherit;
    text-decoration: none;
}

.mine-poster {
    border-radius: 16px;
    overflow: hidden;
}

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

/* favorites */

.favorite-grid-item {

}

.favorite-grid-card {
    display: block;
    grid-template-rows:160px auto;
    row-gap: 10px;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.favorite-grid-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 0.7;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, .06) url('img/no-poster.svg') no-repeat center / 100%;
}

.favorite-grid-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

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

.favorite-grid-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow: hidden;
    padding: 7px 0 12px;
}

.favorite-grid-meta .watched-name {
    font-size: 16px;
    line-height: 1.25;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.favorite-grid-meta .watched-year {
    font-size: 12px;
    line-height: 1;
    color: rgba(255, 255, 255, .75);
}

.favorite-grid-card .watched-remove {
    position: absolute;
    right: 8px;
    top: 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}


/* watched strip */
.watched-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.watched-strip-card {
    flex: 0 0 100px;
    width: 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    scroll-snap-align: start;
}

.watched-strip-poster {
    position: relative;
    width: 100px;
    height: 140px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
}

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

.watched-strip-meta {
    width: 100px;
    min-height: 64px;
    padding: 4px 0 2px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.watched-strip .watched-remove {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(0, 0, 0, .35);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 18px;
}

.watched-strip::-webkit-scrollbar {
    height: 6px;
}

.watched-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
    border-radius: 6px;
}

/* franchise */
.franchise-section {
    overflow: hidden;
}

.franchise-section .details-subtitle {
    margin-bottom: 12px;
}

.franchise-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.franchise-row::-webkit-scrollbar {
    height: 6px;
}

.franchise-row::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .14);
    border-radius: 6px;
}

.franchise-card {
    display: block;
    flex: 0 0 110px;
    width: 110px;
    min-width: 110px;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
}

.franchise-poster {
    width: 110px;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
    position: relative;
}

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

.franchise-meta {
    width: 110px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.franchise-title {
    font-size: 12px;
    line-height: 1.2;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    min-height: 28px;
}

.franchise-year {
    font-size: 11px;
    line-height: 1;
    color: var(--muted);
}

/* mobile */
/*@media (max-width:640px){
    .details-card{
        padding:16px;
        border-radius:10px;
    }

    .details-top{
        gap:14px;
    }

    .details-poster{
        width:96px;
        height:140px;
        border-radius:14px;
    }

    .details-title{
        font-size:20px;
    }

    .details-origin{
        font-size:14px;
    }

    .details-row{
        font-size:14px;
        line-height:1.45;
    }

    .details-toggle,
    .details-subtitle{
        font-size:18px;
    }

    .details-text{
        font-size:15px;
        line-height:1.7;
    }

    .picker-trigger-value{
        font-size:16px;
    }

    .picker-sheet-title{
        font-size:18px;
    }

    .wheel-wrap{
        height:220px;
    }

    .wheel{
        height:160px;
        padding:58px 0;
    }

    .wheel-item{
        font-size:16px;
    }

    .wheel-highlight{
        height:44px;
    }
}*/

.m-t-10 {
    margin-top: 10px !important;
}

.sheetbody{
    padding:0 12px 12px;
    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
    flex:1 1 auto;
    min-height:0;
    touch-action:auto;
}

.dualRange{
    position:relative;
    height:30px;
    margin-top:6px;
    touch-action:none;
}

.dualRange .range{
    position:absolute;
    left:0;
    top:0;
    width:100%;
    margin:0;
    background:transparent;
    -webkit-appearance:none;
    appearance:none;
    pointer-events:none;
}

#kpMin,
#imdbMin,
#yearFrom{
    z-index:4;
}

#kpMax,
#imdbMax,
#yearTo{
    z-index:3;
}

.dualRange .range::-webkit-slider-thumb{
    -webkit-appearance:none;
    appearance:none;
    width:22px;
    height:22px;
    border-radius:50%;
    background:var(--accent);
    border:0;
    box-shadow:0 2px 8px rgba(0,0,0,.28);
    margin-top:-8px;

    pointer-events:auto;
    position:relative;
    cursor:pointer;
}

.dualRange .range::-moz-range-thumb{
    width:22px;
    height:22px;
    border-radius:50%;
    background:var(--accent);
    border:0;
    box-shadow:0 2px 8px rgba(0,0,0,.28);

    pointer-events:auto;
    position:relative;
    cursor:pointer;
}

.autoNext {
    background: var(--panel2);
    padding: 10px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.problem {
    background: #0b2244;
    padding: 10px 15px;
}

button.menuitem {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

button.menuitem .left {
    display: flex;
    align-items: center;
}

button.menuitem .chev {
    flex-shrink: 0;
}

.profile-wrap {
    padding-bottom: 120px;
    box-sizing: border-box;
}

.update-status {
    margin: 16px auto 0;
    padding: 10px 14px;
    width: fit-content;
    max-width: calc(100% - 32px);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.profile-version {
    color: var(--muted);
    text-align: center;
    margin: 24px 0 100px;
    font-size: 14px;
    line-height: 1.4;
}

.bottomnav .navitem {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.bottomnav .navitem:focus,
.bottomnav .navitem:focus-visible,
.bottomnav .navitem:active {
    outline: none;
    box-shadow: none;
    border-radius: 0;
}

.bottomnav .navitem {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

 .profile-update-loader {
     width: 22px;
     height: 22px;
     margin-left: auto;
     border: 3px solid rgba(255, 255, 255, .22);
     border-top-color: #fff;
     border-radius: 999px;
     animation: profileUpdateSpin .75s linear infinite;
     flex: 0 0 auto;
 }

.profile-update-loader[hidden] {
    display: none;
}

.menuitem.updating,
.menuitem.is-checking-update {
    opacity: .9;
    pointer-events: none;
}

.menuitem.updating .miniico svg,
.menuitem.is-checking-update .miniico svg {
    animation: profileUpdatePulse .9s ease-in-out infinite;
}

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

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

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