:root {
    --bg: #050404;
    --bg-soft: #0b0909;
    --panel: rgba(16, 14, 13, 0.88);
    --panel-strong: rgba(22, 18, 17, 0.96);
    --line: rgba(218, 172, 96, 0.18);
    --line-red: rgba(230, 40, 34, 0.35);
    --text: #f6ead3;
    --muted: #a99b87;
    --gold: #e1b46a;
    --gold-soft: #fee1a3;
    --red: #d62020;
    --red-dark: #771213;
    --purple: #8a55ff;
    --blue: #5bb9ff;
    --green: #37c978;
    --radius: 8px;
    --topbar: 76px;
    --sidebar: 250px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    --font: "Inter", "Segoe UI", Arial, sans-serif;
    --font-display: Georgia, "Times New Roman", serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    color: inherit;
}

.site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(125deg, rgba(95, 13, 14, 0.22), transparent 32%),
        linear-gradient(245deg, rgba(72, 30, 128, 0.18), transparent 42%),
        linear-gradient(180deg, #030303 0%, #0b0606 58%, #070404 100%);
}

.site-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--topbar);
    display: grid;
    grid-template-columns: 260px minmax(380px, 1fr) minmax(280px, 420px) auto;
    align-items: center;
    gap: 18px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 5, 6, 0.86);
    backdrop-filter: blur(18px);
}

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

.brand__mark {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--gold-soft);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 28px;
    border: 2px solid rgba(222, 46, 35, 0.8);
    border-radius: 50%;
    background:
        linear-gradient(145deg, rgba(180, 22, 21, 0.7), rgba(39, 9, 9, 0.8)),
        #120807;
    box-shadow: 0 0 24px rgba(208, 33, 25, 0.32), inset 0 0 14px rgba(255, 208, 112, 0.18);
}

.brand__text {
    display: grid;
    gap: 2px;
    line-height: 1;
}

.brand__text strong {
    font-family: var(--font-display);
    color: var(--gold-soft);
    font-size: 25px;
    font-weight: 700;
    white-space: nowrap;
}

.brand__text small {
    color: #c98f42;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.topnav a,
.history-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 12px;
    color: #b9ad9c;
    font-weight: 650;
    font-size: 14px;
    white-space: nowrap;
}

.topnav a.is-active,
.topnav a:hover,
.history-link:hover {
    color: #fff2d1;
}

.topnav a.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff2a2a, transparent);
    box-shadow: 0 0 18px rgba(255, 35, 35, 0.9);
}

.top-search,
.catalog-search {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 46px;
    border: 1px solid rgba(226, 184, 113, 0.18);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.top-search input,
.catalog-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
}

.top-search button,
.catalog-search button {
    width: 48px;
    height: 100%;
    border: 0;
    color: var(--gold);
    background: transparent;
    cursor: pointer;
    font-size: 22px;
}

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

.bell {
    position: relative;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.bell::before {
    content: "♟";
    color: var(--gold);
}

.bell span {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--red);
    color: white;
    font-size: 10px;
    font-weight: 800;
}

.profile-chip {
    display: grid;
    grid-template-columns: 44px auto;
    grid-template-rows: 20px 18px;
    column-gap: 8px;
    align-items: center;
    min-width: 130px;
}

.profile-chip img {
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    border: 2px solid #bc812f;
    border-radius: 50%;
    background: #120908;
}

.profile-chip span {
    color: #f3d093;
    font-weight: 800;
    font-size: 13px;
}

.profile-chip b {
    justify-self: start;
    padding: 1px 7px;
    color: #fff2d1;
    border-radius: 20px;
    background: linear-gradient(90deg, #a05512, #c93420);
    font-size: 10px;
}

.mobile-menu {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    align-items: start;
    min-height: calc(100vh - var(--topbar));
}

.sidebar {
    position: sticky;
    top: var(--topbar);
    height: calc(100vh - var(--topbar));
    padding: 18px 16px;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(10, 8, 7, 0.98), rgba(5, 4, 4, 0.94)),
        var(--bg-soft);
}

.brand--side {
    display: none;
    margin-bottom: 18px;
}

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

.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px;
    color: #bdad9a;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 650;
}

.side-nav a span {
    width: 22px;
    color: #b9a27d;
    text-align: center;
}

.side-nav a b {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
}

.side-nav a.is-active,
.side-nav a:hover {
    color: #fff2d3;
    border-color: rgba(219, 36, 31, 0.55);
    background: linear-gradient(90deg, rgba(150, 18, 18, 0.78), rgba(74, 14, 14, 0.24));
    box-shadow: inset 0 0 22px rgba(255, 56, 42, 0.12);
}

.vip-card {
    margin: 32px 0;
    padding: 24px 18px;
    text-align: center;
    border: 1px solid rgba(208, 153, 78, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(54, 24, 11, 0.78), rgba(53, 7, 8, 0.54)),
        #130909;
    box-shadow: inset 0 0 34px rgba(230, 160, 61, 0.09);
}

.vip-card__crest {
    width: 112px;
    margin: 0 auto 8px;
    color: #ffe0a1;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255, 180, 70, 0.75);
}

.vip-card h2,
.sidebar-about h2,
.footer-col h2,
.footer-social h2 {
    margin: 0 0 8px;
    color: var(--gold-soft);
    font-size: 15px;
}

.vip-card p,
.sidebar-about p,
.footer-brand p {
    color: var(--muted);
    font-size: 13px;
}

.vip-card a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 0 18px;
    border: 1px solid rgba(255, 190, 95, 0.35);
    border-radius: 7px;
    background: linear-gradient(180deg, #b8201f, #72100e);
    color: #fff5dc;
    font-weight: 800;
}

.sidebar-about {
    padding-top: 16px;
    border-top: 1px solid rgba(226, 184, 113, 0.14);
}

.brand--mini .brand__mark {
    width: 38px;
    height: 38px;
    font-size: 21px;
}

.brand--mini .brand__text strong {
    font-size: 20px;
}

.content-shell {
    min-width: 0;
    padding: 16px 18px 0;
}

.hero-panel {
    position: relative;
    min-height: 365px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(6, 5, 8, 0.55), rgba(6, 5, 8, 0.1) 50%, rgba(7, 3, 4, 0.92)),
        var(--hero-image) center / cover no-repeat;
    box-shadow: var(--shadow);
}

.hero-panel::after,
.detail-hero::after,
.catalog-hero::after,
.about-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid rgba(255, 214, 143, 0.08);
}

.hero-content {
    position: relative;
    z-index: 2;
    align-self: end;
    max-width: 590px;
    padding: 44px 56px;
}

.eyebrow {
    margin: 0 0 6px;
    color: #ff4942;
    font-family: var(--font-display);
    font-weight: 800;
}

.hero-content h1,
.detail-info h1,
.catalog-hero h1,
.about-hero h1 {
    margin: 0;
    color: #ffe9bd;
    font-family: var(--font-display);
    font-size: 42px;
    line-height: 1.08;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero-meta,
.detail-tags,
.film-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-meta {
    margin: 12px 0;
}

.hero-meta span,
.detail-tags span,
.film-card__tags span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border: 1px solid rgba(224, 181, 106, 0.28);
    border-radius: 6px;
    color: #f5dcae;
    background: rgba(0, 0, 0, 0.32);
    font-size: 12px;
}

.hero-content p:not(.eyebrow) {
    margin: 0 0 18px;
    color: #d2c5b4;
    max-width: 470px;
}

.btn,
.hero-actions a,
.detail-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 7px;
    font-weight: 800;
}

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

.btn--primary,
.hero-actions .btn--primary,
.detail-actions .btn--primary {
    border: 1px solid rgba(255, 144, 93, 0.48);
    background: linear-gradient(180deg, #c62925, #70100f);
    color: #fff4df;
    box-shadow: 0 12px 30px rgba(197, 28, 26, 0.28);
}

.btn--ghost,
.hero-actions .btn--ghost,
.detail-actions .btn--ghost {
    border: 1px solid rgba(226, 184, 113, 0.22);
    background: rgba(0, 0, 0, 0.34);
    color: #f5dcc0;
}

.hero-stack {
    position: relative;
    z-index: 2;
    align-self: center;
    display: grid;
    gap: 10px;
    padding: 28px 28px 28px 0;
}

.hero-stack__item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 70px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(14, 9, 10, 0.58);
}

.hero-stack__item:hover,
.hero-stack__item:first-child {
    border-color: rgba(226, 47, 40, 0.65);
    background: rgba(112, 13, 16, 0.45);
}

.hero-stack__item img {
    width: 86px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
}

.hero-stack__item strong,
.hero-stack__item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-stack__item strong {
    color: #fff1d0;
}

.hero-stack__item small {
    color: var(--muted);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 44px;
    height: 58px;
    transform: translateY(-50%);
    border: 0;
    color: #f7dec1;
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
    font-size: 38px;
}

.hero-arrow--left {
    left: 18px;
}

.hero-arrow--right {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.hero-dots .is-active {
    width: 18px;
    border-radius: 99px;
    background: var(--red);
}

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    margin-top: 16px;
}

.rail-section,
.ranking-panel,
.category-panel,
.filter-panel,
.episode-panel,
.comment-panel,
.now-playing,
.watch-info,
.about-cards article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.rail-section,
.ranking-panel,
.category-panel,
.episode-panel,
.comment-panel,
.now-playing,
.watch-info {
    padding: 14px;
}

.home-main,
.home-aside {
    display: grid;
    align-content: start;
    gap: 16px;
    min-width: 0;
}

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

.section-heading h2 {
    margin: 0;
    color: #ffe0a6;
    font-family: var(--font-display);
    font-size: 20px;
}

.section-heading h2 span {
    display: inline-flex;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--red);
    color: white;
    font-family: var(--font);
    font-size: 10px;
}

.section-heading a,
.section-heading span,
.section-heading button {
    border: 0;
    color: #bda78b;
    background: transparent;
    font-size: 13px;
}

.film-row {
    display: grid;
    grid-template-columns: repeat(8, minmax(118px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.rank-wrap {
    position: relative;
    min-width: 0;
}

.rank-no {
    position: absolute;
    z-index: 5;
    top: 0;
    left: 0;
    min-width: 28px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 7px 0 7px 0;
    background: linear-gradient(180deg, #ff3a33, #a11413);
    color: #fff;
    font-weight: 900;
}

.film-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 184, 113, 0.14);
    border-radius: 8px;
    background: rgba(10, 9, 9, 0.95);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.film-card:hover {
    transform: translateY(-2px);
    border-color: rgba(222, 45, 37, 0.62);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

.film-card__media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #120c0c;
}

.film-card--compact .film-card__media {
    aspect-ratio: 4 / 5;
}

.film-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.22s ease;
}

.film-card:hover img {
    transform: scale(1.035);
}

.film-card__shade {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.film-card__badge {
    position: absolute;
    z-index: 3;
    top: 7px;
    left: 7px;
    min-height: 20px;
    padding: 1px 6px;
    border-radius: 4px;
    background: linear-gradient(180deg, #ff3a45, #c41219);
    color: white;
    font-size: 10px;
    font-weight: 900;
}

.film-card__body {
    padding: 9px 10px 10px;
}

.film-card h3 {
    margin: 0 0 5px;
    color: #fff1d5;
    font-size: 14px;
    line-height: 1.3;
}

.film-card h3 a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.film-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    color: #b9ac9b;
    font-size: 12px;
}

.film-card__meta span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rating {
    flex: 0 0 auto;
    color: #ffd25e;
    font-weight: 800;
}

.film-card__tags {
    margin-top: 8px;
    gap: 5px;
}

.film-card__tags span {
    min-height: 20px;
    color: #b6aa9c;
    font-size: 11px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 28px 66px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(226, 184, 113, 0.1);
}

.ranking-item b {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(180deg, #bd1d1c, #54100e);
    color: #fff;
}

.ranking-item img {
    width: 66px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
}

.ranking-item strong,
.ranking-item small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.ranking-item em {
    color: #ff693f;
    font-style: normal;
    font-weight: 800;
    font-size: 13px;
}

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

.category-grid a {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid rgba(226, 184, 113, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(54, 88, 155, 0.35), rgba(118, 29, 28, 0.35)),
        rgba(0, 0, 0, 0.25);
    color: #f4d8a3;
    font-weight: 800;
}

.catalog-shell {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    gap: 22px;
}

.filter-panel {
    position: sticky;
    top: calc(var(--topbar) + 16px);
    max-height: calc(100vh - var(--topbar) - 30px);
    overflow-y: auto;
    padding: 16px;
}

.filter-panel h2 {
    margin: 0 0 10px;
    color: #ffe0a3;
    font-size: 16px;
    text-transform: uppercase;
}

.filter-panel h2:not(:first-child) {
    margin-top: 22px;
}

.filter-panel > a:not(.clear-filter) {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #c9baa7;
    background: rgba(255, 255, 255, 0.02);
}

.filter-panel a.is-active,
.filter-panel > a:hover {
    border-color: rgba(223, 42, 36, 0.55);
    color: #ffeac4;
    background: rgba(119, 17, 18, 0.45);
}

.filter-panel b {
    color: #bda988;
    font-size: 12px;
}

.year-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.year-pills a,
.year-pills span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(226, 184, 113, 0.13);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.year-pills a.is-active,
.year-pills a:hover {
    border-color: rgba(223, 42, 36, 0.55);
    background: rgba(116, 14, 15, 0.48);
}

.clear-filter {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    border-radius: 7px;
    background: linear-gradient(180deg, #a51a19, #63100f);
    color: #fff4df;
    font-weight: 800;
}

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

.catalog-hero {
    position: relative;
    min-height: 128px;
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    gap: 22px;
    align-items: center;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.9), rgba(33, 12, 15, 0.48)),
        linear-gradient(120deg, rgba(47, 18, 89, 0.44), transparent);
}

.catalog-hero h1 {
    font-size: 36px;
    text-align: right;
}

.catalog-hero p {
    margin: 4px 0 0;
    color: var(--muted);
    text-align: right;
}

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.catalog-toolbar a,
.catalog-toolbar button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid rgba(226, 184, 113, 0.16);
    border-radius: 8px;
    background: rgba(13, 12, 12, 0.82);
    color: #d5c3aa;
    font-weight: 800;
}

.catalog-toolbar a.is-active,
.catalog-toolbar a:hover,
.catalog-toolbar button:hover {
    border-color: rgba(222, 42, 36, 0.7);
    background: rgba(106, 15, 16, 0.6);
    color: #fff0cf;
}

.toolbar-spacer {
    flex: 1 1 auto;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.catalog-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
}

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

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(226, 184, 113, 0.15);
    border-radius: 7px;
    background: rgba(10, 10, 10, 0.8);
}

.pagination a.is-current,
.pagination a:hover {
    border-color: rgba(222, 42, 36, 0.7);
    background: linear-gradient(180deg, #c51f1d, #6f1010);
}

.empty-state {
    min-height: 280px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 28px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.empty-state h1,
.empty-state h2 {
    margin: 0;
    color: #ffe2aa;
}

.detail-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, 520px) minmax(360px, 1fr) minmax(360px, 520px);
    gap: 28px;
    min-height: 610px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.38), rgba(5, 5, 5, 0.92)),
        #080707;
}

.detail-poster {
    position: relative;
    display: grid;
    align-content: end;
    overflow: hidden;
    border-radius: 8px;
    background: var(--poster-image) center / cover no-repeat;
}

.detail-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.9));
}

.detail-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
}

.detail-poster a {
    position: relative;
    z-index: 2;
    justify-self: center;
    margin-bottom: 28px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 218, 140, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
}

.detail-info {
    align-self: center;
    min-width: 0;
}

.detail-info h1 {
    font-size: 40px;
}

.detail-info h1 span {
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--red);
    color: #fff;
    font-family: var(--font);
    font-size: 13px;
    vertical-align: middle;
}

.alt-title,
.detail-desc {
    color: #cdbfaa;
}

.score-line {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 14px 0;
}

.score-line strong {
    color: #ffb43b;
    font-size: 22px;
}

.detail-actions,
.detail-tags {
    margin: 16px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(226, 184, 113, 0.14);
    border-radius: 8px;
    background: rgba(226, 184, 113, 0.12);
}

.info-grid span {
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 12px;
    background: rgba(12, 12, 12, 0.86);
    color: #e9d5b4;
}

.info-grid b {
    color: #a99d8b;
    font-size: 12px;
}

.detail-preview {
    align-self: start;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 184, 113, 0.2);
    border-radius: 8px;
    background: #050505;
}

.detail-preview img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    opacity: 0.86;
}

.detail-preview a {
    position: absolute;
    left: 50%;
    top: 43%;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.84);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.36);
    font-size: 30px;
}

.fake-controls {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    color: #cbbfad;
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 10px;
    margin-bottom: 14px;
}

.comment-form input {
    min-height: 42px;
    padding: 0 12px;
    color: var(--text);
    border: 1px solid rgba(226, 184, 113, 0.16);
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.28);
}

.comment-form button {
    border: 1px solid rgba(255, 183, 121, 0.35);
    border-radius: 7px;
    background: linear-gradient(180deg, #a91c1c, #64100f);
}

.comment-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(226, 184, 113, 0.1);
}

.comment-item img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.comment-item strong span {
    padding: 1px 5px;
    border-radius: 4px;
    background: #8c5a18;
    color: #ffe0a5;
    font-size: 10px;
}

.comment-item p {
    margin: 6px 0 0;
    color: #c9b8a5;
}

.episode-tabs,
.episode-range {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
}

.episode-tabs span,
.episode-range span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid rgba(226, 184, 113, 0.14);
    border-radius: 6px;
    white-space: nowrap;
}

.episode-tabs .is-active,
.episode-range .is-active {
    border-color: rgba(222, 42, 36, 0.7);
    color: #ff5148;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 8px;
    max-height: 356px;
    overflow-y: auto;
    padding-right: 4px;
}

.episode-grid a {
    min-height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(226, 184, 113, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    color: #e9d7bd;
}

.episode-grid a.is-current,
.episode-grid a:hover {
    border-color: #e62d27;
    background: rgba(118, 16, 17, 0.64);
    color: #fff4de;
}

.detail-related {
    margin-top: 18px;
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #ad9e8e;
}

.watch-player {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #060505;
}

.player-title {
    position: absolute;
    z-index: 3;
    top: 22px;
    left: 26px;
}

.player-title h1 {
    margin: 0 0 2px;
    font-size: 24px;
}

.player-title h1 span {
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(149, 20, 21, 0.9);
    font-size: 12px;
}

.player-title p {
    margin: 0;
    color: #dacdbb;
}

.watch-player video,
.watch-player iframe,
.player-empty {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.player-empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.78)),
        var(--watch-image) center / cover no-repeat;
}

.player-empty span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    font-size: 36px;
}

.server-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.server-tabs span,
.server-tabs a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid rgba(226, 184, 113, 0.16);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.03);
}

.server-tabs a.is-active,
.server-tabs a:hover {
    border-color: #db2825;
    background: rgba(116, 14, 15, 0.66);
}

.watch-info {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr) 150px;
    gap: 18px;
    align-items: center;
}

.watch-info > img {
    width: 126px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
}

.watch-info h2 {
    margin: 0;
    font-size: 25px;
}

.watch-info p {
    color: #c7b9a6;
}

.watch-score {
    min-height: 110px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 1px solid rgba(226, 184, 113, 0.18);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.24);
}

.watch-score strong {
    color: #ffd08b;
    font-family: var(--font-display);
    font-size: 38px;
}

.watch-score span {
    color: #ff3434;
}

.watch-score small {
    color: var(--muted);
}

.watch-side {
    display: grid;
    align-content: start;
    gap: 12px;
}

.episode-grid--watch {
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    max-height: 374px;
}

.view-all-episodes {
    min-height: 42px;
    display: grid;
    place-items: center;
    margin-top: 12px;
    border: 1px solid rgba(226, 184, 113, 0.14);
    border-radius: 7px;
}

.now-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.now-card img {
    width: 110px;
    height: 62px;
    object-fit: cover;
    border-radius: 7px;
}

.now-card b {
    color: #ff3934;
}

.watch-bottom {
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.about-hero {
    position: relative;
    min-height: 270px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 34px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.92), rgba(22, 9, 22, 0.45)),
        linear-gradient(130deg, rgba(82, 23, 130, 0.35), rgba(150, 25, 18, 0.25));
}

.about-hero h1 {
    max-width: 720px;
    font-size: 30px;
}

.about-hero p {
    max-width: 720px;
    color: #d6c9b9;
}

.about-hero strong {
    color: #f2d4ff;
    font-family: var(--font-display);
    font-size: 54px;
    font-style: italic;
}

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

.about-stats span {
    min-height: 76px;
    display: grid;
    place-items: center;
    align-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.about-stats b {
    color: #e9c17e;
    font-family: var(--font-display);
    font-size: 26px;
}

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

.about-cards article {
    padding: 24px;
}

.about-cards h2 {
    color: #ffe0a6;
    font-family: var(--font-display);
}

.site-footer {
    position: relative;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.9fr 1fr 1.1fr;
    gap: 28px;
    margin-left: var(--sidebar);
    padding: 24px 34px 16px;
    border-top: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(10, 8, 7, 0.9), rgba(5, 4, 4, 0.98)),
        #050404;
}

.footer-col,
.footer-brand,
.footer-social {
    min-width: 0;
}

.footer-col a {
    display: block;
    color: #aaa095;
    margin: 5px 0;
    font-size: 13px;
}

.store-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.store-row span {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(226, 184, 113, 0.17);
    border-radius: 7px;
    color: #f3e0c2;
}

.footer-social div {
    display: flex;
    gap: 10px;
    margin: 12px 0;
}

.footer-social a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #1c1111;
    color: #ffe0a1;
}

.footer-social strong {
    color: #d6a459;
    font-family: var(--font-display);
    font-size: 26px;
}

.copyright {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    color: #786d60;
    text-align: center;
    font-size: 12px;
}

@media (max-width: 1400px) {
    .topbar {
        grid-template-columns: 220px minmax(280px, 1fr) minmax(240px, 340px) auto;
    }

    .home-layout,
    .watch-layout {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .detail-hero {
        grid-template-columns: 360px minmax(0, 1fr);
    }

    .detail-preview {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1120px) {
    :root {
        --sidebar: 0px;
    }

    .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .brand--top {
        display: inline-flex;
    }

    .topnav {
        display: none;
    }

    .top-search {
        max-width: none;
    }

    .mobile-menu {
        display: inline-grid;
        place-items: center;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: var(--topbar);
        left: 0;
        z-index: 45;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 24px 0 70px rgba(0, 0, 0, 0.45);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .brand--side {
        display: inline-flex;
    }

    .site-footer {
        margin-left: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .topbar {
        height: auto;
        min-height: var(--topbar);
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: 10px 12px;
    }

    .top-search {
        grid-column: 1 / -1;
        order: 3;
    }

    .history-link,
    .profile-chip {
        display: none;
    }

    .hero-panel {
        grid-template-columns: 1fr;
        min-height: 520px;
    }

    .hero-content {
        align-self: end;
        padding: 120px 24px 44px;
    }

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

    .hero-stack {
        display: none;
    }

    .home-aside,
    .detail-layout,
    .watch-bottom,
    .catalog-shell,
    .about-stats,
    .about-cards {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
        max-height: none;
    }

    .catalog-hero {
        grid-template-columns: 1fr;
    }

    .catalog-hero h1,
    .catalog-hero p {
        text-align: left;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .detail-poster {
        min-height: 520px;
    }

    .watch-info {
        grid-template-columns: 98px minmax(0, 1fr);
    }

    .watch-score {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .content-shell {
        padding: 10px;
    }

    .brand__mark {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .brand__text strong {
        font-size: 20px;
    }

    .hero-content {
        padding: 110px 18px 36px;
    }

    .hero-content h1,
    .detail-info h1,
    .catalog-hero h1 {
        font-size: 30px;
    }

    .film-row {
        grid-template-columns: repeat(2, minmax(136px, 1fr));
        overflow-x: visible;
    }

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

    .info-grid,
    .episode-grid--watch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .catalog-bottom {
        display: grid;
    }

    .pagination {
        flex-wrap: wrap;
    }

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

    .watch-info > img {
        width: 100%;
        max-width: 220px;
    }

    .player-title {
        position: static;
        padding: 14px;
        background: rgba(0, 0, 0, 0.74);
    }

    .about-hero {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .about-hero strong {
        font-size: 40px;
    }

    .site-footer {
        grid-template-columns: 1fr;
        padding: 24px 16px 16px;
    }
}

/* Production polish phases 3-10 */
.side-nav button,
.history-button,
.profile-chip,
.server-tabs button,
.episode-tabs button,
.episode-range button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 0;
    background: transparent;
}
.side-nav button {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    color: #b9ad9c;
    font-weight: 700;
    text-align: left;
    border-radius: var(--radius);
}
.side-nav button:hover { color: #fff2d1; background: rgba(255,255,255,.04); }
.history-button { white-space: nowrap; }
.detail-poster button,
.btn,
.server-tabs button,
.episode-tabs button,
.episode-range button {
    border-radius: var(--radius);
}
.detail-poster button {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    color: #fff2d1;
    border: 1px solid rgba(255,215,0,.35);
    background: linear-gradient(135deg, rgba(200,16,46,.75), rgba(157,78,221,.35));
    box-shadow: 0 0 28px rgba(200,16,46,.25);
}
.btn.is-saved,
[data-favorite].is-saved { color: #fff; background: linear-gradient(135deg, rgba(55,201,120,.8), rgba(10,90,50,.7)); }
.episode-grid[data-episode-group] { display: none; }
.episode-grid[data-episode-group].is-active { display: grid; }
.episode-tabs button,
.episode-range button {
    padding: 9px 13px;
    color: var(--muted);
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
}
.episode-tabs button.is-active,
.episode-range button.is-active {
    color: #fff2d1;
    border-color: rgba(255,215,0,.38);
    background: linear-gradient(135deg, rgba(200,16,46,.8), rgba(157,78,221,.42));
    box-shadow: 0 0 22px rgba(157,78,221,.26);
}
.server-tabs button {
    padding: 9px 12px;
    color: var(--gold-soft);
    border: 1px solid rgba(255,215,0,.22);
    background: rgba(255,255,255,.04);
}
.watch-player video,
.watch-player iframe {
    width: 100%;
    aspect-ratio: 16/9;
    min-height: 420px;
    border: 0;
    background: #000;
}
.player-empty {
    min-height: 420px;
    display: grid;
    place-items: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.78)), var(--watch-image, none) center/cover;
}
.player-empty span { font-size: 76px; color: var(--gold-soft); text-shadow: 0 0 30px rgba(255,215,0,.5); }
.local-drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(8px);
}
.local-drawer__panel {
    width: min(440px, calc(100vw - 28px));
    max-height: calc(100vh - 60px);
    overflow: auto;
    margin: 30px 20px 30px auto;
    padding: 22px;
    border: 1px solid rgba(255,215,0,.22);
    border-radius: 18px;
    background: rgba(10,8,10,.96);
    box-shadow: 0 30px 90px rgba(0,0,0,.55), inset 0 0 40px rgba(157,78,221,.08);
}
.local-drawer__panel > button {
    float: right;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    color: var(--gold-soft);
    background: rgba(255,255,255,.05);
    cursor: pointer;
}
.local-drawer__item {
    display: grid;
    gap: 4px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.local-drawer__item strong { color: #fff2d1; }
.local-drawer__item span { color: var(--muted); font-size: 13px; }
.comment-item { animation: softAppear .18s ease-out; }
@keyframes softAppear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.episode-panel--detail { margin: 24px 0; }
.detail-layout { align-items: start; }
.catalog-toolbar a[href*="sort="] { white-space: nowrap; }
@media (max-width: 760px) {
    .watch-player video,
    .watch-player iframe,
    .player-empty { min-height: 220px; }
    .local-drawer__panel { margin: 20px auto; }
}

/* Phase 13 - Auth & tb_user profile */
.auth-page{display:grid;grid-template-columns:minmax(300px,1fr) minmax(340px,520px);gap:28px;align-items:center;padding:28px 0}.auth-hero-card,.auth-card,.profile-banner,.profile-panel{position:relative;overflow:hidden;border:1px solid rgba(225,180,106,.22);border-radius:20px;background:radial-gradient(circle at 22% 18%,rgba(157,78,221,.18),transparent 30%),radial-gradient(circle at 90% 10%,rgba(200,16,46,.18),transparent 30%),linear-gradient(145deg,rgba(18,14,16,.94),rgba(6,5,7,.92));box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.04)}.auth-hero-card{min-height:620px;display:flex;flex-direction:column;justify-content:flex-end;padding:42px}.auth-hero-card:before{content:"修";position:absolute;right:6%;top:8%;font-family:var(--font-display);font-size:clamp(120px,17vw,230px);line-height:1;color:rgba(255,215,0,.05);text-shadow:0 0 60px rgba(157,78,221,.35)}.auth-hero-card:after,.profile-banner:after{content:"";position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(circle,rgba(255,215,0,.55) 0 1px,transparent 1.8px),radial-gradient(circle,rgba(157,78,221,.45) 0 1px,transparent 2px);background-size:90px 90px,140px 140px;opacity:.18}.auth-hero-card>*{position:relative;z-index:1}.auth-hero-card h1,.profile-banner h1{margin:10px 0 12px;font-family:var(--font-display);font-size:clamp(34px,5vw,68px);line-height:1.02;color:var(--gold-soft);text-shadow:0 0 34px rgba(157,78,221,.35)}.auth-hero-card p,.auth-benefits,.profile-banner p{color:var(--muted)}.auth-benefits{display:grid;gap:10px;margin:22px 0 0;padding:0;list-style:none}.auth-benefits li{padding:12px 14px;border:1px solid rgba(225,180,106,.14);border-radius:12px;background:rgba(255,255,255,.035)}.auth-card{padding:28px}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:6px;border-radius:16px;background:rgba(255,255,255,.04);border:1px solid rgba(225,180,106,.14);margin-bottom:20px}.auth-tabs a{display:grid;place-items:center;min-height:48px;border-radius:12px;color:var(--muted);font-weight:800}.auth-tabs a.is-active{color:#fff;background:linear-gradient(135deg,rgba(200,16,46,.95),rgba(157,78,221,.76));box-shadow:0 12px 32px rgba(200,16,46,.28)}.auth-alert{margin:0 0 16px;padding:12px 14px;border-radius:12px;border:1px solid rgba(255,255,255,.12);color:#fff;background:rgba(157,78,221,.12)}.auth-alert--error{border-color:rgba(255,91,91,.35);background:rgba(200,16,46,.15)}.auth-alert--success{border-color:rgba(55,201,120,.35);background:rgba(55,201,120,.13)}.auth-form{display:grid;gap:16px}.auth-form label{display:grid;gap:8px;color:var(--gold-soft);font-weight:750}.auth-form input{width:100%;min-height:50px;padding:0 14px;border:1px solid rgba(225,180,106,.2);border-radius:13px;color:#fff;background:rgba(0,0,0,.3);outline:none}.auth-form input:focus{border-color:rgba(157,78,221,.7);box-shadow:0 0 0 3px rgba(157,78,221,.14)}.auth-form__grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.auth-submit{width:100%;min-height:52px;border-radius:14px}.auth-note{margin:2px 0 0;color:var(--muted);font-size:13px}.auth-note code{color:var(--gold-soft)}.profile-banner{display:grid;grid-template-columns:auto 1fr auto;gap:22px;align-items:center;margin:28px 0;padding:28px}.profile-banner>*{position:relative;z-index:1}.profile-avatar-wrap{width:118px;height:118px;border-radius:50%;padding:4px;background:linear-gradient(135deg,var(--red),var(--gold),var(--purple));box-shadow:0 0 36px rgba(157,78,221,.32)}.profile-avatar-wrap img{width:100%;height:100%;object-fit:cover;border-radius:50%;background:#090909}.profile-badges{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.profile-badges span{padding:8px 11px;border:1px solid rgba(225,180,106,.18);border-radius:999px;color:var(--gold-soft);background:rgba(255,255,255,.045);font-weight:800}.profile-logout{align-self:start}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding-bottom:32px}.profile-panel{padding:22px}.profile-panel--wide{grid-column:1/-1}.profile-panel h2{margin:0 0 16px;font-family:var(--font-display);color:var(--gold-soft)}.profile-info{display:grid;grid-template-columns:160px 1fr;gap:10px 14px}.profile-info dt{color:var(--muted)}.profile-info dd{margin:0;color:#fff2d1;font-weight:750}.profile-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.profile-stats div{padding:16px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.035);text-align:center}.profile-stats strong{display:block;color:var(--gold-soft);font-size:28px}.profile-stats span{color:var(--muted);font-size:13px}.profile-local-list{display:grid;gap:10px}.profile-local-list a,.profile-local-list p{padding:13px 14px;border:1px solid rgba(255,255,255,.08);border-radius:13px;background:rgba(255,255,255,.035)}.profile-local-list strong{display:block;color:#fff2d1}.profile-local-list span{color:var(--muted);font-size:13px}.top-actions .profile-chip{text-decoration:none}.side-nav a[href*="dang-nhap"],.side-nav a[href*="tai-khoan"]{border-color:rgba(255,215,0,.2)}
@media(max-width:1100px){.auth-page{grid-template-columns:1fr}.auth-hero-card{min-height:420px}.profile-banner{grid-template-columns:1fr;text-align:left}.profile-grid{grid-template-columns:1fr}.profile-stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:640px){.auth-card,.auth-hero-card,.profile-banner,.profile-panel{padding:18px}.auth-form__grid{grid-template-columns:1fr}.profile-info{grid-template-columns:1fr}.profile-stats{grid-template-columns:1fr}.profile-avatar-wrap{width:94px;height:94px}}

/* Phase 14-20 polish: DB user library, real comments, enhanced player */
.comment-panel--db{position:relative;overflow:hidden;border:1px solid rgba(255,198,92,.18);background:linear-gradient(145deg,rgba(22,9,35,.82),rgba(7,7,14,.78));box-shadow:0 18px 60px rgba(125,46,255,.12),inset 0 1px 0 rgba(255,255,255,.06);backdrop-filter:blur(18px)}
.comment-panel--db:before{content:"";position:absolute;inset:-60px auto auto -60px;width:160px;height:160px;background:radial-gradient(circle,rgba(255,197,80,.24),transparent 64%);pointer-events:none}.comment-panel--db .section-heading{position:relative;z-index:1}.comment-panel--db .section-heading small{font-size:13px;color:#f7c873}.comment-login-hint{border:1px dashed rgba(255,255,255,.18);border-radius:16px;padding:14px 16px;color:#d9d3e8;background:rgba(255,255,255,.04)}.comment-login-hint a{color:#ffd36a;font-weight:800}.comment-list{display:grid;gap:12px;margin-top:14px}.comment-item{border:1px solid rgba(255,255,255,.08);background:rgba(9,8,20,.58);border-radius:18px;padding:13px;transition:.22s ease;box-shadow:0 10px 28px rgba(0,0,0,.18)}.comment-item:hover{transform:translateY(-1px);border-color:rgba(255,210,106,.28);box-shadow:0 14px 36px rgba(126,54,255,.13)}.comment-item img{object-fit:cover;border:1px solid rgba(255,255,255,.13);box-shadow:0 0 0 3px rgba(255,207,98,.07)}.comment-item strong span{background:linear-gradient(135deg,#7a36ff,#ff375f);border-radius:999px;padding:2px 7px;color:#fff;font-size:11px;margin-left:6px}.comment-item small{display:block;margin-top:7px;color:#938aa7}.comment-empty{padding:14px 0;color:#bdb4ca}.comment-form.is-loading{opacity:.72;pointer-events:none}.comment-form input{min-width:0}.profile-db-list .local-drawer__item,.local-drawer__item{display:flex;align-items:center;gap:12px}.profile-db-list .local-drawer__item img,.local-drawer__item img{width:44px;height:62px;object-fit:cover;border-radius:10px;border:1px solid rgba(255,255,255,.12)}.local-drawer__item small{display:block;color:#a99fb8;margin-top:4px}.server-tabs{position:sticky;top:72px;z-index:5;background:rgba(8,7,16,.72);backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.08);box-shadow:0 14px 50px rgba(0,0,0,.22)}.server-tabs a,.server-tabs button{transition:.2s ease}.server-tabs a:hover,.server-tabs button:hover{transform:translateY(-1px);box-shadow:0 0 24px rgba(255,53,95,.22)}.server-tabs a.is-active{background:linear-gradient(135deg,#ff375f,#ffb84d);color:#19040b;box-shadow:0 0 24px rgba(255,184,77,.25)}.watch-player{box-shadow:0 26px 90px rgba(0,0,0,.48),0 0 0 1px rgba(255,212,94,.12),0 0 55px rgba(127,57,255,.14)}body.is-theater .topbar,body.is-theater .sidebar,body.is-theater .site-footer{opacity:.08;pointer-events:none}body.is-theater .content-shell{max-width:1360px}body.is-theater .watch-layout{grid-template-columns:minmax(0,1fr)}body.is-theater .watch-side{display:none}body.is-theater .watch-player{position:relative;z-index:20;box-shadow:0 0 0 9999px rgba(0,0,0,.82),0 0 80px rgba(255,193,73,.18)}.catalog-hero,.detail-hero,.auth-card,.profile-panel,.ranking-panel,.category-panel,.episode-panel,.watch-info{border-color:rgba(255,207,91,.14)!important;background-image:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.025))!important;box-shadow:0 20px 64px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.05)}.film-card__media:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 40%,rgba(4,3,8,.82));opacity:.9;pointer-events:none}.film-card:hover .film-card__media{box-shadow:0 0 0 1px rgba(255,207,91,.28),0 22px 58px rgba(255,55,95,.16),0 0 36px rgba(120,52,255,.18)}.topbar{box-shadow:0 10px 40px rgba(0,0,0,.28),inset 0 -1px 0 rgba(255,207,91,.08)}.profile-chip{background:linear-gradient(135deg,rgba(255,255,255,.08),rgba(255,255,255,.02));border:1px solid rgba(255,213,105,.18)}@media(max-width:760px){.server-tabs{position:relative;top:auto;overflow:auto}.server-tabs span{min-width:max-content}.server-tabs a,.server-tabs button{white-space:nowrap}.comment-form{grid-template-columns:minmax(0,1fr) auto}.watch-player{border-radius:16px}.local-drawer__panel{width:min(94vw,420px)}}
