:root {
    --bg: #03050b;
    --bg-2: #05070f;
    --surface: #090d18;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-strong: rgba(11, 16, 31, 0.88);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #ffffff;
    --muted: #9ca3af;
    --muted-2: #697386;
    --blue: #1d7cff;
    --blue-2: #55b8ff;
    --red: #ff233f;
    --green: #3ddc84;
    --yellow: #f2c94c;
    --radius: 8px;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
    --header-height: 76px;
    --bottom-nav-height: 76px;
}

* {
    box-sizing: border-box;
}

[data-offline-ui] {
    display: none !important;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(180deg, rgba(8, 12, 24, 0.98) 0, var(--bg) 340px),
        var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: 0;
}

body.menu-lock {
    overflow: hidden;
}

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

button,
input,
textarea {
    font: inherit;
}

button {
    letter-spacing: 0;
}

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

video,
iframe,
canvas {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.page-shell {
    min-height: calc(100vh - 120px);
    padding: calc(var(--header-height) + 30px) 56px 76px;
}

.home-page .page-shell,
.watch-page .page-shell {
    padding-top: var(--header-height);
}

.site-header {
    position: fixed;
    z-index: 80;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    display: grid;
    grid-template-columns: auto minmax(450px, 1fr) minmax(300px, 520px) auto;
    align-items: center;
    gap: 22px;
    padding: 0 56px;
    background: rgba(3, 5, 11, 0.68);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(22px);
    transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.site-header.is-scrolled,
.site-header.nav-open {
    background: rgba(3, 5, 11, 0.94);
    border-color: var(--border);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
}

.brand-link,
.site-footer > div,
.mobile-menu-head {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 900;
}

.brand-word {
    font-size: 17px;
    line-height: 1;
}

.site-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: inline-block;
    object-fit: cover;
    border: 1px solid rgba(85, 184, 255, 0.72);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 26px rgba(29, 124, 255, 0.18);
}

.site-avatar.small {
    width: 25px;
    height: 25px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.mobile-menu-head {
    display: none;
}

.main-nav a {
    position: relative;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 760;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--blue-2);
    box-shadow: 0 0 14px rgba(85, 184, 255, 0.86);
    transform: translateX(-50%);
    transition: width 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--text);
}

.main-nav a.is-active::after,
.main-nav a:hover::after {
    width: 24px;
}

.header-search {
    position: relative;
    min-width: 0;
}

.header-search input,
.search-empty-panel input,
.premium-form input,
.premium-form textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    padding: 0 48px 0 18px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search input::placeholder,
.search-empty-panel input::placeholder,
.premium-form input::placeholder,
.premium-form textarea::placeholder {
    color: rgba(156, 163, 175, 0.76);
}

.premium-form textarea {
    min-height: 118px;
    resize: vertical;
    border-radius: var(--radius);
    padding: 14px 16px;
}

.header-search input:focus,
.search-empty-panel input:focus,
.premium-form input:focus,
.premium-form textarea:focus {
    border-color: rgba(85, 184, 255, 0.72);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(29, 124, 255, 0.16), 0 0 28px rgba(29, 124, 255, 0.12);
}

.search-submit {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 10px 26px rgba(29, 124, 255, 0.28);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(5, 8, 17, 0.98);
    box-shadow: var(--shadow);
}

.suggestion-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    transition: background 0.18s ease;
}

.suggestion-item:hover,
.suggestion-item.is-active {
    background: rgba(255, 255, 255, 0.07);
}

.suggestion-item img,
.suggestion-poster {
    width: 40px;
    height: 58px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--glass);
}

.suggestion-item strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-item span span {
    color: var(--muted);
    font-size: 12px;
}

.suggestion-item em {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(61, 220, 132, 0.16);
    color: #91f5bd;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 10px;
}

.icon-link,
.icon-button,
.favorite-button,
.hero-arrow,
.rail-arrow {
    position: relative;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.icon-link,
.icon-button,
.hero-arrow,
.rail-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.icon-link:hover,
.icon-button:hover,
.favorite-button:hover,
.hero-arrow:hover,
.rail-arrow:hover {
    transform: translateY(-1px);
    border-color: rgba(85, 184, 255, 0.46);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.menu-toggle,
.mobile-menu-scrim {
    display: none;
}

.menu-toggle .fa {
    font-size: 19px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.site-header.nav-open .menu-toggle {
    border-color: rgba(85, 184, 255, 0.55);
    background: rgba(85, 184, 255, 0.16);
    color: #cfe7ff;
}

.site-header.nav-open .menu-toggle .fa-bars::before {
    content: "\f00d";
}

.heart-icon {
    color: var(--red);
    font-size: 20px;
}

.counter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.notification-center {
    position: relative;
}

.notification-icon {
    font-size: 18px;
    line-height: 1;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 80;
    width: min(360px, calc(100vw - 28px));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(8, 12, 24, 0.98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.notification-dropdown[hidden] {
    display: none !important;
}

.notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.notification-head strong {
    font-size: 15px;
}

.notification-head button {
    border: 0;
    background: transparent;
    color: var(--blue-2);
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.notification-list {
    max-height: min(430px, 70vh);
    overflow-y: auto;
    padding: 6px;
}

.notification-item {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 14px;
    color: var(--text);
    transition: background 0.2s ease;
}

.notification-item:not(.is-read) {
    background: rgba(85, 184, 255, 0.1);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.notification-item-title,
.notification-item-body {
    min-width: 0;
    overflow-wrap: anywhere;
}

.notification-item-title {
    font-weight: 900;
}

.notification-item-body {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.notification-item time,
.notification-empty {
    color: var(--muted-2);
    font-size: 12px;
}

.notification-empty {
    margin: 0;
    padding: 18px 12px;
    text-align: center;
}

.profile-pill {
    min-height: 42px;
    max-width: 168px;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.profile-pill:hover {
    border-color: rgba(85, 184, 255, 0.44);
    background: rgba(255, 255, 255, 0.1);
}

.hero-carousel {
    position: relative;
    min-height: 660px;
    margin: 0 -56px 28px;
    overflow: hidden;
    background: var(--surface);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    padding: 126px 96px 92px;
    opacity: 0;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(3, 5, 11, 0.96) 0%, rgba(3, 5, 11, 0.66) 46%, rgba(3, 5, 11, 0.08) 100%),
        linear-gradient(180deg, rgba(3, 5, 11, 0.05) 0%, rgba(3, 5, 11, 0.86) 88%, var(--bg) 100%),
        var(--hero-image);
    background-position: center;
    background-size: cover;
    transform: scale(1.018);
    transition: opacity 0.55s ease, transform 1.05s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide.is-active .hero-copy {
    animation: heroContentIn 0.58s ease both;
}

.hero-empty {
    position: relative;
    min-height: inherit;
    background:
        linear-gradient(120deg, rgba(9, 13, 24, 1), rgba(3, 5, 11, 1) 62%),
        var(--surface);
}

.hero-copy {
    width: min(730px, 100%);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--blue-2);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-copy h1,
.watch-info h1,
.page-title h1,
.auth-visual h1,
.account-summary h1 {
    margin: 13px 0 0;
    color: #fff;
    font-size: 72px;
    line-height: 0.96;
    letter-spacing: 0;
}

.hero-copy p {
    width: min(620px, 100%);
    margin: 22px 0 0;
    color: #c9d1df;
    font-size: 17px;
    line-height: 1.64;
}

.hero-meta,
.watch-badges,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.hero-meta span:not(.rating-badge),
.watch-badges span:not(.rating-badge),
.watch-badges .watch-genre-link,
.chip-row span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #d9dfeb;
    font-size: 13px;
    font-weight: 760;
}

.rating-badge {
    min-width: 48px;
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 0 11px;
    border-radius: 999px;
    color: #031209;
    font-size: 13px;
    font-weight: 950;
}

.rating-high {
    background: var(--green);
}

.rating-mid {
    background: var(--yellow);
}

.rating-low {
    background: var(--red);
    color: #fff;
}

.rating-none {
    background: rgba(156, 163, 175, 0.32);
    color: #fff;
}

.hero-actions,
.watch-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: transparent;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.34), transparent 26%),
        linear-gradient(135deg, #ff2f5f 0%, #855df6 46%, #25a7ff 100%);
    background-clip: padding-box;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
    box-shadow:
        0 18px 42px rgba(29, 124, 255, 0.3),
        0 8px 22px rgba(255, 35, 63, 0.16);
}

.button-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 42%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.08));
    opacity: 0.72;
    pointer-events: none;
}

.button-primary:hover {
    border-color: transparent;
    box-shadow:
        0 22px 54px rgba(29, 124, 255, 0.38),
        0 10px 28px rgba(255, 35, 63, 0.22);
}

.button-primary:active {
    transform: translateY(0) scale(0.99);
}

.button-ghost,
.button-subtle {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
}

.button-ghost:hover,
.button-subtle:hover {
    border-color: rgba(85, 184, 255, 0.42);
    background: rgba(255, 255, 255, 0.1);
}

.button.full {
    width: 100%;
}

.play-dot {
    position: relative;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.play-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 52%;
    width: 0;
    height: 0;
    border-left: 10px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.24));
    transform: translate(-38%, -50%);
}

.hero-actions .button-primary,
.watch-actions .button-primary {
    min-height: 60px;
    gap: 14px;
    padding: 0 30px;
    font-size: 18px;
}

.watch-actions .button {
    min-height: 60px;
}

.watch-actions .watch-icon-button {
    width: 60px;
    min-width: 60px;
    height: 60px;
    min-height: 60px;
    padding: 0;
}

.watch-actions .watch-favorite-icon .favorite-icon {
    font-size: 27px;
}

.watch-actions .watch-icon-button .fa {
    color: #fff;
    font-size: 22px;
    line-height: 1;
}

.watched-button.is-active .fa-bookmark {
    color: var(--blue-2);
}

.favorite-button {
    border-radius: 999px;
}

.favorite-button.is-active {
    border-color: rgba(255, 35, 63, 0.58);
    background: rgba(255, 35, 63, 0.16);
}

.favorite-icon {
    color: var(--red);
    font-size: 18px;
    line-height: 1;
}

.hero-save {
    width: 60px;
    height: 60px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
}

.hero-save .favorite-icon {
    font-size: 22px;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: 72px;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 30px;
    background: var(--blue-2);
    box-shadow: 0 0 18px rgba(85, 184, 255, 0.5);
}

.quick-categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scrollbar-width: none;
}

.quick-categories::-webkit-scrollbar,
.media-rail::-webkit-scrollbar,
.genre-rail::-webkit-scrollbar {
    display: none;
}

.quick-categories a {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 17px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: #e7ebf5;
    font-weight: 850;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.quick-categories a span {
    color: var(--blue-2);
    text-shadow: 0 0 18px rgba(85, 184, 255, 0.62);
}

.quick-categories a.is-active span,
.quick-categories a:hover span {
    color: var(--red);
    text-shadow: 0 0 18px rgba(255, 35, 63, 0.56);
}

.quick-categories a:hover,
.quick-categories a.is-active {
    transform: translateY(-1px);
    border-color: rgba(85, 184, 255, 0.34);
    background: rgba(255, 255, 255, 0.085);
}

.quick-categories.inline {
    margin-top: 20px;
    padding-bottom: 0;
}

.section-block {
    margin-top: 46px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.episode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
    background: rgba(255, 255, 255, 0.05);
    color: var(--text, #fff);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.episode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
}

.episode-toggle .fa {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.episode-toggle.is-open .fa {
    transform: rotate(180deg);
}

.section-heading h2,
.page-title h1,
.form-heading h2 {
    margin: 6px 0 0;
    color: var(--text);
    font-size: 34px;
    line-height: 1.08;
    letter-spacing: 0;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-link,
.section-heading > a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--blue-2);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.rail-arrow {
    width: 38px;
    height: 38px;
    font-size: 23px;
}

.genre-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 320px;
    gap: 14px;
    overflow-x: auto;
    padding: 2px 2px 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.genre-card {
    position: relative;
    min-height: 142px;
    overflow: hidden;
    display: flex;
    align-items: end;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.052);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.24);
    scroll-snap-align: start;
    transform: translateZ(0);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.genre-card:hover {
    transform: translateY(-5px);
    border-color: rgba(85, 184, 255, 0.42);
    background: rgba(255, 255, 255, 0.078);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34), 0 0 28px rgba(29, 124, 255, 0.11);
}

.genre-poster-stack {
    position: absolute;
    inset: 10px 8px 10px auto;
    width: 190px;
}

.genre-poster-stack img,
.genre-poster-stack span {
    position: absolute;
    top: 4px;
    width: 78px;
    height: 118px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 7px;
    object-fit: cover;
    background:
        linear-gradient(145deg, rgba(29, 124, 255, 0.28), rgba(255, 35, 63, 0.16)),
        rgba(255, 255, 255, 0.07);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
    transition: transform 0.24s ease;
}

.genre-poster-stack img:nth-child(1),
.genre-poster-stack span:nth-child(1) {
    right: 92px;
    transform: rotate(-8deg);
}

.genre-poster-stack img:nth-child(2),
.genre-poster-stack span:nth-child(2) {
    right: 52px;
    transform: rotate(4deg);
}

.genre-poster-stack img:nth-child(3),
.genre-poster-stack span:nth-child(3) {
    right: 10px;
    transform: rotate(10deg);
}

.genre-card:hover .genre-poster-stack img:nth-child(1),
.genre-card:hover .genre-poster-stack span:nth-child(1) {
    transform: translateX(-5px) rotate(-11deg);
}

.genre-card:hover .genre-poster-stack img:nth-child(2),
.genre-card:hover .genre-poster-stack span:nth-child(2) {
    transform: translateY(-3px) rotate(2deg);
}

.genre-card:hover .genre-poster-stack img:nth-child(3),
.genre-card:hover .genre-poster-stack span:nth-child(3) {
    transform: translateX(5px) rotate(13deg);
}

.genre-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 5, 11, 0.92) 0%, rgba(3, 5, 11, 0.58) 48%, rgba(3, 5, 11, 0.22) 100%),
        linear-gradient(0deg, rgba(3, 5, 11, 0.72), rgba(3, 5, 11, 0));
}

.genre-name {
    position: relative;
    z-index: 2;
    max-width: 190px;
    color: #fff;
    font-size: 27px;
    font-weight: 950;
    line-height: 1;
}

.media-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 176px;
    gap: 16px;
    overflow-x: auto;
    padding: 2px 2px 18px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.media-grid.compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.media-card {
    position: relative;
    min-width: 0;
    scroll-snap-align: start;
}

.media-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
    transform: translateZ(0);
}

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

.media-card:hover .media-poster img {
    transform: scale(1.055);
    filter: brightness(1.08);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 5, 11, 0) 48%, rgba(3, 5, 11, 0.86) 100%);
}

.media-poster .rating-badge {
    position: absolute;
    left: 9px;
    bottom: 9px;
    min-width: 44px;
    min-height: 28px;
    font-size: 12px;
}

.media-type-badge {
    position: absolute;
    left: 9px;
    top: 9px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(3, 5, 11, 0.56);
    color: #dfe6f2;
    font-size: 11px;
    font-weight: 850;
    backdrop-filter: blur(10px);
}

.card-favorite {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 3;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(3, 5, 11, 0.58);
    backdrop-filter: blur(12px);
}

.media-card-body {
    min-height: 62px;
    padding: 11px 3px 0;
}

.media-title {
    display: -webkit-box;
    min-height: 40px;
    overflow: hidden;
    color: #fff;
    font-weight: 850;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.media-meta {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.poster-empty,
.suggestion-poster {
    display: block;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(145deg, rgba(29, 124, 255, 0.32), rgba(255, 35, 63, 0.18)),
        rgba(255, 255, 255, 0.06);
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.075);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.3s infinite;
}

.skeleton-line {
    display: block;
    width: 70%;
    height: 12px;
    margin: 11px 4px 0;
    border-radius: 999px;
}

.skeleton-line.wide {
    width: 88%;
}

.watch-hero {
    position: relative;
    min-height: 660px;
    display: grid;
    grid-template-columns: 300px minmax(0, 790px);
    align-items: end;
    gap: 48px;
    margin: 0 -56px 38px;
    padding: 126px 84px 74px;
    background-image:
        linear-gradient(90deg, rgba(3, 5, 11, 0.98) 0%, rgba(3, 5, 11, 0.72) 52%, rgba(3, 5, 11, 0.16) 100%),
        linear-gradient(180deg, rgba(3, 5, 11, 0.04) 0%, var(--bg) 100%),
        var(--watch-backdrop);
    background-position: center;
    background-size: cover;
}

.watch-poster {
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--glass);
    box-shadow: var(--shadow);
}

.watch-poster img,
.watch-poster .poster-empty {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.watch-info h1 {
    font-size: 60px;
}

.original-title {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.watch-description {
    max-width: 790px;
    margin: 23px 0 0;
    color: #c9d1df;
    font-size: 17px;
    line-height: 1.7;
}

.player-section {
    margin-top: 42px;
}

.player-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
}

.player-tabs button {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 900;
    white-space: nowrap;
    transition: background-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.player-tabs button.is-active {
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    box-shadow: 0 10px 26px rgba(29, 124, 255, 0.26);
}

.player-frame {
    width: min(1120px, 100%);
    aspect-ratio: 16 / 9;
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #000;
    box-shadow: var(--shadow);
}

.player-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #fff;
}

.player-placeholder strong {
    font-size: 40px;
}

.player-placeholder span {
    color: var(--muted);
}

.watch-hero-premium {
    background-image:
        linear-gradient(90deg, rgba(3, 5, 11, 0.98) 0%, rgba(3, 5, 11, 0.78) 44%, rgba(3, 5, 11, 0.34) 76%, rgba(3, 5, 11, 0.9) 100%),
        linear-gradient(180deg, rgba(3, 5, 11, 0.04) 0%, rgba(3, 5, 11, 0.68) 68%, var(--bg) 100%),
        var(--watch-backdrop);
}

.section-subtitle {
    max-width: 740px;
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.watch-error {
    width: min(760px, 100%);
    min-height: 520px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    margin: 46px auto;
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(29, 124, 255, 0.15), rgba(255, 35, 63, 0.08)),
        var(--glass);
    box-shadow: var(--shadow);
    text-align: center;
}

.watch-error h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1;
}

.watch-error p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
}

.player-card {
    width: min(1120px, 100%);
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
}

.player-card .player-tabs {
    margin: 0 0 10px;
}

.player-frame {
    position: relative;
}

.player-frame.is-active {
    animation: playerIn 0.34s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.player-skeleton {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.055), transparent),
        #000;
    animation: playerSkeleton 1.5s ease infinite;
}

.player-frame:not(.is-active) .player-skeleton {
    opacity: 0;
}

.player-frame.has-placeholder.is-active .player-skeleton {
    opacity: 0.18;
}

.player-frame.is-loading .player-skeleton {
    opacity: 0.28;
}

.player-frame.is-loading .player-placeholder span {
    color: var(--blue-2);
}

.player-embed,
.player-embed iframe,
.player-embed video,
.player-embed object,
.player-embed embed {
    width: 100%;
    height: 100%;
}

.player-embed iframe,
.player-embed video,
.player-embed object,
.player-embed embed {
    display: block;
    border: 0;
}

.season-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 16px;
    scrollbar-width: none;
}

.season-pills::-webkit-scrollbar {
    display: none;
}

.season-pills a {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: #dfe6f2;
    font-weight: 900;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.season-pills a:hover,
.season-pills a.is-active {
    transform: translateY(-1px);
    border-color: rgba(85, 184, 255, 0.46);
    background: rgba(29, 124, 255, 0.18);
    color: #fff;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.episode-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 154px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.052);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.episode-card:hover,
.episode-card.is-active {
    transform: translateY(-2px);
    border-color: rgba(85, 184, 255, 0.42);
    background: rgba(255, 255, 255, 0.078);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.episode-card.is-active {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(29, 124, 255, 0.18) inset;
}

.episode-still {
    position: relative;
    display: block;
    min-height: 154px;
    background: rgba(255, 255, 255, 0.06);
}

.episode-still img,
.episode-still .poster-empty {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-still::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(3, 5, 11, 0.72) 100%);
}

.episode-number {
    position: absolute;
    z-index: 2;
    left: 10px;
    bottom: 10px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(3, 5, 11, 0.68);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.episode-body {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 14px;
}

.episode-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.episode-card h3 {
    margin: 0;
    color: #fff;
    font-size: 17px;
    line-height: 1.25;
}

.episode-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.episode-date {
    color: var(--blue-2) !important;
    font-weight: 850;
}

.episode-watch {
    width: max-content;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(29, 124, 255, 0.16);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.cast-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 138px;
    gap: 14px;
    overflow-x: auto;
    padding: 2px 2px 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.cast-rail::-webkit-scrollbar {
    display: none;
}

.cast-card {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.052);
    scroll-snap-align: start;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.cast-card:hover {
    transform: translateY(-3px);
    border-color: rgba(85, 184, 255, 0.38);
    background: rgba(255, 255, 255, 0.078);
}

.cast-card img,
.cast-photo-placeholder {
    width: 100%;
    aspect-ratio: 2 / 2.55;
    display: block;
    border-radius: 7px;
    object-fit: cover;
    background:
        linear-gradient(145deg, rgba(29, 124, 255, 0.28), rgba(255, 35, 63, 0.15)),
        rgba(255, 255, 255, 0.06);
}

.cast-card strong {
    display: block;
    overflow: hidden;
    margin-top: 10px;
    color: #fff;
    font-size: 14px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cast-card span {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.details-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--border);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.details-item {
    min-height: 92px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.052);
}

.details-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.details-item strong {
    color: #fff;
    font-size: 15px;
    line-height: 1.35;
}

.toast-stack {
    position: fixed;
    z-index: 120;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.toast {
    max-width: min(380px, calc(100vw - 36px));
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(5, 8, 17, 0.92);
    color: #fff;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    animation: toastIn 0.24s ease both;
}

.toast.is-hiding {
    animation: toastOut 0.18s ease both;
}

.pwa-install-banner {
    position: fixed;
    z-index: 210;
    right: 18px;
    bottom: 18px;
    width: min(420px, calc(100vw - 36px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 34px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(8, 12, 24, 0.94);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 0 34px rgba(85, 184, 255, 0.12);
    backdrop-filter: blur(18px);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.pwa-install-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pwa-install-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.pwa-install-copy strong {
    color: #fff;
    font-size: 15px;
    line-height: 1.2;
}

.pwa-install-copy span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
}

.pwa-install-action {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(100deg, var(--red), #7b5cff 48%, var(--blue-2));
    color: #fff;
    cursor: pointer;
    font-weight: 950;
    box-shadow: 0 12px 26px rgba(56, 182, 255, 0.22);
}

.pwa-install-close,
.pwa-install-modal-close {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.pwa-install-modal {
    position: fixed;
    z-index: 230;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
}

.pwa-install-modal-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.74);
}

.pwa-install-modal-panel {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(85, 184, 255, 0.14), transparent 42%),
        rgba(8, 12, 24, 0.97);
    box-shadow: var(--shadow);
    text-align: center;
}

.pwa-install-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.pwa-install-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(85, 184, 255, 0.34);
    border-radius: 18px;
    background: rgba(85, 184, 255, 0.1);
    color: var(--blue-2);
    font-size: 28px;
    box-shadow: 0 0 34px rgba(85, 184, 255, 0.18);
}

.pwa-install-modal-panel h2 {
    margin: 0;
    color: #fff;
    font-size: 30px;
    line-height: 1;
}

.pwa-install-modal-panel p {
    margin: 0;
    color: #b7c1d1;
    font-size: 16px;
    line-height: 1.55;
}

@keyframes playerIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes playerSkeleton {
    to {
        background-position: 220% 0;
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

.page-title {
    display: block;
    margin: 22px 0 28px;
}

.page-title h1 {
    font-size: 44px;
}

.page-title p {
    margin: 12px 0 0;
    color: var(--muted);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 34px;
}

.pagination a,
.pagination span {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.breadcrumbs a {
    color: #c9d1df;
}

.breadcrumbs a:hover {
    color: var(--blue);
}

.catalog-hero {
    min-height: 246px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(29, 124, 255, 0.18), rgba(255, 35, 63, 0.08) 52%, rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.045);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.catalog-hero h1 {
    max-width: 820px;
    margin: 8px 0 0;
    color: #fff;
    font-size: 54px;
    line-height: 1;
    letter-spacing: 0;
}

.catalog-hero p {
    max-width: 680px;
    margin: 14px 0 0;
    color: #c9d1df;
    line-height: 1.6;
}

.search-hero {
    min-height: 220px;
}

.catalog-switcher {
    margin-top: 18px;
}

.genre-pills {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    margin: 18px -4px 0;
    padding: 4px 4px 12px;
    scrollbar-width: none;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.genre-pills.is-dragging {
    cursor: grabbing;
}

.genre-pills.is-dragging a {
    pointer-events: none;
}

.genre-pills::-webkit-scrollbar {
    display: none;
}

.genre-pills a {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: #dce3ee;
    font-size: 13px;
    font-weight: 850;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.genre-pills a:hover,
.genre-pills a.is-active {
    transform: translateY(-1px);
    border-color: rgba(85, 184, 255, 0.42);
    background: rgba(29, 124, 255, 0.16);
    color: #fff;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    margin-top: 20px;
}

.catalog-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 18px);
}

.catalog-filters {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.052);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.filter-sheet-head {
    display: none;
}

.catalog-filters label,
.search-panel label {
    display: grid;
    gap: 8px;
}

.catalog-filters label span {
    color: #dce3ee;
    font-size: 13px;
    font-weight: 850;
}

.catalog-filters select,
.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 0 13px;
}

.catalog-filters select:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(85, 184, 255, 0.54);
    box-shadow: 0 0 0 4px rgba(29, 124, 255, 0.13);
}

.catalog-filters option,
.search-panel option {
    background: #0b1020;
    color: #fff;
}

.filter-actions {
    display: grid;
    gap: 10px;
    margin-top: 2px;
}

.filter-open-button,
.filter-scrim {
    display: none;
}

.catalog-results {
    min-width: 0;
}

.catalog-results.standalone {
    margin-top: 30px;
}

.catalog-results-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.catalog-results-head h2 {
    margin: 5px 0 0;
    color: #fff;
    font-size: 30px;
    line-height: 1.08;
}

.catalog-results-head > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.catalog-grid {
    align-items: start;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.js .load-more-fallback {
    display: none;
}

.button.is-loading {
    opacity: 0.78;
    pointer-events: none;
}

.search-panel {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.052);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

.search-panel form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px auto;
    gap: 12px;
}

.search-panel .button {
    min-width: 136px;
}

.search-hero-premium {
    min-height: 250px;
    display: flex;
    align-items: end;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 18% 18%, rgba(85, 184, 255, 0.2), transparent 32%),
        linear-gradient(135deg, rgba(29, 124, 255, 0.16), rgba(255, 35, 63, 0.08) 58%, rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.045);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.search-hero-premium h1 {
    max-width: 860px;
    margin: 8px 0 0;
    color: #fff;
    font-size: 54px;
    line-height: 1;
}

.search-hero-premium p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #c9d1df;
    line-height: 1.6;
}

.premium-search-panel {
    margin-top: 20px;
}

.premium-search-panel input[type="search"] {
    min-height: 54px;
    border-radius: 999px;
    padding: 0 18px;
    font-size: 16px;
}

.search-tabs,
.search-filter-bar form {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    margin-top: 16px;
    scrollbar-width: none;
}

.search-tabs::-webkit-scrollbar,
.search-filter-bar form::-webkit-scrollbar {
    display: none;
}

.search-tabs a,
.search-check {
    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.052);
    color: #dce3ee;
    font-size: 13px;
    font-weight: 900;
}

.search-tabs a:hover,
.search-tabs a.is-active {
    border-color: rgba(85, 184, 255, 0.46);
    background: rgba(29, 124, 255, 0.18);
    color: #fff;
}

.search-filter-bar {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.search-filter-bar input,
.search-filter-bar select {
    min-height: 40px;
    min-width: 130px;
    border: 1px solid var(--border);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 0 13px;
}

.search-filter-bar option {
    background: #0b1020;
    color: #fff;
}

.search-check input {
    accent-color: var(--blue-2);
}

.search-result-card mark {
    border-radius: 4px;
    background: rgba(85, 184, 255, 0.24);
    color: #fff;
    padding: 0 2px;
}

.available-badge {
    position: absolute;
    right: 9px;
    bottom: 9px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(61, 220, 132, 0.18);
    color: #91f5bd;
    font-size: 11px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.search-correction {
    margin: 8px 0 0;
    color: var(--muted);
}

.search-correction a {
    color: var(--blue-2);
    font-weight: 900;
}

.search-empty-state .quick-categories {
    justify-content: center;
}

.mobile-bottom-nav {
    display: none;
}

.account-page {
    background:
        linear-gradient(180deg, rgba(8, 12, 24, 0.98) 0, var(--bg) 420px),
        var(--bg);
}

.account-shell {
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.account-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.052);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

.account-mini-profile {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.account-mini-profile strong,
.account-mini-profile span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-mini-profile strong {
    color: #fff;
}

.account-mini-profile span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.account-avatar-letter {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.34), transparent 28%),
        linear-gradient(135deg, var(--avatar-color), rgba(3, 5, 11, 0.42));
    color: #fff;
    font-size: 24px;
    font-weight: 950;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28), 0 0 30px color-mix(in srgb, var(--avatar-color), transparent 70%);
}

.account-avatar-letter.large {
    width: 88px;
    height: 88px;
    font-size: 40px;
}

.account-avatar-letter.small {
    width: 46px;
    height: 46px;
    font-size: 20px;
}

.account-avatar-letter.has-photo {
    display: inline-block;
    object-fit: cover;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
}

.account-nav {
    display: grid;
    gap: 6px;
}

.account-nav a,
.account-logout-form button {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 850;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.account-nav a:hover,
.account-nav a.is-active {
    transform: translateX(2px);
    border-color: rgba(85, 184, 255, 0.28);
    background: rgba(29, 124, 255, 0.14);
    color: #fff;
}

.account-logout-form {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.account-logout-form button {
    width: 100%;
    color: #ffb5c0;
}

.account-content {
    min-width: 0;
    display: grid;
    gap: 22px;
}

.account-hero-card,
.account-page-head,
.account-section,
.account-form-card,
.danger-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.052);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

.account-hero-card {
    display: grid;
    gap: 24px;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(29, 124, 255, 0.2), rgba(255, 35, 63, 0.08) 52%, rgba(255, 255, 255, 0.04)),
        rgba(255, 255, 255, 0.052);
}

.account-hero-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.account-hero-main h1,
.account-page-head h1 {
    margin: 7px 0 0;
    color: #fff;
    font-size: 44px;
    line-height: 1.04;
}

.account-hero-main p,
.account-page-head p,
.settings-shortcut p,
.danger-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.58;
}

.account-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.account-badges span,
.account-badges a,
.library-type,
.form-info {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #dce3ee;
    font-size: 12px;
    font-weight: 850;
}

.account-badges .is-good {
    border-color: rgba(61, 220, 132, 0.36);
    background: rgba(61, 220, 132, 0.13);
    color: #8af0b3;
}

.account-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.account-stat-grid a {
    min-height: 92px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(3, 5, 11, 0.34);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.account-stat-grid a:hover {
    transform: translateY(-2px);
    border-color: rgba(85, 184, 255, 0.38);
    background: rgba(29, 124, 255, 0.12);
}

.account-stat-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.account-stat-grid strong {
    color: #fff;
    font-size: 32px;
    line-height: 1;
}

.account-page-head {
    padding: 28px;
}

.account-page-head.with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.account-section {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.account-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.account-section-head h2,
.danger-card h2 {
    margin: 5px 0 0;
    color: #fff;
    font-size: 28px;
}

.account-section-head > a {
    color: var(--blue-2);
    font-weight: 900;
    white-space: nowrap;
}

.settings-shortcut {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.account-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 6px;
    scrollbar-width: none;
}

.account-tabs::-webkit-scrollbar {
    display: none;
}

.account-tabs a {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: #dce3ee;
    font-weight: 850;
}

.account-tabs a span {
    min-width: 24px;
    min-height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--muted);
    font-size: 12px;
}

.account-tabs a.is-active {
    border-color: rgba(85, 184, 255, 0.42);
    background: rgba(29, 124, 255, 0.18);
    color: #fff;
}

.account-media-grid {
    margin-top: 8px;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.library-grid.preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.library-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.052);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.library-card:hover {
    transform: translateY(-2px);
    border-color: rgba(85, 184, 255, 0.34);
    background: rgba(255, 255, 255, 0.078);
}

.library-poster {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
}

.library-poster img,
.library-poster .poster-empty {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
}

.library-card-body {
    min-width: 0;
    display: grid;
    align-content: space-between;
    gap: 12px;
}

.library-card h3 {
    margin: 9px 0 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.24;
}

.library-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.library-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.library-actions .button {
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
}

.progress-block {
    display: grid;
    gap: 7px;
}

.progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.progress-track span {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--blue-2));
}

.progress-block small {
    color: var(--muted);
    font-size: 12px;
}

.account-empty {
    width: 100%;
    min-height: 230px;
    margin: 0;
}

.empty-orb {
    width: 54px;
    height: 54px;
    display: inline-grid;
    border: 1px solid rgba(85, 184, 255, 0.34);
    border-radius: 999px;
    background:
        radial-gradient(circle at 52% 48%, rgba(85, 184, 255, 0.55), transparent 18%),
        rgba(29, 124, 255, 0.12);
    box-shadow: 0 0 34px rgba(29, 124, 255, 0.2);
}

.account-form-card {
    padding: 24px;
}

.form-info {
    border-radius: var(--radius);
    justify-content: flex-start;
}

.form-info a {
    color: var(--blue-2);
    font-weight: 900;
}

.avatar-swatches {
    display: grid;
    gap: 10px;
}

.avatar-upload-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
}

.avatar-upload-panel > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-upload-panel strong,
.avatar-upload-panel small {
    display: block;
}

.avatar-upload-panel small {
    margin-top: 4px;
    color: var(--muted);
}

.avatar-upload-panel input[type="file"] {
    min-height: 46px;
    padding: 10px 12px;
    cursor: pointer;
}

.avatar-swatches > span {
    color: #dce3ee;
    font-size: 14px;
    font-weight: 850;
}

.avatar-swatches > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.avatar-swatches label {
    position: relative;
    display: inline-grid;
}

.avatar-swatches input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.avatar-swatches label > span {
    width: 38px;
    height: 38px;
    display: block;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--avatar-color);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.avatar-swatches input:checked + span {
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(85, 184, 255, 0.22), 0 10px 24px rgba(0, 0, 0, 0.24);
}

.danger-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border-color: rgba(255, 35, 63, 0.24);
}

.button.danger,
.danger-card .button {
    border-color: rgba(255, 35, 63, 0.34);
    color: #ffb5c0;
}

.watched-button.is-active {
    border-color: rgba(61, 220, 132, 0.42);
    background: rgba(61, 220, 132, 0.14);
    color: #bff8d3;
}

.auth-page {
    background:
        linear-gradient(180deg, rgba(9, 13, 24, 0.98), var(--bg)),
        var(--bg);
}

.auth-page .page-shell {
    position: relative;
    z-index: 1;
}

.auth-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg);
}

.auth-backdrop__grid {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: flex-start;
    width: max(150vw, 1200px);
    transform: translate(-50%, -50%) rotate(-13deg) scale(1.28);
    transform-origin: center;
    filter: blur(3px) saturate(1.05);
    opacity: 0.5;
}

.auth-backdrop__col {
    flex: 0 0 auto;
    width: clamp(112px, 13.5vw, 184px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: auth-drift var(--drift-duration, 70s) linear infinite;
    will-change: transform;
}

.auth-backdrop__poster {
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

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

.auth-backdrop__veil {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 30% 20%, rgba(29, 124, 255, 0.12), transparent 60%),
        radial-gradient(120% 100% at 80% 90%, rgba(255, 35, 63, 0.1), transparent 55%),
        linear-gradient(180deg, rgba(3, 5, 11, 0.78), rgba(3, 5, 11, 0.62) 45%, rgba(3, 5, 11, 0.82));
    backdrop-filter: blur(1.5px);
}

@keyframes auth-drift {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-backdrop__col {
        animation: none;
    }
}

.auth-layout,
.account-layout {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(380px, 1fr);
    gap: 24px;
    margin: 52px auto 0;
}

.auth-layout.compact {
    width: min(780px, 100%);
    grid-template-columns: 1fr;
}

.auth-visual,
.account-summary,
.premium-form,
.search-empty-panel,
.setup-notice,
.empty-state {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--glass);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
}

.auth-visual,
.account-summary {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 38px;
    background:
        linear-gradient(145deg, rgba(29, 124, 255, 0.17), rgba(255, 35, 63, 0.08)),
        rgba(255, 255, 255, 0.052);
}

.auth-logo,
.account-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
}

.auth-visual h1,
.account-summary h1 {
    font-size: 48px;
}

.auth-visual p,
.account-summary p,
.form-note,
.setup-notice p,
.empty-state p {
    color: var(--muted);
    line-height: 1.62;
}

.premium-form {
    display: grid;
    gap: 16px;
    padding: 32px;
}

.premium-form label {
    display: grid;
    gap: 8px;
}

.premium-form label span {
    color: #dce3ee;
    font-size: 14px;
    font-weight: 850;
}

.form-error {
    padding: 12px 14px;
    border: 1px solid rgba(255, 35, 63, 0.34);
    border-radius: var(--radius);
    background: rgba(255, 35, 63, 0.11);
    color: #ffd7dd;
}

.form-success,
.form-info-inline {
    padding: 12px 14px;
    border: 1px solid rgba(61, 220, 132, 0.34);
    border-radius: var(--radius);
    background: rgba(61, 220, 132, 0.11);
    color: #c7f8d8;
}

.flash-warning {
    border-color: rgba(242, 201, 76, 0.46);
}

.flash-info {
    border-color: rgba(85, 184, 255, 0.42);
}

.form-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.form-check {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.form-check input {
    width: auto;
    min-height: 0;
}

.code-input {
    text-align: center;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 8px;
}

.form-note {
    margin: 0;
    text-align: center;
}

.form-note a,
.resend-form button {
    color: var(--blue-2);
    font-weight: 900;
}

.resend-form {
    text-align: center;
}

.resend-form button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.account-layout {
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
}

.account-summary {
    position: sticky;
    top: 96px;
    min-height: 0;
    gap: 14px;
}

.account-forms {
    display: grid;
    gap: 18px;
}

.search-empty-panel {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 24px;
}

.search-empty-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.setup-notice {
    margin: 26px 0;
    padding: 24px;
}

.setup-notice h1 {
    margin: 7px 0 8px;
}

.empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    gap: 12px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.empty-state h2 {
    margin: 0;
    color: var(--text);
}

.empty-state.wide {
    width: min(900px, 100%);
    margin: 48px auto;
}

.flash-stack {
    position: fixed;
    z-index: 100;
    top: calc(var(--header-height) + 16px);
    right: 18px;
    display: grid;
    gap: 10px;
}

.flash {
    max-width: min(420px, calc(100vw - 36px));
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(5, 8, 17, 0.96);
    box-shadow: var(--shadow);
}

.flash-success {
    border-color: rgba(61, 220, 132, 0.42);
}

.flash-error {
    border-color: rgba(255, 35, 63, 0.42);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 56px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
}

.site-footer-brand {
    min-width: 0;
}

.site-footer-contacts {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
}

.site-footer-contacts span {
    color: var(--muted-2);
}

.site-footer-contacts a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: #dce3ee;
}

.site-footer-contacts a:hover {
    border-color: rgba(85, 184, 255, 0.42);
    background: rgba(29, 124, 255, 0.14);
    color: #fff;
}

.site-footer p {
    margin: 0;
    font-size: 13px;
}

.geo-gate {
    position: fixed;
    z-index: 999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    background: linear-gradient(135deg, rgba(3, 5, 11, 0.99), rgba(7, 14, 29, 0.99));
}

.geo-gate-inner {
    width: min(680px, 100%);
    text-align: center;
    animation: gateIn 0.45s ease both;
}

.geo-logo {
    width: 70px;
    height: 70px;
    margin-bottom: 28px;
}

.geo-gate h1 {
    margin: 0;
    font-size: 58px;
    line-height: 1;
}

.geo-gate p {
    max-width: 560px;
    margin: 20px auto 0;
    color: #c3ccdc;
    font-size: 18px;
    line-height: 1.65;
}

.reveal,
.reveal-section {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.52s ease, transform 0.52s ease;
}

.reveal.is-visible,
.reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes heroContentIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    to {
        transform: translateX(100%);
    }
}

@keyframes gateIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1380px) {
    .site-header {
        grid-template-columns: auto minmax(390px, 1fr) minmax(260px, 420px) auto;
        gap: 16px;
        padding: 0 34px;
    }

    .page-shell {
        padding-left: 34px;
        padding-right: 34px;
    }

    .hero-carousel,
    .watch-hero {
        margin-left: -34px;
        margin-right: -34px;
    }

    .hero-slide {
        padding-left: 72px;
    }

    .media-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .site-footer {
        padding-left: 34px;
        padding-right: 34px;
    }
}

@media (max-width: 1120px) {
    .site-header {
        grid-template-columns: auto minmax(320px, 1fr) minmax(220px, 360px) auto;
    }

    .main-nav {
        gap: 12px;
    }

    .main-nav a {
        font-size: 13px;
    }

    .hero-copy h1 {
        font-size: 58px;
    }

    .watch-info h1 {
        font-size: 52px;
    }

    .watch-hero {
        grid-template-columns: 240px 1fr;
        gap: 32px;
    }

    .media-grid,
    .media-grid.compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .catalog-layout {
        grid-template-columns: 248px minmax(0, 1fr);
        gap: 18px;
    }

    .catalog-hero h1 {
        font-size: 46px;
    }

    .auth-layout,
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-summary {
        position: static;
    }

    .account-shell {
        display: flex;
        flex-direction: column;
    }

    .account-content {
        order: 1;
    }

    .account-sidebar {
        position: static;
        order: 2;
    }

    .account-nav {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .account-logout-form {
        margin-top: 0;
    }

    .account-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    :root {
        --header-height: 76px;
    }

    .site-header {
        grid-template-columns: auto auto 1fr auto;
        grid-template-areas:
            "menu brand spacer actions"
            "search search search search";
        height: auto;
        min-height: var(--header-height);
        gap: 10px 12px;
        padding: 10px 18px 12px;
    }

    .brand-link {
        grid-area: brand;
    }

    .brand-word {
        font-size: 15px;
    }

    .menu-toggle {
        grid-area: menu;
        display: inline-grid;
        gap: 4px;
    }

    .header-actions {
        grid-area: actions;
    }

    .header-search {
        grid-area: search;
    }

    .header-search input {
        min-height: 40px;
    }

    .profile-pill {
        max-width: 112px;
        min-height: 38px;
        padding: 0 12px;
        font-size: 13px;
    }

    .icon-link,
    .icon-button {
        width: 38px;
        height: 38px;
    }

    .main-nav {
        position: fixed;
        z-index: 100;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(330px, 84vw);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 20px;
        border-right: 1px solid var(--border);
        background: rgba(5, 8, 17, 0.98);
        box-shadow: var(--shadow);
        transform: translateX(-105%);
        transition: transform 0.24s ease;
    }

    .site-header.nav-open .main-nav {
        transform: translateX(0);
    }

    .mobile-menu-head {
        display: inline-flex;
        min-height: 44px;
        margin-bottom: 18px;
    }

    .main-nav a {
        min-height: 48px;
        padding: 0 10px;
        border-radius: var(--radius);
        font-size: 16px;
    }

    .main-nav a::after {
        left: 10px;
        bottom: 8px;
        transform: none;
    }

    .main-nav a.is-active,
    .main-nav a:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    .mobile-menu-scrim {
        position: fixed;
        z-index: 90;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(0, 0, 0, 0.58);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .site-header.nav-open .mobile-menu-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .page-shell {
        padding: 132px 18px 66px;
    }

    .page-shell {
        padding-bottom: 96px;
    }

    .site-footer {
        padding-bottom: 96px;
    }

    .home-page .page-shell,
    .watch-page .page-shell {
        padding-top: 112px;
    }

    .hero-carousel {
        min-height: 610px;
        margin: 0 -18px 26px;
        border-bottom: 1px solid var(--border);
    }

    .hero-slide {
        align-items: end;
        padding: 92px 18px 92px;
        background-image:
            linear-gradient(180deg, rgba(3, 5, 11, 0.05) 0%, rgba(3, 5, 11, 0.78) 66%, var(--bg) 100%),
            var(--hero-image);
        background-position: center top;
    }

    .hero-copy h1 {
        font-size: 42px;
        line-height: 1;
    }

    .hero-copy p {
        font-size: 15px;
        line-height: 1.58;
    }

    .hero-meta {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .hero-meta::-webkit-scrollbar {
        display: none;
    }

    .hero-controls {
        left: 18px;
        right: 18px;
        bottom: 34px;
        justify-content: space-between;
    }

    .hero-arrow {
        display: none;
    }

    .section-heading {
        align-items: center;
    }

    .section-heading h2 {
        font-size: 28px;
    }

    .section-link {
        display: none;
    }

    .rail-arrow {
        display: none;
    }

    .genre-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: initial;
        overflow: visible;
        gap: 10px;
        padding-bottom: 0;
    }

    .genre-card {
        min-height: 122px;
        padding: 14px;
    }

    .genre-poster-stack {
        width: 128px;
    }

    .genre-poster-stack img,
    .genre-poster-stack span {
        width: 56px;
        height: 88px;
    }

    .genre-poster-stack img:nth-child(1),
    .genre-poster-stack span:nth-child(1) {
        right: 62px;
    }

    .genre-poster-stack img:nth-child(2),
    .genre-poster-stack span:nth-child(2) {
        right: 34px;
    }

    .genre-poster-stack img:nth-child(3),
    .genre-poster-stack span:nth-child(3) {
        right: 8px;
    }

    .genre-name {
        max-width: 128px;
        font-size: 20px;
    }

    .media-rail {
        grid-auto-columns: 154px;
        gap: 12px;
    }

    .media-grid,
    .media-grid.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .catalog-hero {
        min-height: 0;
        align-items: start;
        flex-direction: column;
        padding: 24px;
    }

    .catalog-hero h1 {
        font-size: 38px;
    }

    .filter-open-button {
        display: inline-flex;
        width: auto;
        min-height: 42px;
    }

    .catalog-layout {
        display: block;
        margin-top: 18px;
    }

    .catalog-sidebar {
        position: static;
    }

    .catalog-filters {
        position: fixed;
        z-index: 130;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 84dvh;
        overflow-y: auto;
        padding: 14px 18px 20px;
        border-radius: 18px 18px 0 0;
        background: rgba(5, 8, 17, 0.98);
        box-shadow: 0 -18px 58px rgba(0, 0, 0, 0.42);
        transform: translateY(108%);
        transition: transform 0.24s ease;
    }

    body.filters-open .catalog-filters {
        transform: translateY(0);
    }

    .filter-sheet-head {
        display: grid;
        grid-template-columns: 36px 1fr 36px;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        margin-bottom: 2px;
        text-align: center;
    }

    .filter-sheet-head strong {
        color: #fff;
    }

    .filter-sheet-head button {
        width: 36px;
        height: 36px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.07);
        color: #fff;
        cursor: pointer;
        font-size: 22px;
    }

    .filter-scrim {
        position: fixed;
        z-index: 125;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(0, 0, 0, 0.62);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.filters-open .filter-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .catalog-results-head {
        align-items: start;
    }

    .search-panel form {
        grid-template-columns: minmax(0, 1fr) 160px auto;
    }

    .mobile-bottom-nav {
        position: fixed;
        z-index: 75;
        left: 12px;
        right: 12px;
        bottom: 10px;
        height: 62px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 6px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: rgba(5, 8, 17, 0.94);
        box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-nav a {
        position: relative;
        min-width: 0;
        display: grid;
        place-items: center;
        align-content: center;
        gap: 4px;
        color: var(--muted-2);
        font-size: 11px;
        font-weight: 550;
        line-height: 1;
        transition: color 0.18s ease;
    }

    .mobile-bottom-nav .bn-ic {
        display: grid;
        place-items: center;
        width: 48px;
        height: 28px;
    }

    .mobile-bottom-nav .bn-ic svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-nav a.is-active {
        color: #fff;
    }

    .mobile-bottom-nav a.is-active .bn-ic {
        color: var(--blue-2);
    }

    .mobile-bottom-nav a.is-active .bn-l {
        color: #fff;
        font-weight: 700;
    }

    .mobile-bottom-nav a.is-active::before {
        content: "";
        position: absolute;
        top: -2px;
        width: 22px;
        height: 3px;
        border-radius: 99px;
        background: var(--blue-2);
    }

    .account-hero-main h1,
    .account-page-head h1 {
        font-size: 36px;
    }

    .account-page-head.with-action,
    .danger-card,
    .settings-shortcut {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-shortcut {
        grid-template-columns: 1fr;
    }

    .library-grid,
    .library-grid.preview {
        grid-template-columns: 1fr;
    }

    .watch-hero {
        grid-template-columns: 1fr;
        min-height: 640px;
        margin: 0 -18px 34px;
        padding: 96px 18px 50px;
        background-image:
            linear-gradient(180deg, rgba(3, 5, 11, 0.06) 0%, rgba(3, 5, 11, 0.86) 62%, var(--bg) 100%),
            var(--watch-backdrop);
    }

    .watch-poster {
        display: none;
    }

    .watch-info h1 {
        font-size: 42px;
        line-height: 1;
    }

    .watch-description {
        font-size: 15px;
        line-height: 1.62;
    }

    .player-frame {
        aspect-ratio: 16 / 10;
    }

    .episode-grid {
        grid-template-columns: 1fr;
    }

    .episode-card {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .cast-rail {
        grid-auto-columns: 126px;
    }

    .details-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-visual {
        min-height: 260px;
    }
}

@media (max-width: 620px) {
    .favorites-link {
        width: 38px;
        height: 38px;
    }

    .hero-carousel {
        min-height: 590px;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

    .hero-actions,
    .watch-actions {
        display: grid;
        grid-template-columns: 1fr 56px;
    }

    .watch-actions {
        grid-template-columns: 1fr;
    }

    .hero-actions .button-primary {
        width: 100%;
    }

    .hero-actions .button-primary,
    .watch-actions .button-primary {
        min-height: 56px;
        padding: 0 22px;
        font-size: 17px;
    }

    .hero-save {
        width: 56px;
        height: 56px;
    }

    .hero-actions .play-dot,
    .watch-actions .play-dot {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .quick-categories {
        margin-left: -18px;
        margin-right: -18px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .catalog-hero {
        padding: 20px;
    }

    .catalog-hero h1 {
        font-size: 34px;
    }

    .catalog-results-head {
        display: grid;
        gap: 8px;
    }

    .catalog-results-head h2 {
        font-size: 25px;
    }

    .catalog-results-head > span {
        white-space: normal;
    }

    .search-panel {
        padding: 14px;
    }

    .search-panel form {
        grid-template-columns: 1fr;
    }

    .search-hero-premium {
        min-height: 210px;
        padding: 22px;
    }

    .search-hero-premium h1 {
        font-size: 38px;
    }

    .search-filter-bar form {
        display: grid;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .search-filter-bar input,
    .search-filter-bar select,
    .search-filter-bar .button {
        width: 100%;
        min-width: 0;
    }

    .suggestion-item {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .suggestion-item em {
        grid-column: 2;
        width: max-content;
    }

    .account-hero-card,
    .account-page-head,
    .account-section,
    .account-form-card,
    .danger-card {
        padding: 18px;
    }

    .account-hero-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-avatar-letter.large {
        width: 76px;
        height: 76px;
        font-size: 34px;
    }

    .account-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .account-stat-grid a {
        min-height: 82px;
        padding: 13px;
    }

    .account-stat-grid strong {
        font-size: 28px;
    }

    .account-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .library-card {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 12px;
    }

    .library-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .library-card h3 {
        font-size: 16px;
    }

    .section-block {
        margin-top: 38px;
    }

    .media-grid,
    .media-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .media-rail {
        grid-auto-columns: 142px;
    }

    .media-title {
        font-size: 14px;
    }

    .auth-layout,
    .account-layout {
        margin-top: 22px;
    }

    .premium-form,
    .auth-visual,
    .account-summary,
    .search-empty-panel {
        padding: 20px;
    }

    .auth-visual h1,
    .account-summary h1,
    .page-title h1 {
        font-size: 34px;
    }

    .search-empty-panel form {
        grid-template-columns: 1fr;
    }

    .watch-error {
        min-height: 420px;
        margin-top: 20px;
        padding: 24px 18px;
    }

    .watch-error h1 {
        font-size: 34px;
    }

    .player-card {
        margin-left: -8px;
        margin-right: -8px;
        padding: 8px;
    }

    .player-placeholder strong {
        font-size: 28px;
    }

    .season-pills {
        margin-left: -18px;
        margin-right: -18px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .episode-card {
        grid-template-columns: 1fr;
    }

    .episode-still {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .episode-body {
        padding: 13px;
    }

    .details-card {
        grid-template-columns: 1fr;
    }

    .details-item {
        min-height: 78px;
    }

    .toast-stack {
        left: 50%;
        right: auto;
        bottom: 84px;
        width: calc(100vw - 32px);
        transform: translateX(-50%);
    }

    .toast {
        max-width: none;
        text-align: center;
    }

    .button {
        width: 100%;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 18px;
    }

    .site-footer-contacts {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 430px) {
    .brand-word {
        display: none;
    }

    .header-actions {
        gap: 7px;
    }

    .profile-pill {
        max-width: 84px;
    }

    .genre-name {
        font-size: 18px;
    }

    .genre-card {
        min-height: 112px;
    }

    .media-rail {
        grid-auto-columns: 138px;
    }
}

.admin-page {
    background:
        linear-gradient(180deg, rgba(9, 13, 24, 0.96), var(--bg) 380px),
        var(--bg);
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px;
    border-right: 1px solid var(--border);
    background: rgba(5, 8, 17, 0.84);
    backdrop-filter: blur(18px);
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 950;
}

.admin-nav {
    display: grid;
    gap: 7px;
}

.admin-nav a,
.admin-exit {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--muted);
    font-weight: 850;
}

.admin-nav a:hover,
.admin-nav a.is-active,
.admin-exit:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.admin-exit {
    margin-top: auto;
}

.admin-main {
    min-width: 0;
    padding: 28px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.admin-topbar h1 {
    margin: 6px 0 0;
    font-size: 38px;
    line-height: 1;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.admin-user button,
.admin-table button,
.admin-inline-form button {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 0 12px;
    cursor: pointer;
}

.admin-table button.is-danger,
.admin-inline-form button.is-danger,
.admin-actions-cell .is-danger {
    border-color: rgba(255, 35, 63, 0.34);
    background: rgba(255, 35, 63, 0.12);
}

.admin-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.admin-stats article,
.admin-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.052);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.admin-stats article {
    min-height: 126px;
    display: grid;
    align-content: end;
    gap: 10px;
    padding: 18px;
}

.admin-stats span,
.admin-muted {
    color: var(--muted);
}

.admin-stats strong {
    color: #fff;
    font-size: 34px;
    line-height: 1;
}

.admin-grid {
    display: grid;
    gap: 18px;
}

.admin-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card {
    padding: 20px;
    margin-bottom: 18px;
}

.admin-card-head,
.admin-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.admin-card h2,
.admin-edit-head h2 {
    margin: 6px 0 0;
    color: #fff;
    font-size: 26px;
    line-height: 1.1;
}

.admin-link {
    color: var(--blue-2);
    font-weight: 900;
}

.admin-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.admin-search-form input,
.admin-search-form select,
.admin-form input,
.admin-form textarea,
.admin-form select,
.admin-inline-form input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 0 13px;
}

.admin-form {
    display: grid;
    gap: 14px;
}

.admin-form textarea {
    min-height: 170px;
    padding: 13px;
    resize: vertical;
}

.admin-form label {
    display: grid;
    gap: 8px;
}

.admin-form label span {
    color: #dce3ee;
    font-size: 14px;
    font-weight: 850;
}

.admin-form-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.admin-check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
}

.admin-check input {
    width: auto;
    min-height: 0;
}

.admin-list {
    display: grid;
    gap: 8px;
}

.admin-list a {
    display: grid;
    gap: 3px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.admin-list small {
    color: var(--muted);
}

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

.admin-tmdb-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 13px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.admin-tmdb-card img,
.admin-tmdb-card .poster-empty {
    width: 92px;
    aspect-ratio: 2 / 3;
    border-radius: 7px;
    object-fit: cover;
}

.admin-tmdb-card div {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 9px;
}

.admin-tmdb-card strong {
    color: #fff;
}

.admin-tmdb-card span {
    color: var(--muted);
    font-size: 13px;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    color: #e9edf5;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.admin-actions-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.admin-actions-cell a {
    color: var(--blue-2);
    font-weight: 850;
}

.admin-badge {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.admin-badge.is-good {
    background: rgba(61, 220, 132, 0.13);
    color: #8af0b3;
}

.admin-badge.is-muted {
    background: rgba(255, 35, 63, 0.11);
    color: #ffb5c0;
}

.admin-edit-head {
    justify-content: flex-start;
}

.admin-edit-head img,
.admin-edit-head .poster-empty {
    width: 110px;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    object-fit: cover;
}

.admin-edit-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.admin-inline-form input[type="number"] {
    width: 86px;
}

.player-source-form {
    gap: 18px;
}

.player-source-panel {
    display: grid;
    gap: 14px;
}

.player-source-panel[hidden] {
    display: none;
}

.admin-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-checklist {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
    color: #dce3ee;
}

.admin-checklist p {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
    margin: 0;
}

.admin-checklist small {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.admin-access-denied {
    width: min(720px, calc(100vw - 32px));
    min-height: 520px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    margin: 8vh auto;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--glass);
    text-align: center;
}

.admin-access-denied h1 {
    margin: 0;
    font-size: 44px;
}

.admin-access-denied p {
    margin: 0;
    color: var(--muted);
}

.analytics-filter-card {
    overflow: hidden;
}

.analytics-filter-form {
    grid-template-columns: 1fr 180px 180px auto;
}

.analytics-stats {
    margin-bottom: 18px;
}

.analytics-stats article small {
    color: var(--muted);
    font-weight: 800;
}

.analytics-stats.compact article {
    min-height: 104px;
}

.analytics-chart-grid {
    align-items: stretch;
}

.analytics-chart-card {
    min-height: 380px;
}

.analytics-chart-wrap {
    width: 100%;
    min-height: 280px;
}

.analytics-chart-wrap canvas {
    width: 100%;
    height: 280px;
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.025);
}

.analytics-table td {
    vertical-align: top;
}

.analytics-table small,
.analytics-title-link + small,
.analytics-content-cell small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.analytics-title-link {
    color: #fff;
    font-weight: 900;
}

.analytics-bars {
    display: grid;
    gap: 12px;
}

.analytics-bar-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding-bottom: 12px;
}

.analytics-bar-row span {
    min-width: 0;
    overflow: hidden;
    color: #e9edf5;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-bar-row strong {
    color: #fff;
}

.analytics-bar-row i {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.analytics-bar-row i::before {
    content: "";
    display: block;
    width: var(--bar-width, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pink), var(--blue-2));
}

.analytics-event-list a {
    word-break: break-word;
}

.analytics-content-cell {
    display: grid;
    grid-template-columns: 48px minmax(180px, 1fr);
    gap: 10px;
    align-items: center;
    color: #fff;
}

.analytics-content-cell img,
.analytics-content-cell .poster-empty {
    width: 48px;
    aspect-ratio: 2 / 3;
    border-radius: 7px;
    object-fit: cover;
}

.analytics-content-cell strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.content-stats-table {
    min-width: 1120px;
}

@media (max-width: 1100px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .admin-nav {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
    }

    .admin-exit {
        margin-top: 0;
    }

    .admin-main {
        padding: 18px;
    }

    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-grid.two,
    .admin-tmdb-grid,
    .admin-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-user {
        width: 100%;
        justify-content: space-between;
    }

    .admin-search-form {
        grid-template-columns: 1fr;
    }

    .analytics-filter-form {
        grid-template-columns: 1fr;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-card {
        padding: 16px;
    }
}

*, *::before, *::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

iframe,
video {
    max-width: 100%;
}

.media-rail,
.genre-rail,
.quick-categories,
.genre-pills,
.season-pills,
.cast-rail,
.account-nav,
.admin-nav {
    max-width: 100%;
    min-width: 0;
    contain: layout paint;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

@media (max-width: 1024px) {
    .site-header {
        grid-template-columns: 44px auto minmax(0, 1fr) auto;
        grid-template-areas: "menu brand search actions";
        height: 72px;
        min-height: 72px;
        padding: 10px 22px;
    }

    .menu-toggle {
        grid-area: menu;
        display: inline-grid;
        gap: 4px;
        width: 44px;
        height: 44px;
    }

    .brand-link {
        grid-area: brand;
        min-width: 0;
    }

    .header-search {
        grid-area: search;
        min-width: 0;
    }

    .header-actions {
        grid-area: actions;
        min-width: max-content;
    }

    .main-nav {
        position: fixed;
        z-index: 120;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(340px, 86vw);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 18px;
        border-right: 1px solid var(--border);
        background: rgba(5, 8, 17, 0.98);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        clip-path: inset(0 100% 0 0);
        transform: none;
        contain: layout paint;
        transition: clip-path 0.24s ease, opacity 0.2s ease, visibility 0s linear 0.24s;
    }

    .site-header.nav-open .main-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        clip-path: inset(0 0 0 0);
        transform: none;
        transition-delay: 0s;
    }

    .mobile-menu-head {
        display: inline-flex;
        min-height: 44px;
        margin-bottom: 14px;
    }

    .main-nav a {
        min-height: 50px;
        justify-content: flex-start;
        padding: 0 12px;
        border-radius: var(--radius);
        font-size: 16px;
    }

    .main-nav a::after {
        left: 12px;
        right: auto;
        bottom: 8px;
        transform: none;
    }

    .main-nav a:hover,
    .main-nav a.is-active {
        background: rgba(255, 255, 255, 0.06);
    }

    .mobile-menu-scrim {
        position: fixed;
        z-index: 110;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(0, 0, 0, 0.62);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .site-header.nav-open .mobile-menu-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .page-shell {
        padding: 98px 22px 92px;
    }

    .home-page .page-shell,
    .watch-page .page-shell {
        padding-top: 72px;
    }

    .media-grid,
    .media-grid.compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .catalog-layout {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .auth-layout,
    .account-layout,
    .account-shell {
        grid-template-columns: 1fr;
    }

    .account-shell {
        display: flex;
        flex-direction: column;
    }

    .account-content {
        order: 1;
    }

    .account-sidebar {
        position: static;
        order: 2;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --bottom-nav-height: 76px;
    }

    body.menu-lock {
        overflow: hidden;
        touch-action: none;
    }

    .site-header {
        height: var(--header-height);
        min-height: var(--header-height);
        grid-template-columns: 44px auto minmax(0, 1fr) auto;
        gap: 8px;
        padding: 10px 12px;
        background: rgba(3, 5, 11, 0.9);
    }

    .site-avatar {
        width: 34px;
        height: 34px;
    }

    .brand-word {
        font-size: 14px;
    }

    .header-search input {
        min-height: 44px;
        padding: 0 44px 0 13px;
        font-size: 14px;
    }

    .search-submit {
        right: 5px;
        width: 34px;
        height: 34px;
    }

    body.search-open .header-search {
        position: fixed;
        z-index: 180;
        top: 10px;
        left: 12px;
        right: 12px;
    }

    body.search-open .header-search input {
        background: rgba(10, 15, 28, 0.98);
    }

    body.search-open .brand-link,
    body.search-open .menu-toggle,
    body.search-open .header-actions {
        opacity: 0;
        pointer-events: none;
    }

    .search-suggestions {
        position: fixed;
        z-index: 185;
        top: calc(var(--header-height) + 8px);
        left: 12px;
        right: 12px;
        max-height: min(70dvh, 520px);
        overflow-y: auto;
        border-radius: 16px;
    }

    .suggestion-item {
        min-height: 72px;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
    }

    .suggestion-item em {
        grid-column: 2;
        width: max-content;
    }

    .icon-link,
    .icon-button,
    .favorites-link {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
    }

    .profile-pill {
        min-height: 44px;
        max-width: 82px;
        padding: 0 12px;
        justify-content: center;
        font-size: 13px;
    }

    .page-shell {
        min-height: 100dvh;
        padding: calc(var(--header-height) + 18px) 16px calc(var(--bottom-nav-height) + 28px + env(safe-area-inset-bottom));
    }

    .home-page .page-shell,
    .watch-page .page-shell {
        padding-top: var(--header-height);
    }

    .site-footer {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        align-items: start;
        padding: 24px 16px calc(var(--bottom-nav-height) + 24px + env(safe-area-inset-bottom));
    }

    .site-footer-brand {
        min-width: 0;
    }

    .site-footer-contacts {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }

    .site-footer-contacts span {
        flex-basis: 100%;
    }

    .mobile-bottom-nav {
        z-index: 95;
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        height: 64px;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 3px;
        padding: 6px;
        border-radius: 18px;
        background: rgba(5, 8, 17, 0.96);
    }

    .mobile-bottom-nav a {
        min-width: 0;
        min-height: 52px;
        font-size: 11px;
        line-height: 1;
    }

    .mobile-bottom-nav .bn-ic svg {
        width: 24px;
        height: 24px;
    }

    .hero-carousel {
        min-height: clamp(430px, 68dvh, 560px);
        margin: 0 -16px 26px;
        border-bottom: 1px solid var(--border);
    }

    .hero-slide {
        align-items: end;
        padding: 88px 16px 84px;
        background-image:
            linear-gradient(180deg, rgba(3, 5, 11, 0.02) 0%, rgba(3, 5, 11, 0.76) 56%, var(--bg) 100%),
            var(--hero-image);
        background-position: center top;
    }

    .hero-copy {
        max-width: 100%;
    }

    .hero-copy h1 {
        max-width: 12ch;
        font-size: clamp(34px, 10vw, 54px);
        line-height: 0.98;
    }

    .hero-copy p,
    .watch-description {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        font-size: 15px;
        line-height: 1.58;
    }

    .hero-meta,
    .watch-badges,
    .genre-pills,
    .season-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .hero-meta::-webkit-scrollbar,
    .watch-badges::-webkit-scrollbar,
    .genre-pills::-webkit-scrollbar,
    .season-pills::-webkit-scrollbar {
        display: none;
    }

    .hero-actions,
    .watch-actions {
        display: grid;
        grid-template-columns: 1fr 56px;
        width: 100%;
        gap: 10px;
    }

    .watch-actions {
        grid-template-columns: 1fr;
    }

    .hero-actions .button-primary,
    .watch-actions .button-primary,
    .watch-actions .button-subtle {
        width: 100%;
        min-height: 56px;
    }

    .watch-actions .button {
        min-height: 56px;
    }

    .watch-actions .watch-icon-button {
        width: 56px;
        min-width: 56px;
        height: 56px;
        min-height: 56px;
    }

    .hero-save {
        width: 56px;
        height: 56px;
    }

    .hero-controls {
        left: 16px;
        right: 16px;
        bottom: 26px;
        justify-content: center;
    }

    .hero-arrow,
    .rail-arrow {
        display: none;
    }

    .section-block {
        margin-top: 36px;
    }

    .section-heading {
        gap: 10px;
        align-items: end;
    }

    .section-heading h2 {
        font-size: 26px;
    }

    .section-link {
        display: none;
    }

    .quick-categories,
    .media-rail,
    .cast-rail {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        scroll-snap-type: x mandatory;
    }

    .media-rail {
        grid-auto-columns: minmax(138px, 40vw);
        gap: 12px;
    }

    .media-card,
    .genre-card,
    .cast-card {
        scroll-snap-align: start;
    }

    .media-grid,
    .media-grid.compact,
    .account-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .media-title {
        font-size: 14px;
    }

    .card-favorite,
    .favorite-button {
        width: 36px;
        height: 36px;
    }

    .genre-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: initial;
        overflow: visible;
        gap: 12px;
    }

    .genre-card {
        min-width: 0;
        min-height: 118px;
        padding: 14px;
    }

    .genre-name {
        max-width: 130px;
        font-size: 19px;
    }

    .catalog-hero,
    .search-hero-premium {
        min-height: 0;
        align-items: start;
        flex-direction: column;
        padding: 20px;
    }

    .catalog-hero h1,
    .search-hero-premium h1,
    .page-title h1 {
        font-size: clamp(32px, 9vw, 42px);
        line-height: 1;
    }

    .filter-open-button {
        display: inline-flex;
        width: auto;
        min-height: 44px;
        padding: 0 16px;
    }

    .catalog-layout {
        display: block;
        margin-top: 18px;
    }

    .catalog-sidebar {
        position: static;
    }

    .catalog-filters {
        position: fixed;
        z-index: 150;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: min(86dvh, 720px);
        overflow-y: auto;
        padding: 12px 16px calc(18px + env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
        background: rgba(5, 8, 17, 0.985);
        box-shadow: 0 -18px 58px rgba(0, 0, 0, 0.48);
        transform: translateY(108%);
        transition: transform 0.24s ease;
    }

    body.filters-open .catalog-filters {
        transform: translateY(0);
    }

    .filter-sheet-head {
        position: sticky;
        top: -12px;
        z-index: 1;
        display: grid;
        grid-template-columns: 36px 1fr 36px;
        align-items: center;
        gap: 8px;
        min-height: 48px;
        margin: 0 -16px 10px;
        padding: 8px 16px 4px;
        background: rgba(5, 8, 17, 0.985);
        text-align: center;
    }

    .filter-sheet-head span::before {
        content: "";
        position: absolute;
        top: 7px;
        left: 50%;
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.22);
        transform: translateX(-50%);
    }

    .filter-sheet-head button {
        width: 36px;
        height: 36px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.07);
        color: #fff;
        font-size: 22px;
    }

    .filter-actions {
        position: sticky;
        bottom: calc(-18px - env(safe-area-inset-bottom));
        margin: 4px -16px calc(-18px - env(safe-area-inset-bottom));
        padding: 12px 16px calc(18px + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, rgba(5, 8, 17, 0.7), rgba(5, 8, 17, 0.985) 28%);
    }

    .filter-scrim {
        position: fixed;
        z-index: 140;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(0, 0, 0, 0.64);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.filters-open .filter-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .catalog-results-head {
        display: grid;
        gap: 6px;
        align-items: start;
    }

    .search-panel,
    .search-filter-bar form,
    .search-empty-panel form {
        grid-template-columns: 1fr;
    }

    .search-panel input,
    .search-panel select,
    .search-panel .button,
    .search-filter-bar input,
    .search-filter-bar select,
    .search-filter-bar .button {
        width: 100%;
        min-width: 0;
    }

    .watch-hero {
        min-height: clamp(440px, 72dvh, 600px);
        grid-template-columns: 1fr;
        align-items: end;
        margin: 0 -16px 28px;
        padding: 92px 16px 36px;
        background-image:
            linear-gradient(180deg, rgba(3, 5, 11, 0.04) 0%, rgba(3, 5, 11, 0.86) 58%, var(--bg) 100%),
            var(--watch-backdrop);
        background-position: center top;
    }

    .watch-poster {
        display: none;
    }

    .watch-info h1 {
        font-size: clamp(34px, 9.5vw, 50px);
        line-height: 1;
    }

    .watch-info,
    .watch-badges,
    .watch-actions {
        min-width: 0;
        max-width: 100%;
    }

    .player-card {
        margin-left: -6px;
        margin-right: -6px;
        padding: 8px;
    }

    .player-frame {
        min-height: 198px;
        aspect-ratio: 16 / 9;
    }

    .player-tabs {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }

    .player-tabs button {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
    }

    .episode-grid,
    .details-card {
        grid-template-columns: 1fr;
    }

    .episode-card {
        grid-template-columns: 1fr;
    }

    .episode-still {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .auth-layout {
        width: 100%;
        margin-top: 14px;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .auth-layout.compact {
        width: 100%;
    }

    .auth-visual,
    .premium-form,
    .account-summary,
    .account-section,
    .account-form-card,
    .danger-card,
    .search-empty-panel {
        padding: 20px;
    }

    .auth-visual {
        display: none;
    }

    .auth-logo {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }

    .auth-form {
        gap: 13px;
    }

    .premium-form {
        padding: 18px;
    }

    .auth-visual h1,
    .account-summary h1,
    .account-page-head h1 {
        font-size: clamp(32px, 9vw, 42px);
        line-height: 1;
    }

    .premium-form input,
    .premium-form textarea {
        min-height: 48px;
        font-size: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .code-input {
        font-size: 24px;
        letter-spacing: 4px;
    }

    .account-page-head.with-action,
    .account-section-head,
    .danger-card,
    .settings-shortcut {
        align-items: stretch;
        flex-direction: column;
    }

    .account-nav {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .library-grid,
    .library-grid.preview {
        grid-template-columns: 1fr;
    }

    .library-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
    }

    .toast-stack {
        left: 50%;
        right: auto;
        bottom: calc(var(--bottom-nav-height) + 16px + env(safe-area-inset-bottom));
        width: calc(100vw - 32px);
        transform: translateX(-50%);
    }

    .toast {
        max-width: none;
        text-align: center;
    }

    .button {
        min-height: 46px;
    }

    .section-actions .button,
    .filter-open-button,
    .icon-link,
    .icon-button,
    .favorite-button,
    .card-favorite,
    .hero-save,
    .rail-arrow,
    .hero-arrow,
    .menu-toggle {
        width: auto;
    }

    .icon-link,
    .icon-button,
    .favorites-link,
    .menu-toggle {
        width: 44px;
    }

    .hero-save {
        width: 56px;
    }

    .card-favorite,
    .favorite-button {
        width: 36px;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .admin-nav {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .admin-main {
        padding: 16px;
    }

    .admin-topbar,
    .admin-user,
    .admin-checklist p {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .admin-search-form,
    .admin-form,
    .admin-grid.two,
    .admin-tmdb-grid,
    .admin-preview-grid,
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-table-wrap {
        margin: 0 -16px;
        padding: 0 16px;
        overflow-x: auto;
    }

    .admin-table {
        min-width: 720px;
    }

    .admin-card,
    .admin-access-denied {
        padding: 16px;
    }
}

@media (max-width: 430px) {
    .site-header {
        gap: 7px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .brand-word {
        display: none;
    }

    .header-search input {
        padding-left: 12px;
        font-size: 13px;
    }

    .header-actions {
        gap: 6px;
    }

    .profile-pill {
        max-width: 70px;
        padding: 0 10px;
    }

    .page-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-carousel,
    .watch-hero {
        margin-left: -14px;
        margin-right: -14px;
    }

    .hero-slide,
    .watch-hero {
        padding-left: 14px;
        padding-right: 14px;
    }

    .media-rail,
    .quick-categories,
    .cast-rail {
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .media-grid,
    .media-grid.compact,
    .account-media-grid {
        gap: 10px;
    }

    .media-rail {
        grid-auto-columns: 138px;
    }

    .genre-card {
        min-height: 112px;
    }

    .genre-name {
        font-size: 18px;
    }

    .library-card {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .site-footer {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 390px) {
    .site-header {
        grid-template-columns: 42px 34px minmax(0, 1fr) auto;
        gap: 6px;
    }

    .menu-toggle,
    .icon-link,
    .icon-button,
    .favorites-link {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .header-search input {
        min-height: 42px;
        padding-right: 39px;
    }

    .search-submit {
        width: 31px;
        height: 31px;
        right: 5px;
    }

    .profile-pill {
        max-width: 62px;
        min-height: 42px;
        padding: 0 8px;
        font-size: 12px;
    }

    .hero-copy h1,
    .watch-info h1 {
        font-size: 32px;
    }

    .section-heading h2 {
        font-size: 24px;
    }

    .media-rail {
        grid-auto-columns: 132px;
    }

    .mobile-bottom-nav {
        left: 8px;
        right: 8px;
    }
}

@media (max-width: 360px) {
    .site-header {
        grid-template-columns: 40px 32px minmax(0, 1fr) auto;
        padding-left: 8px;
        padding-right: 8px;
    }

    .site-avatar {
        width: 32px;
        height: 32px;
    }

    .menu-toggle,
    .icon-link,
    .icon-button,
    .favorites-link {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .profile-pill {
        max-width: 56px;
        min-height: 40px;
    }

    .header-search input {
        min-height: 40px;
        font-size: 12px;
    }

    .media-rail {
        grid-auto-columns: 126px;
    }

    .media-grid,
    .media-grid.compact,
    .account-media-grid {
        gap: 8px;
    }

    .genre-rail {
        gap: 8px;
    }

    .genre-card {
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .home-page .media-rail,
    .home-page .genre-rail {
        width: calc(100vw - 16px);
        max-width: none;
        margin-left: 0;
        margin-right: -16px;
        padding-left: 0;
        padding-right: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 0;
    }

    .home-page .genre-rail {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(210px, 64vw);
        grid-template-columns: none;
        gap: 12px;
        overflow-y: hidden;
        padding-bottom: 16px;
    }

    .home-page .genre-card {
        min-width: 0;
        min-height: 132px;
    }
}

@media (max-width: 430px) {
    .home-page .media-rail,
    .home-page .genre-rail {
        width: calc(100vw - 14px);
        margin-right: -14px;
        padding-right: 14px;
    }

    .home-page .genre-rail {
        grid-auto-columns: minmax(192px, 72vw);
    }
}

@media (max-width: 390px) {
    .home-page .genre-rail {
        grid-auto-columns: minmax(184px, 74vw);
    }
}

@media (max-width: 768px) {
    .site-header {
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        grid-template-areas: "menu brand search actions";
    }
}

@media (max-width: 430px) {
    .site-header {
        grid-template-columns: auto 34px minmax(0, 1fr) auto;
    }
}

@media (max-width: 390px) {
    .site-header {
        grid-template-columns: auto 34px minmax(0, 1fr) auto;
    }
}

@media (max-width: 360px) {
    .site-header {
        grid-template-columns: auto 30px minmax(0, 1fr) auto;
        gap: 8px;
    }
}

.social-profile-hero,
.profile-stat-grid article,
.friend-card,
.conversation-row,
.chat-peer-card,
.chat-panel,
.share-modal-panel,
.kinonox-story-card,
.profile-media-card,
.profile-share-card a {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
}

.social-profile-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    background:
        radial-gradient(circle at 14% 12%, rgba(85, 184, 255, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(13, 22, 44, 0.92), rgba(5, 8, 17, 0.86));
}

.social-profile-main {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.account-avatar-letter.profile {
    width: 112px;
    height: 112px;
    font-size: 44px;
}

.social-profile-main h1 {
    margin: 6px 0 4px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 0.95;
}

.profile-handle,
.social-muted,
.profile-meta,
.friend-card span,
.friend-card small,
.conversation-row small,
.friend-mini-row small,
.chat-peer-card span,
.story-hint {
    color: var(--muted);
}

.profile-bio {
    max-width: 760px;
    margin: 14px 0 0;
    color: rgba(245, 248, 255, 0.88);
    line-height: 1.65;
}

.profile-meta,
.profile-actions,
.share-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.profile-meta {
    margin-top: 16px;
}

.profile-meta span,
.social-count {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.profile-actions {
    justify-content: flex-end;
    align-self: flex-start;
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.profile-stat-grid article {
    padding: 18px;
}

.profile-stat-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.profile-stat-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
}

.profile-media-grid,
.profile-share-grid,
.friend-list,
.conversation-list {
    display: grid;
    gap: 12px;
}

.profile-media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-share-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.profile-media-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 10px;
}

.profile-media-poster,
.profile-share-card img {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
}

.profile-media-poster {
    aspect-ratio: 2 / 3;
}

.profile-media-poster img,
.profile-share-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-media-card span,
.profile-share-card span {
    color: var(--blue-2);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-media-card h3,
.profile-share-card strong {
    margin: 6px 0;
    font-size: 16px;
}

.profile-share-card a {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 8px;
}

.profile-share-card img {
    aspect-ratio: 2 / 3;
}

.friend-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
}

.friend-search-section {
    scroll-margin-top: calc(var(--header-height) + 18px);
}

.friend-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.friend-search-form input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 0 14px;
    font-size: 15px;
}

.friend-search-results {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.friend-card-body,
.friend-card-actions,
.friend-mini-row span,
.conversation-row span {
    min-width: 0;
}

.friend-card-body {
    display: grid;
    gap: 4px;
}

.friend-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.social-status-pill {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 12px;
    background: rgba(61, 220, 132, 0.12);
    color: #8af0b3;
    font-size: 13px;
    font-weight: 900;
}

.friend-list.compact {
    gap: 8px;
}

.friend-mini-row,
.conversation-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
}

.conversation-row em {
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--red);
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.messages-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 18px;
}

.chat-shell {
    min-height: calc(100vh - 160px);
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
}

.chat-side {
    display: grid;
    align-content: start;
    gap: 14px;
}

.chat-peer-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 18px;
    text-align: center;
}

.chat-panel {
    display: grid;
    grid-template-rows: auto minmax(320px, 1fr) auto;
    min-height: 620px;
    overflow: hidden;
}

.chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.chat-head h1 {
    margin: 2px 0 0;
    font-size: 24px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 18px;
}

.chat-empty {
    margin: auto;
    color: var(--muted);
}

.chat-message {
    max-width: min(74%, 620px);
}

.chat-message.is-mine {
    align-self: flex-end;
}

.chat-bubble {
    display: grid;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
}

.chat-message.is-mine .chat-bubble {
    border-color: rgba(85, 184, 255, 0.26);
    background: rgba(29, 124, 255, 0.18);
}

.chat-bubble p {
    margin: 0;
    line-height: 1.55;
    white-space: pre-wrap;
}

.chat-bubble time {
    color: var(--muted-2);
    font-size: 11px;
}

.chat-shared-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 220px;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.24);
    padding: 8px;
}

.chat-shared-card img {
    width: 62px;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
    object-fit: cover;
}

.chat-shared-card small {
    color: var(--blue-2);
    font-weight: 900;
}

.chat-shared-card strong,
.chat-shared-card em {
    display: block;
}

.chat-shared-card em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.chat-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--border);
}

.chat-compose textarea,
.send-friend-form textarea,
.send-friend-form select,
.premium-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
}

.chat-compose textarea {
    min-height: 52px;
    resize: none;
    padding: 12px 14px;
}

.premium-form select,
.send-friend-form select {
    min-height: 46px;
    padding: 0 14px;
}

.privacy-grid,
.send-friend-form {
    display: grid;
    gap: 14px;
}

.toggle-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px;
}

.toggle-row input {
    width: 18px !important;
    min-height: 18px !important;
}

body.modal-lock {
    overflow: hidden;
}

.share-modal {
    position: fixed;
    z-index: 220;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
}

.share-modal[hidden] {
    display: none !important;
}

.share-modal-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.72);
}

.share-modal-panel {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(86vh, 860px);
    display: grid;
    gap: 18px;
    overflow-y: auto;
    padding: 22px;
    background:
        radial-gradient(circle at 20% 0%, rgba(85, 184, 255, 0.13), transparent 32%),
        linear-gradient(180deg, rgba(11, 17, 32, 0.98), rgba(5, 8, 17, 0.98));
}

.share-modal:not(.is-send-mode) .send-friend-form,
.share-modal.is-send-mode [data-share-actions],
.share-modal.is-send-mode .story-preview-box {
    display: none !important;
}

.share-modal.is-send-mode .share-modal-panel {
    width: min(540px, 100%);
}

.share-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.share-modal-head h2,
.send-friend-form h3 {
    margin: 4px 0 0;
}

.send-friend-form {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background:
        radial-gradient(circle at 18% 0%, rgba(85, 184, 255, 0.14), transparent 40%),
        rgba(255, 255, 255, 0.045);
}

.send-friend-form label {
    display: grid;
    gap: 8px;
}

.send-friend-form label > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.send-friend-form textarea {
    min-height: 104px;
    padding: 13px 14px;
    resize: vertical;
}

.instagram-story-button {
    gap: 8px;
}

.instagram-avatar-button {
    width: 60px;
    min-width: 60px;
    height: 60px;
    min-height: 60px;
    padding: 0;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.2);
    background: transparent;
    box-shadow: 0 14px 34px rgba(139, 92, 246, 0.24);
}

.instagram-story-button img {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    display: block;
}

.instagram-avatar-button img {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 0 28px rgba(139, 92, 246, 0.38);
}

.story-preview-box {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.story-preview-head {
    display: grid;
    gap: 5px;
    grid-column: 2;
}

.story-preview-head strong {
    font-size: 18px;
}

.story-preview-head span,
.story-fallback-text {
    color: var(--muted);
    line-height: 1.45;
}

.story-preview-box iframe {
    grid-row: 1 / span 3;
    width: min(210px, 100%);
    aspect-ratio: 9 / 16;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #03050b;
}

.story-fallback-text {
    margin: 0;
}

.story-preview-box .share-actions-grid,
.story-fallback-text {
    grid-column: 2;
}

.story-card-stage {
    min-height: calc(100vh - 160px);
    display: grid;
    justify-items: center;
    gap: 18px;
}

.story-embed {
    min-height: 100vh;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #050811;
}

.story-embed .kinonox-story-card {
    width: min(100vw, calc(100vh * 9 / 16));
    height: min(100vh, calc(100vw * 16 / 9));
    border: 0;
    border-radius: 0;
}

.story-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.kinonox-story-card {
    width: min(420px, 100%);
    aspect-ratio: 9 / 16;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: 22px;
    padding: 28px;
    background:
        radial-gradient(circle at 82% 13%, rgba(255, 79, 141, 0.2), transparent 34%),
        radial-gradient(circle at 20% 8%, rgba(85, 184, 255, 0.2), transparent 36%),
        linear-gradient(180deg, rgba(4, 8, 18, 0.74), rgba(4, 8, 18, 0.98)),
        var(--story-backdrop) center / cover;
}

.kinonox-story-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 24%, rgba(0, 0, 0, 0.54) 68%, rgba(0, 0, 0, 0.82)),
        rgba(2, 6, 23, 0.38);
}

.kinonox-story-card > * {
    position: relative;
    z-index: 1;
}

.story-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.story-brand-main {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(9, 14, 26, 0.72);
    color: var(--text);
}

.story-user,
.story-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.story-poster-frame {
    position: relative;
    align-self: center;
    justify-self: center;
    width: min(78%, 305px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
}

.story-poster-frame img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.story-rating {
    position: absolute;
    right: 14px;
    top: 14px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 999px;
    background: #3ddc84;
    color: #04100a;
    font-weight: 950;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
}

.story-copy {
    text-align: center;
    align-self: end;
}

.story-copy span,
.story-copy p {
    color: var(--blue-2);
    font-weight: 900;
}

.story-copy h1 {
    margin: 8px 0;
    font-size: clamp(28px, 7vw, 46px);
    line-height: 1;
}

.story-bottom {
    display: grid;
    gap: 13px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 24px;
    background: rgba(5, 8, 17, 0.78);
}

.story-bottom .story-user {
    justify-content: space-between;
}

.story-bottom .story-user > span {
    min-width: 0;
    display: grid;
    gap: 2px;
    flex: 1;
}

.story-bottom .story-user strong,
.story-bottom .story-user small,
.story-link span {
    overflow-wrap: anywhere;
}

.story-bottom .story-user small,
.story-link span {
    color: var(--muted);
    font-weight: 800;
}

.story-link {
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(14, 23, 40, 0.9);
}

.rank-card,
.content-reactions,
.comments-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.2);
}

.rank-card {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 16px;
}

.rank-card div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rank-card span,
.rank-card small,
.reaction-friends span,
.comments-empty,
.comments-login p {
    color: var(--muted);
}

.rank-card strong {
    color: var(--text);
    font-size: 20px;
}

.rank-card em {
    color: var(--blue-2);
    font-style: normal;
    font-weight: 900;
}

.rank-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.rank-progress span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pink), var(--blue-2));
}

.rank-stat small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.content-reactions {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 14px;
}

.player-reactions {
    width: min(1120px, 100%);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

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

.reaction-buttons button,
.comment-actions button {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    cursor: pointer;
    font-weight: 900;
}

.reaction-buttons button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
}

.youtube-reactions {
    flex: 0 0 auto;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
}

.youtube-reactions button {
    position: relative;
    min-height: 44px;
    gap: 9px;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #f4f7fb;
}

.youtube-reactions .fa {
    width: 18px;
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.youtube-reactions button + button::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: rgba(255, 255, 255, 0.16);
}

.youtube-reactions button:hover,
.youtube-reactions button.is-active {
    background: rgba(255, 255, 255, 0.12);
}

.reaction-buttons button.is-active,
.comment-actions button.is-active {
    border-color: rgba(85, 184, 255, 0.55);
    background: rgba(85, 184, 255, 0.16);
    color: #fff;
}

.youtube-reactions button.is-active {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.14);
}

.youtube-reactions button.is-active .fa {
    color: var(--blue-2);
}

.reaction-friend-list {
    display: grid;
    gap: 6px;
}

.player-reactions .reaction-friend-list {
    min-width: 0;
    align-content: center;
    justify-items: end;
    padding-top: 2px;
}

.reaction-friends {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    font-size: 13px;
}

.reaction-friends a {
    color: var(--blue-2);
    font-weight: 900;
}

.comments-panel {
    display: grid;
    gap: 18px;
    padding: 18px;
}

.comment-form {
    display: grid;
    gap: 12px;
}

.comment-form label {
    display: grid;
    gap: 8px;
}

.comment-form label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.comment-form textarea {
    width: 100%;
    min-height: 112px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    padding: 12px 14px;
}

.comment-reply-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(85, 184, 255, 0.22);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(85, 184, 255, 0.08);
}

.comment-reply-note button {
    border: 0;
    background: transparent;
    color: var(--blue-2);
    cursor: pointer;
    font-weight: 900;
}

.comments-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.comment-list,
.comment-replies {
    display: grid;
    gap: 14px;
}

.comment-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(0, 0, 0, 0.18);
}

.comment-card.is-reply {
    margin-left: 38px;
    background: rgba(255, 255, 255, 0.035);
}

.comment-head,
.comment-author,
.comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author {
    color: var(--text);
}

.comment-author span {
    display: grid;
    min-width: 0;
}

.comment-author small {
    color: var(--muted);
}

.comment-card p {
    min-width: 0;
    margin: 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.comment-actions {
    flex-wrap: wrap;
}

.comment-actions button {
    padding: 0 12px;
    font-size: 13px;
}

.admin-comment-body {
    min-width: 260px;
    max-width: 520px;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.comments-admin-table small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

@media (max-width: 920px) {
    .social-profile-hero,
    .messages-layout,
    .chat-shell {
        grid-template-columns: 1fr;
    }

    .social-profile-hero {
        display: grid;
    }

    .profile-actions {
        justify-content: flex-start;
    }

    .profile-stat-grid,
    .profile-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-share-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .social-profile-main,
    .friend-card,
    .chat-compose {
        grid-template-columns: 1fr;
    }

    .social-profile-main {
        display: grid;
        justify-items: start;
    }

    .account-avatar-letter.profile {
        width: 82px;
        height: 82px;
        font-size: 32px;
    }

    .profile-stat-grid,
    .profile-media-grid,
    .profile-share-grid {
        grid-template-columns: 1fr;
    }

    .friend-card-actions {
        justify-content: flex-start;
    }

    .friend-search-form {
        grid-template-columns: 1fr;
    }

    .chat-message {
        max-width: 92%;
    }

    .share-actions-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .comments-login,
    .rank-card div:first-child {
        align-items: stretch;
        flex-direction: column;
    }

    .reaction-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .reaction-buttons button,
    .comments-login .button {
        width: 100%;
        justify-content: center;
    }

    .player-reactions {
        align-items: flex-start;
        flex-direction: column;
    }

    .youtube-reactions {
        width: auto;
        display: inline-flex;
        grid-template-columns: none;
    }

    .youtube-reactions button {
        width: auto;
        min-width: 86px;
    }

    .player-reactions .reaction-friend-list {
        justify-items: start;
    }

    .comment-card.is-reply {
        margin-left: 12px;
    }
}

.admin-inline-form textarea,
.admin-inline-form select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 9px 11px;
}

.admin-inline-form textarea {
    min-height: 72px;
    resize: vertical;
}

.admin-inline-form.compact {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
}

.admin-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.admin-mini-grid label {
    display: grid;
    gap: 4px;
}

.admin-mini-grid label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.admin-poster-thumb {
    width: 48px;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .pwa-install-banner {
        left: 12px;
        right: 12px;
        bottom: calc(var(--bottom-nav-height) + 18px + env(safe-area-inset-bottom));
        width: auto;
        grid-template-columns: minmax(0, 1fr) auto 34px;
    }
}

@media (max-width: 390px) {
    .pwa-install-banner {
        grid-template-columns: 1fr 34px;
    }

    .pwa-install-action {
        grid-column: 1 / -1;
        width: 100%;
    }

    .pwa-install-close {
        grid-column: 2;
        grid-row: 1;
    }
}

img,
video,
iframe {
    max-width: 100%;
}

.captcha-box {
    min-width: 0;
    overflow: hidden;
}

.captcha-box .cf-turnstile {
    max-width: 100%;
}

.resend-form {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.resend-form button {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--blue-2);
    cursor: pointer;
    font-weight: 900;
}

.resend-form button:disabled {
    cursor: not-allowed;
    color: var(--muted);
    opacity: 0.78;
}

.media-title,
.media-card-body,
.library-card,
.library-card h3,
.profile-media-card h3,
.profile-share-card strong,
.conversation-row strong,
.conversation-row small,
.friend-mini-row strong,
.friend-mini-row small,
.friend-card strong,
.friend-card small,
.chat-head h1,
.chat-peer-card strong,
.account-hero-main h1,
.account-page-head h1,
.social-profile-main h1,
.profile-bio,
.admin-card h2,
.admin-table td,
.admin-table th {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.player-tabs,
.watch-actions,
.share-actions-grid,
.profile-actions,
.friend-card-actions,
.admin-actions-cell,
.admin-actions-row {
    min-width: 0;
}

.player-tabs {
    overflow-x: auto;
    scrollbar-width: none;
}

.player-tabs::-webkit-scrollbar {
    display: none;
}

.player-tabs button {
    white-space: nowrap;
}

.share-modal-panel,
.pwa-install-modal-panel {
    border-radius: 18px;
}

.story-preview-box p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

@media (max-width: 920px) {
    .page-shell,
    .site-header,
    .site-footer,
    .mobile-bottom-nav,
    .hero-carousel,
    .watch-hero,
    .catalog-hero,
    .search-hero-premium,
    .account-shell,
    .auth-layout,
    .messages-layout,
    .chat-shell,
    .social-profile-hero,
    .admin-shell,
    .admin-main,
    .admin-card,
    .share-modal-panel {
        max-width: 100%;
    }

    .watch-actions,
    .share-actions-grid,
    .profile-actions,
    .friend-card-actions,
    .admin-actions-cell,
    .admin-actions-row {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .watch-actions .button,
    .share-actions-grid .button,
    .profile-actions .button,
    .friend-card-actions .button,
    .admin-actions-cell a,
    .admin-actions-cell button,
    .admin-actions-row a,
    .admin-actions-row button {
        width: 100%;
        min-width: 0;
        justify-content: center;
        text-align: center;
    }

    .share-modal {
        padding: 10px;
        align-items: end;
    }

    .share-modal-panel {
        width: 100%;
        max-height: min(88dvh, 760px);
        padding: 16px;
        border-radius: 18px 18px 0 0;
    }

    .share-modal-head {
        align-items: center;
    }

    .story-preview-box {
        grid-template-columns: 1fr;
    }

    .story-preview-head,
    .story-preview-box .share-actions-grid,
    .story-fallback-text {
        grid-column: auto;
    }

    .story-preview-box iframe {
        grid-row: auto;
        width: min(280px, 100%);
        justify-self: center;
    }

    .messages-layout,
    .chat-shell {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .chat-side {
        order: 2;
    }

    .chat-panel {
        min-height: min(680px, calc(100dvh - var(--header-height) - var(--bottom-nav-height) - 44px));
        grid-template-rows: auto minmax(280px, 1fr) auto;
    }

    .chat-messages {
        padding: 14px;
    }

    .chat-message {
        max-width: 88%;
    }

    .chat-shared-card {
        min-width: 0;
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .chat-compose {
        position: sticky;
        bottom: 0;
        padding: 10px;
        background: rgba(8, 12, 24, 0.96);
    }

    .account-shell {
        grid-template-columns: 1fr;
    }

    .account-hero-main,
    .social-profile-main {
        align-items: flex-start;
    }

    .account-stat-grid,
    .profile-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-share-grid,
    .profile-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .friend-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .friend-card-actions {
        grid-column: 1 / -1;
    }

    .admin-shell {
        overflow-x: hidden;
    }

    .admin-topbar,
    .admin-card-head,
    .admin-edit-head {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-search-form,
    .admin-form,
    .admin-grid.two,
    .admin-stats,
    .admin-tmdb-grid,
    .admin-preview-grid,
    .admin-inline-form.compact,
    .admin-mini-grid {
        grid-template-columns: 1fr;
    }

    .admin-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 560px) {
    .page-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .auth-layout,
    .auth-layout.compact {
        gap: 12px;
    }

    .auth-visual,
    .premium-form,
    .account-hero-card,
    .account-page-head,
    .account-section,
    .account-form-card,
    .danger-card,
    .social-profile-hero {
        padding: 16px;
    }

    .auth-visual h1,
    .account-hero-main h1,
    .account-page-head h1,
    .social-profile-main h1,
    .watch-info h1 {
        font-size: clamp(30px, 9vw, 38px);
        line-height: 1;
    }

    .premium-form input,
    .premium-form textarea,
    .premium-form select {
        width: 100%;
        min-width: 0;
    }

    .captcha-box {
        display: grid;
        justify-items: start;
        transform-origin: left top;
    }

    .pwa-install-banner {
        gap: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .pwa-install-copy strong {
        font-size: 14px;
    }

    .pwa-install-copy span {
        font-size: 11px;
    }

    .pwa-install-modal-panel {
        padding: 22px 18px;
    }

    .pwa-install-modal-panel h2 {
        font-size: 26px;
    }

    .notification-dropdown {
        position: fixed;
        top: var(--header-height);
        right: 10px;
        left: 10px;
        width: auto;
        max-height: min(72dvh, 520px);
    }

    .notification-list {
        max-height: calc(min(72dvh, 520px) - 54px);
    }

    .watch-actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }

    .watch-actions .watch-icon-button,
    .watch-actions .instagram-avatar-button {
        width: 56px;
        min-width: 56px;
        height: 56px;
        min-height: 56px;
        flex: 0 0 56px;
        padding: 0;
    }

    .watch-actions .button-primary {
        flex: 1 1 180px;
    }

    .watch-actions .watched-button:not(.watch-icon-button) {
        flex: 0 0 52px;
    }

    .watch-actions .button:not(.button-primary):not(.watch-icon-button):not(.instagram-avatar-button) {
        width: auto;
        min-width: 0;
    }
}

@media (max-width: 380px) {
    .mobile-bottom-nav a {
        font-size: 9px;
    }

    .account-stat-grid,
    .profile-stat-grid,
    .profile-share-grid,
    .profile-media-grid {
        grid-template-columns: 1fr;
    }

    .chat-message {
        max-width: 94%;
    }
}


.tg-app {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 16px;
    height: calc(100dvh - var(--header-height) - 112px);
    min-height: 540px;
}

.tg-aside,
.tg-main {
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--glass);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.tg-aside {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.tg-aside-head {
    padding: 16px 16px 4px;
}

.tg-aside-head h1 {
    margin: 0;
    font-size: 22px;
}

.tg-search {
    padding: 8px 12px 10px;
}

.tg-search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 0 16px;
    outline: none;
    font-size: 14px;
}

.tg-search input:focus {
    border-color: rgba(85, 184, 255, 0.5);
}

.tg-conv-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px 12px;
}

.tg-conv {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.15s ease;
}

.tg-conv:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tg-conv.is-active {
    background: rgba(29, 124, 255, 0.16);
}

.tg-conv-avatar {
    display: block;
}

.tg-conv-avatar .account-avatar-letter {
    width: 48px;
    height: 48px;
    font-size: 19px;
}

.tg-conv-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.tg-conv-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.tg-conv-name {
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-conv-time {
    flex: 0 0 auto;
    color: var(--muted-2);
    font-size: 12px;
}

.tg-conv-last {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-conv.is-unread .tg-conv-name {
    color: #fff;
}

.tg-conv.is-unread .tg-conv-last {
    color: var(--text);
    font-weight: 700;
}

.tg-conv-badge {
    flex: 0 0 auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.tg-conv-empty {
    margin: 0;
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

.tg-aside-empty {
    display: grid;
    gap: 10px;
    justify-items: center;
    padding: 28px 18px;
    text-align: center;
    color: var(--muted);
}

.tg-aside-empty strong {
    color: var(--text);
    font-size: 16px;
}

.tg-main {
    display: flex;
}

.tg-thread {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100%;
    min-height: 0;
}

.tg-thread-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--glass-strong);
}

.tg-back {
    display: none;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 26px;
    line-height: 1;
}

.tg-peer {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.tg-peer .account-avatar-letter {
    width: 42px;
    height: 42px;
    font-size: 17px;
}

.tg-peer-info {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.tg-peer-info strong {
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-peer-info small {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-peer-action {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.tg-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 18px 16px;
    background:
        radial-gradient(circle at 18% 0%, rgba(29, 124, 255, 0.06), transparent 36%),
        radial-gradient(circle at 90% 100%, rgba(85, 184, 255, 0.05), transparent 40%);
}

.tg-thread-empty {
    margin: auto;
    color: var(--muted);
}

.tg-sep {
    align-self: center;
    margin: 6px 0;
}

.tg-sep span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(8, 13, 25, 0.7);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.tg-msg {
    max-width: min(68%, 560px);
    align-self: flex-start;
}

.tg-msg.is-mine {
    align-self: flex-end;
}

.tg-msg.is-grouped {
    margin-top: -6px;
}

.tg-bubble {
    display: grid;
    gap: 8px;
    padding: 9px 13px 7px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tg-msg:not(.is-mine) .tg-bubble {
    border-bottom-left-radius: 6px;
}

.tg-msg.is-mine .tg-bubble {
    border-color: rgba(85, 184, 255, 0.3);
    background: linear-gradient(135deg, rgba(29, 124, 255, 0.32), rgba(85, 184, 255, 0.24));
    border-bottom-right-radius: 6px;
}

.tg-msg.is-grouped:not(.is-mine) .tg-bubble {
    border-top-left-radius: 6px;
}

.tg-msg.is-grouped.is-mine .tg-bubble {
    border-top-right-radius: 6px;
}

.tg-text {
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tg-text a {
    color: var(--blue-2);
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.tg-time {
    justify-self: end;
    color: var(--muted-2);
    font-size: 11px;
    line-height: 1;
}

.tg-msg.is-mine .tg-time {
    color: rgba(233, 242, 255, 0.75);
}

.tg-share {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 200px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.28);
}

.tg-share img,
.tg-share-poster {
    width: 54px;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

.tg-share-info {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.tg-share-info small {
    color: var(--blue-2);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.tg-share-info strong {
    font-size: 14px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tg-share-info em {
    margin-top: 2px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}

.tg-jump {
    position: absolute;
    right: 16px;
    bottom: 86px;
    z-index: 4;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--glass-strong);
    color: #fff;
    padding: 9px 15px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.tg-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--glass-strong);
}

.tg-compose textarea {
    width: 100%;
    min-height: 44px;
    max-height: 140px;
    resize: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 11px 16px;
    outline: none;
    line-height: 1.4;
    font-size: 15px;
}

.tg-compose textarea:focus {
    border-color: rgba(85, 184, 255, 0.5);
}

.tg-send {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 16px;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.tg-send:disabled {
    opacity: 0.45;
    cursor: default;
}

.tg-send:not(:disabled):active {
    transform: scale(0.94);
}

.tg-empty {
    margin: auto;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    color: var(--muted);
}

.tg-empty-badge {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(29, 124, 255, 0.14);
    font-size: 34px;
}

.tg-empty strong {
    color: var(--text);
    font-size: 20px;
}

.tg-conv-support {
    background: rgba(29, 124, 255, 0.08);
    margin-bottom: 6px;
}

.tg-conv-support:hover {
    background: rgba(29, 124, 255, 0.14);
}

.tg-conv-support.is-active {
    background: rgba(29, 124, 255, 0.2);
}

.tg-conv-support-ava {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(140deg, #2f7bf6, #6aa8ff);
    color: #fff;
    font-size: 20px;
}

.tg-conv-support-online {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #3ddc84;
    font-size: 12px;
    font-weight: 700;
}

.tg-conv-support-dot {
    background: #3ddc84;
    color: transparent;
    min-width: 10px;
    width: 10px;
    height: 10px;
    padding: 0;
}

.tg-conv-support .tg-conv-last {
    color: var(--muted);
}

.tg-support-peer .tg-conv-support-ava {
    width: 42px;
    height: 42px;
    font-size: 17px;
}

.tg-support-peer .tg-peer-info small {
    color: #3ddc84;
}

.tg-support-sys {
    align-self: center;
    max-width: 90%;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 14px;
}

.tg-support-photo {
    display: block;
}

.tg-support-photo img {
    display: block;
    max-width: min(220px, 60vw);
    max-height: 240px;
    border-radius: 10px;
    object-fit: cover;
}

.tg-support-thread .tg-compose {
    display: flex;
    align-items: flex-end;
}

.tg-support-thread .tg-compose textarea {
    flex: 1 1 auto;
}

.tg-support-attach {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.tg-support-attach:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.tg-support-allow {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.tg-aside-empty-soft {
    padding: 20px 18px;
}

@media (max-width: 920px) {
    body.chat-app .page-shell {
        padding: var(--header-height) 0 0;
    }

    .tg-app {
        grid-template-columns: 1fr;
        gap: 0;
        height: calc(100dvh - var(--header-height));
        min-height: 0;
    }

    .tg-aside,
    .tg-main {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }

    .tg-app[data-view="list"] .tg-main {
        display: none;
    }

    .tg-app[data-view="thread"] .tg-aside {
        display: none;
    }

    .tg-conv-list {
        padding-bottom: calc(var(--bottom-nav-height) + 28px + env(safe-area-inset-bottom));
    }

    .tg-back {
        display: grid;
    }

    .tg-peer-action {
        display: none;
    }

    .tg-msg {
        max-width: 84%;
    }

    .tg-compose {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .tg-jump {
        bottom: calc(88px + env(safe-area-inset-bottom));
    }
}

body.tg-thread-open .mobile-bottom-nav {
    display: none;
}

body.chat-app .site-footer {
    display: none;
}

@media (max-width: 920px) {
    body.tg-thread-open .site-header {
        display: none;
    }

    body.tg-thread-open .page-shell {
        padding-top: 0;
    }

    body.tg-thread-open .tg-app {
        height: 100dvh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-conv,
    .tg-send {
        transition: none;
    }
}

.mobile-only-nav {
    display: none;
}

.mobile-bottom-nav a {
    position: relative;
}

.bottom-nav-badge {
    position: absolute;
    top: 3px;
    right: 14px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-style: normal;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

@media (max-width: 920px) {
    .mobile-only-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-top: 10px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 768px) {
    .mobile-only-nav {
        display: none;
    }
}

.ym-informer,
.ym-advanced-informer,
a[href*="metrika.yandex.ru/stat"],
a[href*="metrika.yandex.com/stat"],
img[src*="informer.yandex.ru"],
img[src*="informer.yandex.com"],
iframe[src*="informer.yandex"],
iframe[src*="metrika.yandex"],
[id^="yandex_metrika"],
[id^="ym-informer"] {
    display: none !important;
}


.pf-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(13, 22, 44, 0.92), rgba(5, 8, 17, 0.86));
    box-shadow: var(--shadow);
}

.pf-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 8%, rgba(85, 184, 255, 0.22), transparent 40%),
        radial-gradient(circle at 92% 0%, rgba(255, 35, 63, 0.12), transparent 42%);
}

.pf-hero-top {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
}

.pf-avatar {
    flex: 0 0 auto;
    position: relative;
    border-radius: 999px;
    padding: 4px;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 0 38px rgba(85, 184, 255, 0.45);
}

.pf-avatar .account-avatar-letter {
    width: 116px;
    height: 116px;
    font-size: 46px;
    border: 3px solid rgba(5, 8, 17, 0.85);
}

.pf-identity {
    min-width: 0;
}

.pf-identity h1 {
    margin: 6px 0 2px;
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.pf-handle {
    margin: 0;
    color: var(--blue-2);
    font-weight: 800;
}

.pf-bio {
    max-width: 640px;
    margin: 12px 0 0;
    color: rgba(245, 248, 255, 0.86);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.pf-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.pf-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.pf-chip-rank {
    border-color: rgba(85, 184, 255, 0.4);
    background: rgba(29, 124, 255, 0.16);
    color: #dcecff;
}

.pf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.pf-action-block {
    margin-left: auto;
}

.pf-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.pf-stat {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 16px 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.pf-stat-icon {
    font-size: 18px;
    color: var(--blue-2);
}

.pf-stat strong {
    font-size: 26px;
    line-height: 1.1;
}

.pf-stat small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.pf-rank {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--glass);
}

.pf-rank-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pf-rank-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(29, 124, 255, 0.3);
}

.pf-rank-title {
    min-width: 0;
}

.pf-rank-title strong {
    display: block;
    font-size: 17px;
}

.pf-rank-title small {
    color: var(--muted);
    font-size: 13px;
}

.pf-rank-next {
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.pf-progress {
    margin-top: 14px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.pf-progress i {
    display: block;
    height: 100%;
    width: var(--pf-progress, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue), var(--blue-2));
    transition: width 0.5s ease;
}

.pf-tabs {
    display: flex;
    gap: 8px;
    margin: 22px 0 16px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.pf-tabs::-webkit-scrollbar {
    display: none;
}

.pf-tab {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pf-tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    box-shadow: 0 10px 26px rgba(29, 124, 255, 0.26);
}

body.pf-js .pf-panel {
    display: none;
}

body.pf-js .pf-panel.is-active {
    display: block;
}

.pf-section + .pf-section {
    margin-top: 22px;
}

.pf-section-head {
    margin-bottom: 12px;
}

.pf-section-head h2 {
    margin: 0;
    font-size: 19px;
}

.pf-friends {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.pf-friend {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.pf-friend-avatar .account-avatar-letter {
    width: 46px;
    height: 46px;
    font-size: 18px;
}

.pf-friend-info {
    min-width: 0;
}

.pf-friend-info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-friend-info small {
    color: var(--muted);
    font-size: 12px;
}

.pf-friend-open {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 14px;
}

.pf-private {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 48px 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--glass);
    text-align: center;
}

.pf-private-icon {
    font-size: 40px;
}

.pf-private strong {
    font-size: 20px;
}

.pf-private span,
.pf-empty span {
    color: var(--muted);
}

.pf-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 36px 18px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    text-align: center;
}

.pf-empty-icon {
    font-size: 30px;
    opacity: 0.85;
}

.pf-empty strong {
    font-size: 16px;
}

@media (hover: hover) {
    .pf-stat:hover,
    .pf-friend:hover {
        transform: translateY(-3px);
        border-color: var(--border-strong);
    }
}

@media (max-width: 720px) {
    .pf-hero {
        padding: 18px;
    }

    .pf-hero-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .pf-avatar .account-avatar-letter {
        width: 92px;
        height: 92px;
        font-size: 36px;
    }

    .pf-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pf-action-block {
        margin-left: 0;
    }

    .pf-rank-next {
        margin-left: 0;
        width: 100%;
    }

    .pf-panel .profile-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pf-panel .profile-share-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pf-friends {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf-stat,
    .pf-friend,
    .pf-progress i,
    .pf-tab {
        transition: none;
    }
}

.reaction-friends {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.reaction-friends-label {
    color: var(--muted);
    font-weight: 800;
}

.reaction-friends-avatars {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.reaction-friend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue-2);
    font-weight: 800;
}

.reaction-friend .account-avatar-letter {
    width: 26px;
    height: 26px;
    font-size: 11px;
}

.reaction-friends-more {
    color: var(--muted);
    font-weight: 700;
}


.admin-sidebar {
    gap: 16px;
}

.admin-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    gap: 14px;
    padding-right: 2px;
}

.admin-nav-group {
    display: grid;
    gap: 4px;
}

.admin-nav-label {
    margin: 4px 0 2px;
    padding: 0 12px;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-nav a {
    position: relative;
    min-height: 40px;
}

.admin-nav a.is-active {
    border-color: rgba(85, 184, 255, 0.32);
    background: rgba(29, 124, 255, 0.16);
    color: #fff;
}

.admin-nav a.is-active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), var(--blue-2));
}

.admin-topbar-title {
    min-width: 0;
}

.admin-topbar-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 800;
}

.admin-topbar-link:hover {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.06);
}

.admin-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.admin-menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
}

.admin-nav-scrim {
    display: none;
}

.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 920px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        z-index: 95;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 86vw);
        height: 100dvh;
        padding: 20px 18px;
        border-right: 1px solid var(--border);
        border-bottom: 0;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform 0.24s ease;
    }

    .admin-nav {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        overflow-x: hidden;
    }

    .admin-shell.is-nav-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-nav-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 90;
        border: 0;
        background: rgba(2, 5, 12, 0.6);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease;
    }

    .admin-shell.is-nav-open .admin-nav-scrim {
        opacity: 1;
        visibility: visible;
    }

    .admin-menu-toggle {
        display: inline-flex;
    }

    .admin-main {
        padding: 16px 14px;
    }

    .admin-topbar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .admin-topbar-title {
        flex: 1 1 auto;
    }

    .admin-topbar h1 {
        font-size: 24px;
    }

    .admin-user {
        flex: 1 1 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-grid.two {
        grid-template-columns: 1fr;
    }

    .admin-table {
        min-width: 560px;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-user-name {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-sidebar,
    .admin-nav-scrim {
        transition: none;
    }
}

@media (max-width: 920px) {
    .player-tabs {
        display: flex;
        flex-wrap: nowrap;
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .player-tabs::-webkit-scrollbar {
        display: none;
    }

    .player-tabs button {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

@media (max-width: 920px) {
    .watch-hero,
    .hero-carousel,
    .catalog-hero,
    .search-hero-premium,
    .quick-categories,
    .media-rail,
    .genre-rail,
    .cast-rail,
    .home-page .media-rail,
    .home-page .genre-rail {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }

    .player-card {
        width: auto;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0;
    color: var(--muted-2);
    font-size: 13px;
    font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.button-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: #1f2330;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.button-google:hover {
    background: #eef1f6;
    color: #1f2330;
}

.button-google .google-g {
    flex: 0 0 auto;
}

.wr-app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.wr-stage {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.wr-stage-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.wr-stage-head h1 {
    margin: 4px 0 0;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.05;
}

.wr-ep {
    margin: 6px 0 0;
    color: var(--muted);
}

.wr-sync {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--glass);
}

.wr-sync-clock {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.wr-sync-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.wr-sync-clock strong {
    font-size: 26px;
    font-variant-numeric: tabular-nums;
}

.wr-sync-state {
    color: var(--blue-2);
    font-size: 13px;
    font-weight: 800;
}

.wr-sync-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wr-sync-controls .button {
    min-height: 40px;
}

.wr-sync-hint {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.wr-side {
    display: grid;
    gap: 14px;
    align-content: start;
    position: sticky;
    top: calc(var(--header-height) + 14px);
}

.wr-invite,
.wr-members-block,
.wr-voice {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--glass);
}

.wr-voice.is-active {
    border-color: rgba(85, 184, 255, 0.36);
    background: linear-gradient(180deg, rgba(29, 124, 255, 0.1), var(--glass));
}

.wr-voice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wr-voice-status {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.wr-voice-controls {
    display: grid;
    gap: 8px;
}

.wr-voice-join {
    width: 100%;
}

.wr-voice-list {
    display: grid;
    gap: 6px;
}

.wr-voice-list:empty {
    display: none;
}

.wr-voice-person {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
    font-weight: 700;
}

.wr-voice-person .wr-av {
    width: 30px;
    height: 30px;
    font-size: 13px;
    transition: box-shadow 0.12s ease;
}

.wr-voice-person.is-speaking {
    border-color: rgba(0, 224, 84, 0.5);
}

.wr-voice-person.is-speaking .wr-av {
    box-shadow: 0 0 0 2px rgba(0, 224, 84, 0.85);
}

.wr-voice-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wr-voice-mic {
    flex: 0 0 auto;
    font-size: 14px;
}

.wr-voice-person.is-muted {
    opacity: 0.72;
}

.wr-voice-empty,
.wr-voice-note {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.wr-invite > span,
.wr-side-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.wr-side-label em {
    font-style: normal;
    color: var(--text);
}

.wr-invite-row {
    display: flex;
    gap: 8px;
}

.wr-invite-row input {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 0 12px;
    font-size: 13px;
}

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

.wr-member {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
    font-weight: 700;
}

.wr-member-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wr-av {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c, #1d7cff), rgba(3, 5, 11, 0.45));
    color: #fff;
    font-weight: 900;
    font-size: 14px;
}

.wr-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wr-chat {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 440px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--glass);
    overflow: hidden;
}

.wr-messages {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
}

.wr-empty {
    margin: auto;
    color: var(--muted);
}

.wr-msg {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
}

.wr-msg .wr-av {
    width: 36px;
    height: 36px;
}

.wr-msg-main {
    min-width: 0;
}

.wr-msg-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.wr-msg-name {
    font-weight: 800;
    font-size: 14px;
}

.wr-msg-time {
    color: var(--muted-2);
    font-size: 11px;
}

.wr-msg-body {
    margin: 2px 0 0;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wr-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: var(--glass-strong);
}

.wr-compose textarea {
    width: 100%;
    min-height: 42px;
    max-height: 120px;
    resize: none;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 10px 14px;
    outline: none;
}

.wr-send {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.wr-send:disabled {
    opacity: 0.45;
    cursor: default;
}

.watch-room-create {
    display: contents;
}

@media (max-width: 980px) {
    .wr-app {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .watch-room-page .page-shell {
        padding-bottom: calc(var(--bottom-nav-height, 64px) + 20px + env(safe-area-inset-bottom));
    }

    .wr-side {
        position: static;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .wr-chat {
        order: -1;
        height: 46vh;
        min-height: 260px;
        max-height: 440px;
    }

    .wr-invite-row {
        flex-direction: column;
        align-items: stretch;
    }

    .wr-invite-row input,
    .wr-invite-row .button {
        flex: 0 0 auto;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .watch-room-page .page-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .wr-stage {
        gap: 12px;
    }

    .wr-stage-head .button {
        width: 100%;
    }

    .wr-invite,
    .wr-members-block,
    .wr-voice {
        padding: 12px;
    }

    .wr-sync-top {
        padding: 14px 16px;
    }

    .wr-sync-top .wr-sync-clock strong {
        font-size: clamp(28px, 9vw, 38px);
    }
}

.promo-section {
    margin-top: 8px;
}

.promo-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.promo-track {
    display: flex;
    transition: transform 0.45s ease;
}

.promo-slide {
    position: relative;
    flex: 0 0 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 36px 44px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(120deg, var(--promo-from, #3a1c71), var(--promo-to, #7b2ff7));
}

.promo-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    z-index: 0;
}

.promo-content {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    max-width: 46%;
    min-width: 0;
}

.promo-label {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.promo-title {
    margin: 12px 0 0;
    font-size: clamp(22px, 3.1vw, 38px);
    line-height: 1.06;
    overflow-wrap: anywhere;
}

.promo-subtitle {
    max-width: 460px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.5;
}

.promo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 26px;
    border-radius: 999px;
    background: #ffffff;
    color: #1c1830;
    font-weight: 900;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    transition: transform 0.12s ease;
}

.promo-btn:hover {
    transform: translateY(-2px);
    color: #1c1830;
}

.promo-btn-pos {
    position: absolute;
    z-index: 3;
}

.promo-btn-top-right { top: 18px; right: 20px; }
.promo-btn-bottom-right { bottom: 18px; right: 20px; }
.promo-btn-bottom-left { bottom: 18px; left: 44px; }
.promo-btn-center { bottom: 18px; left: 50%; transform: translateX(-50%); }
.promo-btn-center:hover { transform: translateX(-50%) translateY(-2px); }

.promo-art {
    position: absolute;
    right: 2%;
    bottom: 0;
    height: 116%;
    max-height: 340px;
    width: auto;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}

.promo-code {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 16px 26px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.promo-code span {
    padding: 3px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 13px;
    font-weight: 800;
}

.promo-code strong {
    font-size: clamp(19px, 2.3vw, 28px);
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.promo-dots {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 4;
    display: flex;
    gap: 6px;
}

.promo-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.promo-dot.is-active {
    width: 26px;
    background: #fff;
}

.promo-arrow {
    position: absolute;
    bottom: 16px;
    z-index: 4;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.promo-prev { right: 70px; }
.promo-next { right: 20px; }

@media (max-width: 720px) {
    .promo-slide {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 22px 20px;
        min-height: 200px;
    }

    .promo-content {
        max-width: 62%;
    }

    .promo-title {
        font-size: 22px;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    }

    .promo-subtitle {
        max-width: 100%;
        font-size: 13px;
    }

    .promo-code {
        max-width: 62%;
        padding: 12px 18px;
    }

    .promo-code strong {
        font-size: 22px;
    }

    .promo-art {
        right: 0;
        max-height: 210px;
        opacity: 1;
    }

    .promo-btn {
        min-height: 46px;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .promo-content {
        max-width: 56%;
    }

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

    .promo-subtitle {
        font-size: 12.5px;
    }

    .promo-art {
        right: 0;
        max-height: 184px;
        opacity: 1;
    }
}

@media (max-width: 380px) {
    .promo-content {
        max-width: 50%;
    }

    .promo-code {
        max-width: 54%;
    }

    .promo-art {
        max-height: 156px;
    }
}

.wr-sync-top {
    padding: 18px 22px;
    border-color: rgba(85, 184, 255, 0.34);
    background: linear-gradient(135deg, rgba(29, 124, 255, 0.18), var(--glass));
    box-shadow: 0 16px 38px rgba(29, 124, 255, 0.14);
}

.wr-sync-top .wr-sync-label {
    font-size: 14px;
}

.wr-sync-top .wr-sync-clock strong {
    font-size: clamp(30px, 5vw, 44px);
}

.wr-sync-top .wr-sync-state {
    font-size: 14px;
}

.wr-sync-top .wr-sync-controls .button {
    min-height: 48px;
    padding: 0 20px;
    font-size: 15px;
}

@media (max-width: 560px) {
    .wr-sync-top {
        flex-direction: column;
        align-items: stretch;
    }

    .wr-sync-top .wr-sync-controls {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

.google-signin {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-top: 4px;
    min-height: 44px;
}

.google-signin [data-google-btn] {
    max-width: 100%;
    overflow: hidden;
}

.telegram-login {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-top: 8px;
    min-height: 44px;
}

.telegram-login iframe {
    max-width: 100%;
}

.tg-linked {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 12px;
}

.tg-linked__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.tg-linked__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tg-linked__info a {
    color: #2aabee;
    font-weight: 600;
    text-decoration: none;
}

.tg-linked__info a:hover {
    text-decoration: underline;
}

.wr-invite-tg {
    margin-top: 8px;
    width: 100%;
}

.wr-invite .wr-invite-tg.button {
    background: #2aabee;
    border-color: #2aabee;
    color: #fff;
}

.wr-invite .wr-invite-tg.button:hover {
    background: #1d97d6;
    border-color: #1d97d6;
    color: #fff;
}


.account-page .account-sidebar,
.account-page .account-form-card,
.account-page .danger-card {
    background: var(--surface);
    box-shadow: none;
    backdrop-filter: none;
    border-color: var(--border);
    border-radius: 16px;
}

.account-page .account-hero-card,
.account-page .account-page-head,
.account-page .account-section {
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
}

.account-page .settings-shortcut {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 16px;
    padding: 26px 28px;
}

.account-page .account-shell {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 36px;
}

.account-page .account-content {
    gap: 28px;
}

.account-page .account-sidebar {
    padding: 14px;
    gap: 10px;
}

.account-page .account-nav a,
.account-page .account-logout-form button {
    font-weight: 500;
    border-radius: 10px;
    border-left: 2px solid transparent;
}

.account-page .account-nav a:hover,
.account-page .account-nav a.is-active {
    transform: none;
    border-color: transparent;
    border-left-color: var(--blue-2);
    background: rgba(85, 184, 255, 0.10);
}

.account-page .account-hero-card {
    gap: 26px;
    padding: 0;
    background: transparent;
}

.account-page .account-hero-main {
    gap: 22px;
}

.account-page .account-hero-main h1,
.account-page .account-page-head h1 {
    font-size: 32px;
    font-weight: 680;
    letter-spacing: -0.01em;
}

.account-page .account-hero-main p {
    color: var(--muted);
}

.account-page .account-badges {
    gap: 8px 16px;
    align-items: center;
}

.account-page .account-badges span,
.account-page .account-badges a {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 500;
}

.account-page .account-badges a {
    color: var(--blue-2);
}

.account-page .account-badges .is-good {
    color: var(--green);
}

.account-page .account-stat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    overflow: hidden;
}

.account-page .account-stat-grid a {
    min-height: 0;
    gap: 6px;
    padding: 18px 16px;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}

.account-page .account-stat-grid a:first-child {
    border-left: 0;
}

.account-page .account-stat-grid a:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
}

.account-page .account-stat-grid strong {
    order: 1;
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.account-page .account-stat-grid span {
    order: 2;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.account-page .rank-card {
    display: grid;
    gap: 12px;
    margin-top: 0;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: none;
}

.account-page .rank-card .rank-level {
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.account-page .rank-card .rank-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.account-page .rank-card .rank-row strong {
    font-size: 16px;
    font-weight: 600;
}

.account-page .rank-card .rank-row em {
    font-style: normal;
    color: var(--muted);
    font-size: 13.5px;
    white-space: nowrap;
}

.account-page .rank-card .rank-progress {
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.account-page .rank-card .rank-progress span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--blue-2);
}

.account-page .rank-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.account-page .account-section {
    padding: 0;
    gap: 16px;
}

.account-page .account-section-head h2,
.account-page .danger-card h2 {
    font-size: 21px;
    font-weight: 620;
}

.account-page .account-section-head > a {
    color: var(--blue-2);
    font-weight: 550;
}

.account-page .account-form-card {
    padding: 30px;
}

.account-page .form-heading h2 {
    font-size: 19px;
    font-weight: 620;
}

.account-page .settings-shortcut h2 {
    font-size: 19px;
}

.profile-page .pf-hero {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.profile-page .pf-hero-bg {
    display: none;
}

.profile-page .pf-hero-top {
    gap: 26px;
    align-items: flex-start;
}

.profile-page .pf-avatar {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.profile-page .pf-avatar .account-avatar-letter {
    width: 112px;
    height: 112px;
    font-size: 44px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--avatar-color) 45%, #0c111c);
    box-shadow: none;
}

.profile-page .pf-identity h1 {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 680;
    letter-spacing: -0.01em;
}

.profile-page .pf-handle {
    color: var(--muted);
    font-weight: 500;
}

.profile-page .pf-bio {
    color: #c3cad6;
}

.account-page .button,
.profile-page .button {
    min-height: 44px;
    border-radius: 11px;
    font-weight: 600;
    box-shadow: none;
    text-shadow: none;
}

.account-page .button:hover,
.profile-page .button:hover {
    transform: none;
}

.account-page .button-primary,
.profile-page .button-primary {
    background: #4f9dff;
    border-color: #4f9dff;
    color: #04101f;
}

.account-page .button-primary::before,
.profile-page .button-primary::before {
    content: none;
}

.account-page .button-primary:hover,
.profile-page .button-primary:hover {
    background: #6aacff;
    border-color: #6aacff;
}

.account-page .button-subtle,
.profile-page .button-subtle {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text);
    font-weight: 550;
}

.account-page .button-subtle:hover,
.profile-page .button-subtle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.28);
}

.account-page .account-avatar-letter,
.profile-page .pf-avatar .account-avatar-letter {
    background: color-mix(in srgb, var(--avatar-color) 45%, #0c111c);
    box-shadow: none;
}

.profile-page .pf-meta {
    gap: 0;
    align-items: center;
    color: var(--muted);
    font-size: 13.5px;
}

.profile-page .pf-chip,
.profile-page .pf-chip-rank {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 500;
}

.profile-page .pf-chip + .pf-chip::before {
    content: "·";
    margin: 0 10px;
    color: var(--muted-2);
}

.profile-page .pf-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 22px;
}

.profile-page .pf-stat {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.profile-page .pf-stat-icon {
    display: none;
}

.profile-page .pf-stat strong {
    display: block;
    font-size: 24px;
    font-weight: 650;
}

.profile-page .pf-stat small {
    color: var(--muted);
    font-weight: 500;
}

.profile-page .pf-rank {
    margin-top: 28px;
    padding: 22px 24px;
    border-radius: 16px;
    background: var(--surface);
}

.profile-page .pf-rank-badge {
    background: rgba(85, 184, 255, 0.12);
    color: var(--blue-2);
    font-weight: 600;
    box-shadow: none;
}

.profile-page .pf-rank-title strong {
    font-weight: 600;
}

.profile-page .pf-rank-title small,
.profile-page .pf-rank-next {
    font-weight: 500;
}

.profile-page .pf-progress i {
    background: var(--blue-2);
}

.profile-page .pf-tabs {
    gap: 28px;
    margin: 28px 0 20px;
    padding-bottom: 0;
    border-bottom: 1px solid var(--border);
}

.profile-page .pf-tab {
    min-height: 0;
    padding: 0 0 14px;
    border: 0;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    color: var(--muted);
    font-weight: 550;
}

.profile-page .pf-tab.is-active {
    background: transparent;
    box-shadow: none;
    color: var(--text);
    border-bottom-color: var(--blue-2);
}

.profile-page .pf-section-head h2 {
    font-size: 20px;
    font-weight: 620;
}

.profile-page .pf-friend {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.profile-page .pf-friend:hover {
    transform: none;
    border-color: var(--border-strong);
}

.profile-page .pf-private,
.profile-page .pf-empty {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
}

.profile-page .pf-private-icon,
.profile-page .pf-empty-icon {
    display: none;
}

.profile-page .profile-media-card,
.profile-page .profile-share-card a {
    background: rgba(255, 255, 255, 0.02);
    box-shadow: none;
    border-radius: 12px;
}

.profile-page .profile-media-card span,
.profile-page .profile-share-card span {
    color: var(--muted);
    font-weight: 600;
}

@media (max-width: 860px) {
    .account-page .account-shell {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .account-page .account-sidebar {
        position: static;
    }

    .account-page .account-form-card {
        padding: 22px;
    }

    .account-page .account-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        border: 0;
        border-radius: 0;
        overflow: visible;
    }

    .account-page .account-stat-grid a {
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 14px 10px;
    }

    .profile-page .pf-stats {
        gap: 22px 28px;
    }
}

.watchlist-button .watchlist-icon {
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
}
.watchlist-button.is-active {
    color: #4f9dff;
    border-color: rgba(79, 157, 255, 0.45);
    background: rgba(79, 157, 255, 0.12);
}
.watchlist-button.is-error {
    border-color: rgba(255, 107, 129, 0.6);
}

.catalog-filters .filter-genres > span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}
.catalog-filters .filter-genres > span small {
    color: var(--muted-2);
    font-weight: 400;
}
.catalog-genre-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 184px;
    overflow: auto;
}
.catalog-genre-checks .genre-check {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    color: var(--muted);
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.catalog-genre-checks .genre-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.catalog-genre-checks .genre-check.is-on,
.catalog-genre-checks .genre-check:has(input:checked) {
    border-color: rgba(85, 184, 255, 0.5);
    background: rgba(29, 124, 255, 0.14);
    color: #dce9ff;
}

.watch-trailer-button {
    gap: 8px;
    width: auto;
    padding: 0 16px;
}
.trailer-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.trailer-modal[hidden] {
    display: none;
}
.trailer-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}
.trailer-modal-box {
    position: relative;
    width: min(980px, 100%);
}
.trailer-modal-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.trailer-modal-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.trailer-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.trailer-modal-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.player-fallback {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13.5px;
}
.player-fallback .button {
    min-height: 38px;
    padding: 0 14px;
}
@media (max-width: 600px) {
    .player-fallback {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .player-fallback .button {
        width: 100%;
    }
}

.account-content { min-width: 0; }
.settings2 { display: grid; gap: 22px; min-width: 0; }
.settings2 .s2-card, .settings2 .s2-row > form { min-width: 0; }

.settings2 .s2-hero h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.settings2 .s2-hero p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.settings2 .s2-card { background: var(--glass); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.settings2 .s2-card--danger { border-color: rgba(255, 35, 63, 0.32); }
.settings2 .s2-card__head { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.settings2 .s2-card__head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.settings2 .s2-card__head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.settings2 .s2-card__body { padding: 22px 24px; display: grid; gap: 18px; }
.settings2 .s2-card__foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

.settings2 .s2-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }

.settings2 .s2-field { display: grid; gap: 8px; }
.settings2 .s2-field > label { font-size: 13px; font-weight: 600; color: var(--muted); }
.settings2 .form-info { margin: 0; font-size: 13px; color: var(--muted); }

.settings2 input[type="text"], .settings2 input[type="email"], .settings2 input[type="password"],
.settings2 input[type="number"], .settings2 textarea, .settings2 select {
    width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.03); color: var(--text); font: inherit; box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.settings2 textarea { resize: vertical; min-height: 92px; }
.settings2 input:focus, .settings2 textarea:focus, .settings2 select:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 124, 255, 0.25);
}
.settings2 select {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239ca3af' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}

.settings2 .s2-avatar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.settings2 .s2-avatar .account-avatar-letter { width: 64px; height: 64px; min-width: 64px; font-size: 26px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.settings2 .s2-avatar .s2-avatar__meta { display: grid; gap: 2px; }
.settings2 .s2-avatar .s2-avatar__meta strong { font-size: 15px; }
.settings2 .s2-avatar .s2-avatar__meta small { color: var(--muted); font-size: 12px; }
.settings2 .s2-avatar .s2-avatar__act { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.settings2 .s2-file { position: relative; overflow: hidden; cursor: pointer; }
.settings2 .s2-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.settings2 .s2-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.settings2 .s2-swatches label { width: 30px; height: 30px; cursor: pointer; position: relative; }
.settings2 .s2-swatches input { position: absolute; opacity: 0; }
.settings2 .s2-swatches label > span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--avatar-color); box-shadow: 0 0 0 2px var(--bg), 0 0 0 2px transparent; }
.settings2 .s2-swatches input:checked + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--blue); }

.settings2 .s2-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, 0.02); cursor: pointer; }
.settings2 .s2-switch .txt { font-size: 14px; min-width: 0; }
.settings2 .s2-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.settings2 .s2-switch .track { width: 44px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); position: relative; transition: background 0.15s; flex: 0 0 auto; }
.settings2 .s2-switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.settings2 .s2-switch input:checked + .track { background: var(--blue); }
.settings2 .s2-switch input:checked + .track::after { transform: translateX(18px); }

.settings2 .s2-tg { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: rgba(61, 220, 132, 0.08); border: 1px solid rgba(61, 220, 132, 0.3); flex-wrap: wrap; }
.settings2 .s2-tg strong { font-size: 14px; }
.settings2 .s2-tg a { color: var(--blue-2); text-decoration: none; font-weight: 600; }

.settings2 .s2-danger { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.settings2 .s2-danger strong { font-size: 15px; }
.settings2 .s2-danger .t { font-size: 13px; color: var(--muted); max-width: 560px; margin: 6px 0 0; }
.settings2 .button-danger { background: rgba(255, 35, 63, 0.14); color: #ff6b7e; border: 1px solid rgba(255, 35, 63, 0.4); }
.settings2 .button-danger:hover { background: rgba(255, 35, 63, 0.22); }

@media (max-width: 900px) {
    .settings2 .s2-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .settings2 .s2-hero h1 { font-size: 24px; }
    .settings2 .s2-card__body, .settings2 .s2-card__head, .settings2 .s2-card__foot { padding-left: 16px; padding-right: 16px; }
    .settings2 .s2-avatar .s2-avatar__act { margin-left: 0; width: 100%; }
}

.person-shell { display: grid; gap: 28px; }
.person-hero { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.person-photo { width: 180px; height: 270px; border-radius: 16px; object-fit: cover; flex: 0 0 auto; box-shadow: var(--shadow); background: var(--surface); }
.person-photo--empty { display: grid; place-items: center; font-size: 64px; font-weight: 800; color: var(--muted-2); border: 1px solid var(--border); }
.person-info { flex: 1; min-width: 260px; }
.person-info h1 { margin: 8px 0 0; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.person-meta { margin-top: 12px; color: var(--muted); font-size: 14px; }
.person-bio { margin-top: 16px; color: var(--muted); line-height: 1.7; max-width: 760px; }
.person-empty { color: var(--muted); }
.cast-card-link { display: block; color: inherit; text-decoration: none; }
.cast-card-link:hover strong { color: var(--blue-2); }
.collection-callout { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 14px; border: 1px solid var(--border-strong); background: linear-gradient(135deg, rgba(29, 124, 255, 0.12), rgba(255, 255, 255, 0.03)); text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.collection-callout:hover { border-color: var(--blue); transform: translateY(-1px); }
.collection-callout__icon { font-size: 28px; flex: 0 0 auto; }
.collection-callout__text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.collection-callout__text small { color: var(--muted); font-size: 12px; }
.collection-callout__text strong { font-size: 17px; }
.collection-callout__arrow { color: var(--blue-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
@media (max-width: 600px) { .collection-callout__arrow { display: none; } }

.roulette { max-width: 920px; margin: 0 auto; display: grid; gap: 24px; }
.roulette-head { text-align: center; }
.roulette-head h1 { margin: 8px 0 0; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.roulette-head p { margin: 8px 0 0; color: var(--muted); }
.roulette-filters { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.roulette-filters select { padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.03); color: var(--text); font: inherit; appearance: none; -webkit-appearance: none; cursor: pointer; }
.roulette-card { display: flex; gap: 24px; padding: 22px; border: 1px solid var(--border); border-radius: 18px; background: var(--glass); }
.roulette-poster { flex: 0 0 200px; width: 200px; border-radius: 12px; overflow: hidden; background: var(--surface); aspect-ratio: 2 / 3; display: block; }
.roulette-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.roulette-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.roulette-info h2 { margin: 0; font-size: 26px; font-weight: 800; }
.roulette-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.roulette-overview { color: var(--muted); line-height: 1.7; margin: 0; }
.roulette-actions { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) {
    .roulette-card { flex-direction: column; align-items: center; text-align: center; }
    .roulette-poster { flex-basis: auto; }
    .roulette-actions, .roulette-meta { justify-content: center; }
}

.feed-list { display: grid; gap: 12px; }
.feed-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--glass); }
.feed-ava { flex: 0 0 auto; }
.feed-ava .account-avatar-letter { width: 44px; height: 44px; min-width: 44px; font-size: 18px; border-radius: 50%; object-fit: cover; }
.feed-body { flex: 1; min-width: 0; }
.feed-text { margin: 0; line-height: 1.5; }
.feed-name { font-weight: 700; color: var(--text); text-decoration: none; }
.feed-name:hover { color: var(--blue-2); }
.feed-text span { color: var(--muted); }
.feed-title { color: var(--blue-2); text-decoration: none; font-weight: 600; }
.feed-title:hover { text-decoration: underline; }
.feed-time { font-size: 12px; color: var(--muted-2); }
.feed-poster { flex: 0 0 auto; width: 46px; height: 68px; border-radius: 8px; overflow: hidden; background: var(--surface); display: block; }
.feed-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) { .feed-poster { display: none; } }

.lists-create { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--glass); margin-bottom: 20px; }
.lists-create input[type="text"] { flex: 1; min-width: 220px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.03); color: var(--text); font: inherit; }
.lists-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.list-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--glass); }
.list-card-main { text-decoration: none; color: inherit; display: grid; gap: 4px; min-width: 0; flex: 1; }
.list-card-main strong { font-size: 16px; }
.list-card-main span { color: var(--muted); font-size: 13px; }
.list-card-main:hover strong { color: var(--blue-2); }
.list-item-wrap { position: relative; }
.list-item-remove { position: absolute; top: 8px; left: 8px; z-index: 3; margin: 0; }
.list-item-remove button { width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.62); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.list-item-remove button:hover { background: var(--red); }
.watch-addlist { position: relative; display: inline-block; }
.watch-addlist > summary { list-style: none; cursor: pointer; }
.watch-addlist > summary::-webkit-details-marker { display: none; }
.watch-addlist-menu { position: absolute; z-index: 30; bottom: calc(100% + 8px); left: 0; display: flex; gap: 8px; padding: 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--glass-strong); box-shadow: var(--shadow); }
.watch-addlist-menu select { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; max-width: 200px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.stat-tile { display: grid; gap: 4px; padding: 22px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--glass); text-align: center; }
.stat-tile--accent { background: linear-gradient(135deg, rgba(29, 124, 255, 0.18), rgba(255, 255, 255, 0.03)); border-color: rgba(29, 124, 255, 0.4); }
.stat-num { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-rank { margin-top: 20px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--glass); }
.stat-rank-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stat-rank-head h2 { margin: 4px 0; font-size: 24px; }
.stat-rank-head span { color: var(--muted); }
.stat-rank-bar { margin-top: 12px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.stat-rank-bar span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.stat-rank-next { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.landing-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.landing-chip { display: inline-flex; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--glass); color: var(--text); text-decoration: none; font-size: 14px; transition: border-color 0.15s, color 0.15s; }
.landing-chip:hover { border-color: var(--blue); color: var(--blue-2); }
@media (max-width: 600px) {
    .person-hero { gap: 18px; }
    .person-photo { width: 120px; height: 180px; }
    .person-info h1 { font-size: 24px; }
}

.ad-banner {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
}
.ad-catalog,
.ad-player_top { aspect-ratio: 16 / 9; }
.ad-player_side { aspect-ratio: 9 / 16; }

.ad-banner-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ad-banner-tag,
.ad-placeholder-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(8, 11, 22, 0.55);
    color: rgba(255, 255, 255, 0.72);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    text-align: center;
    border: 1.5px dashed rgba(255, 255, 255, 0.18);
    background: transparent;  
}
.ad-placeholder .ad-placeholder-tag {
    position: static;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    backdrop-filter: none;
}
.ad-placeholder-text {
    color: rgba(255, 255, 255, 0.62);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    max-width: 90%;
}
.ad-placeholder-hint {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ad-placeholder-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    max-width: 100%;
}
.ad-placeholder-contact {
    color: var(--blue-2);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    word-break: break-word;
    border-bottom: 1px solid rgba(85, 184, 255, 0.35);
    transition: color 0.15s ease, border-color 0.15s ease;
}
.ad-placeholder-contact:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

.catalog-hero-row {
    display: flex;
    align-items: stretch;
    gap: 18px;
}
.catalog-hero-row > .catalog-hero { flex: 1 1 auto; min-width: 0; }
.catalog-hero-row > .catalog-ad {
    flex: 0 0 clamp(340px, 42%, 560px);
    align-self: stretch;
    aspect-ratio: auto;  
}

.player-ad-row {
    display: flex;
    align-items: stretch;  
    gap: 20px;
}
.player-ad-row > .player-card {
    flex: 0 1 auto;
    min-width: 0;
}
.watch-ad-side {
    flex: 0 0 clamp(260px, 26%, 360px);
    align-self: stretch;    
    aspect-ratio: auto;     
    min-height: 0;
}
.watch-ad-top { display: none; }  

@media (max-width: 920px) {
    .catalog-hero-row { display: block; }
    .catalog-hero-row > .catalog-ad {
        align-self: auto;
        aspect-ratio: 16 / 9;
        margin-top: 14px;
    }
    .player-ad-row { display: block; }
    .player-ad-row > .player-card { width: min(1120px, 100%); }
    .watch-ad-side { display: none; }       
    .watch-ad-top {
        display: block;
        margin: 0 0 16px;
    }
    .watch-ad-top.ad-placeholder { display: flex; }
    .ad-placeholder-text { font-size: 14px; }
}
