:root {
    --page-bg: #f8fafc;
    --panel-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-soft: #9ca3af;
    --line: #e5e7eb;
    --brand: #dc2626;
    --brand-dark: #b91c1c;
    --rose: #e11d48;
    --amber: #d97706;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 25px 60px rgba(15, 23, 42, 0.18);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 48%, #f3f4f6 100%);
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 1px 16px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 18px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--rose));
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 10px 18px rgba(220, 38, 38, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong,
.footer-brand strong {
    font-size: 20px;
    color: #1f2937;
}

.brand-text small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #374151;
    font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--brand-dark);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 0;
}

.top-search input,
.mobile-search input,
.filter-input,
.filter-select {
    border: 1px solid #d1d5db;
    outline: none;
    background: #ffffff;
    color: var(--text-main);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    width: min(260px, 28vw);
    height: 40px;
    border-radius: 999px 0 0 999px;
    padding: 0 14px;
}

.top-search button {
    height: 40px;
    width: 42px;
    border: 1px solid #d1d5db;
    border-left: 0;
    border-radius: 0 999px 999px 0;
    background: #ffffff;
    color: var(--text-muted);
    cursor: pointer;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #374151;
    font-size: 26px;
    cursor: pointer;
}

.mobile-nav {
    border-top: 1px solid var(--line);
    padding: 14px 16px 18px;
    background: #ffffff;
}

.mobile-nav nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #374151;
    font-weight: 600;
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
    background: #fef2f2;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    height: 42px;
    border-radius: 12px 0 0 12px;
    padding: 0 12px;
}

.mobile-search button {
    height: 42px;
    border: 0;
    border-radius: 0 12px 12px 0;
    padding: 0 16px;
    background: var(--brand);
    color: #ffffff;
}

.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 24%, rgba(220, 38, 38, 0.28), transparent 32%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.18) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.12) 56%, rgba(0, 0, 0, 0.25));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 76px;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f87171;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-label::before,
.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 14px 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 700;
}

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

.btn-primary,
.btn-glass,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    min-height: 46px;
    padding: 0 22px;
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.24);
}

.btn-primary:hover,
.section-link:hover {
    transform: translateY(-1px);
    background: var(--brand-dark);
    color: #ffffff;
}

.btn-glass {
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.26);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.34);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 22px;
    transform: translateY(-50%);
}

.hero-next {
    right: 22px;
    transform: translateY(-50%);
}

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

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

.hero-dots button.is-active {
    width: 32px;
    background: #ffffff;
}

.section-block {
    padding: 54px 0 0;
}

.section-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-title-row h2,
.page-hero h1 {
    margin: 6px 0 0;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.15;
}

.section-link {
    min-height: 40px;
    padding: 0 16px;
    background: #fef2f2;
    color: var(--brand-dark);
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 330px);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scrollbar-width: thin;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

.movie-grid.six-cols {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
    min-width: 0;
    background: #ffffff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.movie-card-compact .poster-wrap {
    aspect-ratio: 16 / 10;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-wrap img,
.related-item:hover img,
.channel-card:hover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
    opacity: 1;
}

.poster-category,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 10px;
    right: auto;
    background: linear-gradient(135deg, var(--brand), var(--rose));
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-dark);
    font-size: 22px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
    padding: 15px;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.movie-tags {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    color: var(--text-soft);
    font-size: 12px;
}

.movie-tags {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.movie-tags span {
    border-radius: 999px;
    padding: 3px 8px;
    background: #f3f4f6;
    color: #6b7280;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: #ffffff;
    padding: 18px;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.16));
}

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    font-size: 22px;
}

.category-tile em {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
}

.ranking-home .ranking-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

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

.page-hero {
    padding: 56px 0 22px;
}

.compact-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.breadcrumb,
.detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumb a,
.detail-breadcrumb a {
    color: var(--brand-dark);
}

.channel-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.channel-card a {
    display: block;
}

.channel-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 170px;
    overflow: hidden;
    background: #111827;
}

.channel-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.channel-body {
    padding: 20px;
}

.channel-body h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.channel-body p {
    margin: 0 0 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.channel-body span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    background: #fef2f2;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 10px auto 22px;
    padding: 16px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-input {
    flex: 1;
    min-width: 0;
    height: 46px;
    border-radius: 12px;
    padding: 0 14px;
}

.filter-select {
    height: 46px;
    border-radius: 12px;
    padding: 0 12px;
}

.ranking-page {
    display: grid;
    gap: 14px;
}

.ranking-row {
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.ranking-row a {
    display: grid;
    grid-template-columns: 58px 108px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.ranking-num {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fef2f2;
    color: var(--brand-dark);
    font-weight: 900;
}

.ranking-row img {
    width: 108px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.ranking-content {
    min-width: 0;
}

.ranking-content strong,
.ranking-content em,
.ranking-content small {
    display: block;
}

.ranking-content strong {
    font-size: 18px;
    margin-bottom: 4px;
}

.ranking-content em {
    color: var(--text-muted);
    font-style: normal;
    line-height: 1.6;
}

.ranking-content small {
    margin-top: 5px;
    color: var(--text-soft);
}

.ranking-score {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.detail-breadcrumb {
    padding-top: 28px;
    padding-bottom: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #030712;
    box-shadow: var(--shadow-lg);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #030712;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.24), rgba(0, 0, 0, 0.62));
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--brand-dark);
    font-size: 34px;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
}

.detail-card,
.side-card {
    margin-top: 22px;
    padding: 26px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

.detail-card h2,
.side-card h2 {
    margin: 24px 0 10px;
    font-size: 21px;
}

.detail-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.9;
}

.detail-card .lead-text {
    color: #374151;
    font-weight: 700;
}

.detail-card .detail-meta span {
    background: #fef2f2;
    color: var(--brand-dark);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag-row span {
    border-radius: 999px;
    padding: 5px 10px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 13px;
}

.detail-side {
    min-width: 0;
}

.side-card {
    position: sticky;
    top: 92px;
    margin-top: 0;
}

.side-card h2 {
    margin-top: 0;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-item {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
}

.related-thumb {
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

.related-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.related-info strong,
.related-info em {
    display: block;
}

.related-info strong {
    color: #1f2937;
    line-height: 1.45;
}

.related-info em {
    margin-top: 5px;
    color: var(--text-soft);
    font-size: 12px;
    font-style: normal;
}

.site-footer {
    margin-top: 64px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #d1d5db;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 38px;
    padding: 44px 0;
}

.footer-brand .brand-icon {
    width: 36px;
    height: 36px;
}

.footer-brand strong {
    color: #ffffff;
}

.site-footer p {
    max-width: 520px;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 9px 0;
    color: #d1d5db;
}

.site-footer a:hover {
    color: #f87171;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1120px) {
    .movie-grid.six-cols {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .movie-grid.four-cols,
    .category-grid,
    .channel-grid,
    .ranking-home .ranking-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .side-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-slider {
        height: 520px;
    }

    .hero-content {
        padding-bottom: 68px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid.six-cols,
    .movie-grid.four-cols,
    .category-grid,
    .channel-grid,
    .ranking-home .ranking-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-panel,
    .footer-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .ranking-row a {
        grid-template-columns: 42px 86px 1fr;
    }

    .ranking-score {
        display: none;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand-text small {
        display: none;
    }

    .hero-slider {
        height: 500px;
    }

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

    .hero-actions {
        gap: 10px;
    }

    .btn-primary,
    .btn-glass {
        width: 100%;
    }

    .section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid.six-cols,
    .movie-grid.four-cols,
    .category-grid,
    .channel-grid,
    .ranking-home .ranking-list {
        grid-template-columns: 1fr;
    }

    .horizontal-scroll {
        grid-auto-columns: minmax(240px, 82vw);
    }

    .detail-card,
    .side-card {
        padding: 20px;
    }

    .related-item {
        grid-template-columns: 96px 1fr;
    }
}
