:root {
    --color-bg: #f8fafc;
    --color-bg-soft: #ffffff;
    --color-text: #111827;
    --color-muted: #64748b;
    --color-line: #e2e8f0;
    --color-dark: #0f172a;
    --color-dark-2: #1e293b;
    --color-blue: #2563eb;
    --color-blue-dark: #1d4ed8;
    --color-red: #dc2626;
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-text);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-blue);
    color: #ffffff;
    font-size: 14px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.38);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: #e2e8f0;
    font-size: 15px;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.9);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 4px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.14) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: clamp(42px, 10vh, 92px);
    z-index: 2;
    width: min(1180px, calc(100% - 40px));
    transform: translateX(-50%);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: var(--color-blue);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
}

.hero p {
    max-width: 700px;
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: clamp(18px, 2.4vw, 22px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    border: 0;
    background: #ffffff;
    color: var(--color-dark);
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

.btn-primary {
    background: var(--color-blue);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--color-blue-dark);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    backdrop-filter: blur(14px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 180ms ease, transform 180ms ease;
}

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

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
    transition: width 200ms ease, background-color 200ms ease;
}

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

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

.main-stack {
    padding: 64px 0;
}

.section-block {
    margin-bottom: 72px;
}

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

.section-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--color-muted);
}

.section-more {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    color: var(--color-blue);
    background: #eff6ff;
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 24px;
}

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

.movie-grid.large-feature {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.poster-box {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0f172a;
}

.large-card .poster-box {
    aspect-ratio: 16 / 9;
}

.poster-box img {
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.movie-card:hover .poster-box img {
    transform: scale(1.09);
}

.poster-box::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0));
}

.poster-meta {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #ffffff;
    font-size: 13px;
}

.poster-meta span,
.rank-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    background: var(--color-red);
    color: #ffffff;
    font-weight: 900;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    overflow: hidden;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}

.feature-band {
    border-radius: 28px;
    padding: clamp(28px, 4vw, 46px);
    background: linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0f172a);
    color: #ffffff;
    box-shadow: var(--shadow-card);
}

.feature-band h2,
.feature-band p {
    color: inherit;
}

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

.channel-card {
    display: block;
    min-height: 150px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.channel-card h2,
.channel-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.channel-card p {
    margin: 0;
    color: var(--color-muted);
}

.page-hero {
    padding: 58px 0;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

.filter-bar,
.search-panel {
    margin: 0 0 28px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.search-panel {
    grid-template-columns: 1fr 180px 150px;
}

.filter-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.detail-wrap {
    padding: 36px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--color-blue);
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 32px;
}

.player-card,
.detail-card {
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-layer {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 180ms ease;
}

.player-shell:hover .player-layer,
.player-shell.is-ready .player-layer {
    opacity: 1;
}

.player-button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.player-status {
    color: #ffffff;
    font-size: 14px;
}

.detail-body {
    padding: 24px;
}

.detail-body h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
}

.detail-body h2,
.detail-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-body p,
.detail-card p {
    color: #334155;
}

.detail-card {
    padding: 22px;
}

.side-poster {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    aspect-ratio: 4 / 3;
    background: #0f172a;
}

.side-poster img {
    height: 100%;
    object-fit: cover;
}

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

.rank-list {
    display: grid;
    gap: 16px;
}

.rank-row {
    display: grid;
    grid-template-columns: 72px 160px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-number {
    color: var(--color-red);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}

.rank-cover img {
    height: 100%;
    object-fit: cover;
}

.rank-row h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.rank-row p {
    margin: 0;
    color: var(--color-muted);
}

.site-footer {
    padding: 48px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.footer-main p {
    max-width: 560px;
    color: #94a3b8;
}

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

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

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

.empty-result {
    padding: 42px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    color: var(--color-muted);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

@media (max-width: 1024px) {
    .movie-grid,
    .channel-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .rank-row {
        grid-template-columns: 58px 128px 1fr;
    }

    .rank-row .btn {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        height: 60px;
    }

    .brand {
        font-size: 18px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 60px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px 18px;
        background: #0f172a;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-link {
        border-radius: 12px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        bottom: 66px;
    }

    .movie-grid,
    .movie-grid.large-feature,
    .channel-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

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

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

    .rank-row {
        grid-template-columns: 48px 96px 1fr;
        gap: 12px;
    }

    .rank-row h2 {
        font-size: 18px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid.large-feature,
    .channel-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

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