:root {
    --bg: #fafaf9;
    --bg-soft: #f5f5f4;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #64748b;
    --line: #e7e5e4;
    --accent: #d97706;
    --accent-dark: #b45309;
    --accent-soft: #fff7ed;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 250, 249, 0.92);
    border-bottom: 1px solid rgba(231, 229, 228, 0.9);
    backdrop-filter: blur(16px);
}

.nav-shell {
    max-width: 1280px;
    height: 76px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #0f172a;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.brand-text {
    font-size: 24px;
    letter-spacing: 0.04em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    color: #334155;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
}

.nav-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    outline: none;
    padding: 11px 13px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.nav-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.filter-button {
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--accent);
    padding: 11px 16px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.filter-button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.24);
}

.secondary-btn {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
}

.secondary-btn:hover {
    background: #fff;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #0f172a;
    border-radius: 999px;
}

.mobile-menu {
    padding: 12px 24px 20px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.mobile-link {
    display: block;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.category-ribbon {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 12px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.category-ribbon a {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    border: 1px solid var(--line);
    transition: color 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.category-ribbon a:hover {
    color: var(--accent-dark);
    border-color: #fcd34d;
    background: var(--accent-soft);
}

.hero {
    position: relative;
    height: 78vh;
    min-height: 560px;
    overflow: hidden;
    background: #0f172a;
}

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

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

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

.hero-slide.is-active img {
    animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
    from {
        transform: scale(1.04);
    }
    to {
        transform: scale(1.11);
    }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 80px 24px 56px;
}

.hero-copy {
    max-width: 900px;
    margin: 0 auto;
}

.eyebrow {
    margin: 0 0 14px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 13px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 780px;
    margin: 22px auto 30px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-meta {
    justify-content: center;
    margin-bottom: 26px;
}

.hero-meta span,
.detail-tags span,
.meta-row span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 28px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    bottom: 28px;
    left: 50%;
    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.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

main {
    min-height: 70vh;
}

.section,
.page-section {
    padding: 62px 24px;
}

.section.alt {
    background: linear-gradient(180deg, #fff, #f5f5f4);
}

.shell {
    max-width: 1280px;
    margin: 0 auto;
}

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

.section-head h2,
.filter-panel h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #1e293b;
    line-height: 1.15;
}

.section-head h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.section-head p,
.page-hero p,
.filter-panel p,
.footer-brand p,
.detail-title p,
.detail-copy p {
    color: var(--muted);
}

.section-link {
    color: var(--accent-dark);
    font-weight: 800;
}

.movie-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 0 20px;
    scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
    width: 320px;
    flex: 0 0 320px;
    scroll-snap-align: start;
}

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

.movie-card {
    background: var(--card);
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: #fed7aa;
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.movie-cover img,
.horizontal-cover img,
.detail-poster img,
.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .movie-cover img,
.horizontal-card:hover .horizontal-cover img,
.category-card:hover .category-cover img {
    transform: scale(1.08);
}

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.movie-year {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: rgba(217, 119, 6, 0.92);
}

.play-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 44px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.25);
    transition: opacity 0.2s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.movie-info {
    padding: 17px;
}

.movie-info h2,
.horizontal-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h2 a:hover,
.horizontal-card h2 a:hover,
.rank-list a:hover {
    color: var(--accent-dark);
}

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

.meta-row span {
    color: #475569;
    background: #f1f5f9;
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.horizontal-cover {
    position: relative;
    min-height: 140px;
    overflow: hidden;
}

.horizontal-cover span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    background: rgba(0, 0, 0, 0.15);
}

.horizontal-card > div:last-child {
    padding: 18px 18px 18px 0;
}

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

.channel-card,
.category-card,
.filter-panel,
.rank-panel,
.detail-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.channel-card {
    padding: 22px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.channel-card h2,
.category-card h2 {
    margin: 0 0 10px;
    color: #1e293b;
    font-size: 22px;
}

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

.page-hero {
    padding: 70px 24px 42px;
    background: radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.22), transparent 34%), linear-gradient(180deg, #fff, #f5f5f4);
}

.page-hero .shell {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 34px;
    align-items: center;
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 56px);
    letter-spacing: -0.03em;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    font-size: 18px;
}

.page-stat-card {
    padding: 26px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, #1e293b, #92400e);
    box-shadow: var(--shadow);
}

.page-stat-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.page-stat-card p {
    color: rgba(255, 255, 255, 0.84);
    margin: 0;
}

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

.category-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    overflow: hidden;
}

.category-cover {
    min-height: 180px;
    overflow: hidden;
    background: #111827;
}

.category-card .category-body {
    padding: 22px;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mini-links a {
    color: #92400e;
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
}

.filter-panel {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
    padding: 24px;
    margin-bottom: 30px;
}

.filter-panel h2 {
    font-size: 28px;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.9fr 0.9fr;
    gap: 12px;
    align-items: center;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.rank-panel {
    padding: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.rank-no {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    font-weight: 900;
}

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

.rank-title a {
    display: block;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-title span,
.rank-heat {
    color: var(--muted);
    font-size: 13px;
}

.detail-hero {
    padding: 48px 24px;
    background: radial-gradient(circle at 10% 0%, rgba(251, 191, 36, 0.22), transparent 30%), linear-gradient(180deg, #fff, #f5f5f4);
}

.breadcrumb {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--accent-dark);
}

.detail-top {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #111827;
    box-shadow: var(--shadow);
}

.detail-title h1 {
    font-size: clamp(36px, 6vw, 58px);
    letter-spacing: -0.04em;
}

.detail-title p {
    max-width: 820px;
    font-size: 18px;
}

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

.detail-tags span {
    color: #92400e;
    background: var(--accent-soft);
}

.watch-section {
    padding: 44px 24px 20px;
}

.player-wrap {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-wrap video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.28), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(217, 119, 6, 0.92);
    box-shadow: 0 18px 36px rgba(217, 119, 6, 0.34);
    font-size: 36px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    transform: scale(1.08);
    background: var(--accent-dark);
}

.detail-content {
    padding: 44px 24px 72px;
}

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

.detail-panel {
    padding: 28px;
}

.detail-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-copy p {
    margin: 0 0 18px;
    color: #475569;
    font-size: 17px;
}

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

.info-list div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    font-weight: 700;
}

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

.next-prev {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
}

.next-prev a {
    flex: 1;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    color: #92400e;
    font-weight: 800;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #f5f5f4, #e7e5e4);
}

.footer-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px 28px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand p {
    max-width: 420px;
}

.footer-links h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.footer-grid {
    display: grid;
    gap: 8px;
}

.footer-grid a {
    color: #475569;
}

.footer-grid a:hover {
    color: var(--accent-dark);
}

.footer-copy {
    margin: 0;
    padding: 18px 24px 28px;
    text-align: center;
    color: #64748b;
    border-top: 1px solid #d6d3d1;
}

[hidden] {
    display: none !important;
}

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

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

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

    .filter-panel,
    .page-hero .shell,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 820px) {
    .nav-shell {
        height: 66px;
        padding: 0 16px;
    }

    .nav-links,
    .category-ribbon {
        display: none;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .brand-text {
        font-size: 21px;
    }

    .hero {
        min-height: 560px;
        height: 72vh;
    }

    .hero-control {
        display: none;
    }

    .section,
    .page-section,
    .detail-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-head {
        display: block;
    }

    .section-link {
        display: inline-block;
        margin-top: 10px;
    }

    .movie-grid,
    .related-grid,
    .category-overview,
    .rank-layout,
    .footer-shell,
    .detail-top {
        grid-template-columns: 1fr;
    }

    .category-card,
    .horizontal-card {
        grid-template-columns: 1fr;
    }

    .horizontal-card > div:last-child {
        padding: 18px;
    }

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

    .movie-row .movie-card {
        width: 280px;
        flex-basis: 280px;
    }

    .rank-item {
        grid-template-columns: 44px 1fr;
    }

    .rank-heat {
        grid-column: 2;
    }
}

@media (max-width: 520px) {
    .hero h1 {
        font-size: 38px;
    }

    .hero p,
    .detail-title p,
    .page-hero p {
        font-size: 16px;
    }

    .page-hero,
    .detail-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .detail-poster {
        aspect-ratio: 16 / 11;
    }

    .play-button {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }
}
