:root {
    --page-bg: #020617;
    --panel-bg: #0f172a;
    --panel-soft: #111827;
    --card-bg: #111827;
    --card-border: rgba(148, 163, 184, 0.18);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-2: #ea580c;
    --accent-3: #f97316;
    --danger: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
        radial-gradient(circle at 80% 12%, rgba(239, 68, 68, 0.14), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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: 80;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.35);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong,
.footer-brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.main-nav,
.mobile-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a,
.mobile-nav a {
    padding: 10px 16px;
    border-radius: 12px;
    color: var(--text-soft);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #ffffff;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(51, 65, 85, 0.9);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    flex-direction: column;
    align-items: stretch;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #020617;
}

.hero-stage {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 640px;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.08);
    transform: scale(1.04);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 40%, rgba(2, 6, 23, 0.28) 76%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.15) 48%, rgba(2, 6, 23, 0.65) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: center;
    gap: 56px;
    padding: 70px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--text-soft);
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin: 24px 0 0;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.hero-poster span {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-weight: 800;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.content-section {
    padding: 64px 0;
}

.muted-section {
    background: rgba(15, 23, 42, 0.55);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

.section-more,
.text-link {
    min-height: 40px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.26);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 190px));
    gap: 14px;
    margin-bottom: 32px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--text-muted);
    font-size: 13px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    outline: none;
    color: #ffffff;
    background: rgba(30, 41, 59, 0.98);
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border: 1px solid var(--card-border);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.rating-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
    font-size: 13px;
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: rgba(0, 0, 0, 0.42);
    transition: opacity 0.25s ease;
}

.poster-mask span {
    padding: 10px 18px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 800;
}

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

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #ffffff;
    font-weight: 800;
    font-size: 17px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-title:hover {
    color: #fbbf24;
}

.card-meta,
.card-desc {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: var(--text-soft);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    margin-top: 12px;
}

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

.category-card,
.category-overview-card {
    display: block;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98));
    border: 1px solid var(--card-border);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.4);
}

.category-covers,
.overview-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.category-covers img,
.overview-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    object-fit: cover;
}

.category-card h3,
.category-overview-card h2 {
    margin: 0;
    font-size: 20px;
}

.category-card p,
.category-overview-card p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 32px;
    align-items: start;
}

.rank-panel,
.article-card,
.related-panel,
.table-wrap {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.rank-panel h2,
.related-panel h2,
.article-card h2 {
    margin: 0 0 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 64px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.72);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(245, 158, 11, 0.16);
    transform: translateX(3px);
}

.rank-num,
.table-rank {
    color: #fbbf24;
    font-weight: 900;
}

.rank-item img {
    width: 64px;
    height: 84px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    padding: 86px 0;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.82)),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 30rem);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.small-hero p,
.channel-hero p {
    max-width: 760px;
    color: var(--text-soft);
    font-size: 18px;
}

.channel-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
    gap: 28px;
    align-items: center;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
}

.compact-card .poster-link img {
    height: 100%;
    aspect-ratio: 2 / 3;
}

.compact-card .card-title {
    min-height: auto;
    font-size: 15px;
}

.compact-card .card-desc,
.compact-card .tag-row {
    display: none;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
}

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

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.rank-table th,
.rank-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    text-align: left;
}

.rank-table th {
    color: #fbbf24;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(30, 41, 59, 0.72);
}

.rank-table a:hover {
    color: #fbbf24;
}

.detail-shell {
    padding: 46px 0 26px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94)),
        radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.15), transparent 20rem);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
}

.detail-line {
    margin: 18px 0 0;
    color: var(--text-soft);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.detail-tags {
    margin: 22px 0 0;
}

.player-section {
    padding: 22px 0 54px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.5));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 45px rgba(245, 158, 11, 0.36);
    font-size: 32px;
    transform: translateX(3px);
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.article-card,
.related-panel {
    padding: 28px;
}

.article-card p {
    margin: 0 0 24px;
    color: var(--text-soft);
    font-size: 16px;
}

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

.site-footer {
    padding: 54px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), #020617);
}

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

.footer-grid p {
    max-width: 680px;
    color: var(--text-muted);
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(30, 41, 59, 0.85);
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 22px;
    color: var(--text-muted);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

.is-filtered-out {
    display: none !important;
}

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

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

    .split-layout,
    .detail-content-grid,
    .channel-hero-grid {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .main-nav {
        display: none;
    }

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

    .site-header.is-open .mobile-nav {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-items: end;
        padding: 92px 0 80px;
    }

    .hero-poster {
        display: none;
    }

    .hero-carousel,
    .hero-stage,
    .hero-image {
        min-height: 620px;
    }

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

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .mini-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-overview-card,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 260px;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .hero-desc,
    .detail-line,
    .small-hero p,
    .channel-hero p {
        font-size: 15px;
    }

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .mini-feature-grid {
        grid-template-columns: 1fr;
    }

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

    .section-heading {
        display: block;
    }

    .section-more {
        margin-top: 14px;
    }

    .detail-grid,
    .article-card,
    .related-panel {
        padding: 18px;
    }

    .play-overlay span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
