:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --accent: #f59e0b;
    --accent-deep: #ea580c;
    --blue: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--ink);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 74px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.logo-mark {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff;
    box-shadow: 0 12px 28px rgba(234, 88, 12, 0.32);
}

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

.nav-links a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    background: #fff7ed;
    color: var(--accent-deep);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(320px, 34vw);
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 4px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-search:focus-within {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 9px 12px;
    color: var(--ink);
}

.header-search button,
.search-panel button,
.primary-button,
.secondary-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search button,
.primary-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff;
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.24);
}

.header-search button {
    padding: 8px 13px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
}

.secondary-button {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.primary-button:hover,
.secondary-button:hover,
.header-search button:hover,
.search-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(234, 88, 12, 0.28);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--ink);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    background: #0f172a;
    color: #fff;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.36), transparent 34%), radial-gradient(circle at 80% 25%, rgba(37, 99, 235, 0.32), transparent 28%);
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.75) 45%, rgba(15, 23, 42, 0.24) 100%), linear-gradient(0deg, #0f172a 0%, transparent 36%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 42px;
    align-items: center;
    min-height: 650px;
    padding: 72px 0 92px;
}

.hero-kicker,
.section-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    margin: 18px 0 16px;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 760px;
    margin: 0 0 26px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.9;
}

.hero-meta,
.card-meta,
.movie-meta,
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.hero-meta span,
.movie-meta span,
.card-meta span,
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 750;
}

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

.hero-poster {
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 38px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

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

.section {
    padding: 58px 0;
}

.section-tight {
    padding: 34px 0;
}

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

.section-title {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(245, 158, 11, 0.38);
    box-shadow: var(--shadow);
}

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

.movie-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.08);
    opacity: 0.92;
}

.movie-type {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.movie-duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card h3 a:hover,
.text-link:hover {
    color: var(--accent-deep);
}

.movie-card p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.card-meta span,
.movie-meta span {
    background: #f1f5f9;
    color: #475569;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 185px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 55%, #eff6ff 100%);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 950;
}

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

.category-count {
    display: inline-flex;
    margin-top: 22px;
    border-radius: 999px;
    padding: 6px 11px;
    background: #0f172a;
    color: #fff;
    font-size: 13px;
    font-weight: 850;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 132px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-number {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff;
    font-weight: 950;
}

.rank-poster {
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    padding: 68px 0 46px;
    background: radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.18), transparent 28%), linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
}

.page-hero h1 {
    margin: 12px 0 12px;
    max-width: 860px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

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

.filter-bar,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--ink);
    outline: 0;
    padding: 0 15px;
}

.filter-bar input,
.search-panel input {
    flex: 1 1 260px;
}

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

.search-panel button {
    min-height: 46px;
    padding: 0 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff;
}

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

.panel {
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.panel-pad {
    padding: 24px;
}

.breadcrumb {
    margin: 26px 0 18px;
    color: #475569;
    font-size: 14px;
}

.breadcrumb a {
    color: #2563eb;
    font-weight: 800;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.35);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #020617;
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.12));
}

.play-button {
    position: relative;
    z-index: 4;
    display: flex;
    width: 86px;
    height: 86px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 20px 45px rgba(234, 88, 12, 0.36);
    transition: transform 0.25s ease;
}

.play-button:hover {
    transform: scale(1.07);
}

.detail-title {
    margin: 20px 0 14px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.content-block h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.content-block p {
    margin: 0 0 18px;
    color: #334155;
    text-align: justify;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.tag-list span {
    border-radius: 999px;
    padding: 6px 11px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 13px;
    font-weight: 800;
}

.side-panel {
    position: sticky;
    top: 98px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    transition: background 0.25s ease;
}

.related-item:hover {
    background: #f8fafc;
}

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

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

.related-info h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 900;
}

.related-info p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 58px;
    padding: 38px 0;
    background: #0f172a;
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 24px;
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 12px;
    color: #fff;
}

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

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

.empty-state {
    display: none;
    padding: 44px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    text-align: center;
    color: var(--muted);
}

.empty-state.is-visible {
    display: block;
}

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

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

    .hero-poster {
        display: none;
    }

    .ranking-list {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 66px;
    }

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

    .nav-links,
    .header-search {
        display: none;
    }

    .site-header.is-open .nav-links,
    .site-header.is-open .header-search {
        position: absolute;
        left: 16px;
        right: 16px;
        display: flex;
        background: #fff;
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

    .site-header.is-open .nav-links {
        top: 76px;
        flex-direction: column;
        align-items: stretch;
        border-radius: 18px 18px 0 0;
        padding: 12px;
    }

    .site-header.is-open .header-search {
        top: 260px;
        width: auto;
        border-radius: 0 0 18px 18px;
        padding: 10px;
    }

    .hero,
    .hero-content {
        min-height: 560px;
    }

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

    .rank-item {
        grid-template-columns: 46px 105px minmax(0, 1fr);
    }
}

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

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

    .hero-content {
        padding-top: 50px;
    }

    .section {
        padding: 42px 0;
    }

    .section-head {
        display: block;
    }

    .rank-item,
    .related-item {
        grid-template-columns: 1fr;
    }

    .rank-poster img,
    .related-thumb img {
        aspect-ratio: 16 / 9;
    }

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