@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;900&display=swap");

:root {
    --primary-50: #fef8f2;
    --primary-100: #fbe8d4;
    --primary-400: #f29d5b;
    --primary-500: #ee7f38;
    --primary-600: #e0642d;
    --primary-700: #ba4d27;
    --accent-50: #fefce8;
    --accent-100: #fef3c7;
    --accent-500: #eab308;
    --accent-700: #a16207;
    --secondary-50: #f5f5f4;
    --secondary-100: #e7e6e3;
    --secondary-500: #736d5f;
    --secondary-600: #5d5951;
    --secondary-700: #4d4944;
    --secondary-800: #433f3c;
    --warm-50: #fdf8f6;
    --warm-100: #f2e8e5;
    --warm-200: #eaddd7;
    --warm-300: #e0cec7;
    --warm-800: #846358;
    --white: #ffffff;
    --black: #111111;
    --shadow-sm: 0 6px 18px rgba(67, 63, 60, 0.08);
    --shadow-md: 0 14px 35px rgba(67, 63, 60, 0.12);
    --shadow-lg: 0 22px 70px rgba(67, 63, 60, 0.18);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    background: var(--warm-50);
    color: var(--secondary-800);
    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(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(234, 221, 215, 0.8);
    box-shadow: 0 8px 28px rgba(67, 63, 60, 0.08);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    color: var(--secondary-800);
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    color: var(--white);
    box-shadow: 0 12px 24px rgba(238, 127, 56, 0.32);
    font-size: 14px;
}

.brand-light {
    color: var(--white);
}

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

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: var(--secondary-700);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary-600);
    background: var(--primary-50);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--warm-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--secondary-700);
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 12px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.mobile-panel.is-open {
    display: grid;
    gap: 6px;
}

.mobile-nav-link {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--secondary-700);
    font-weight: 700;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    background: var(--warm-100);
    color: var(--primary-600);
}

.hero-section {
    color: var(--white);
    background:
        radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.24), transparent 28%),
        radial-gradient(circle at 84% 8%, rgba(234, 179, 8, 0.36), transparent 34%),
        linear-gradient(135deg, var(--primary-500), var(--primary-400) 46%, var(--accent-500));
    overflow: hidden;
}

.hero-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 78px;
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 42px;
    align-items: center;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: currentColor;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-hero p {
    max-width: 720px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.hero-search {
    margin-top: 30px;
    display: flex;
    max-width: 560px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 12px 18px;
    background: transparent;
    color: var(--secondary-800);
}

.hero-search button,
.filter-reset {
    border: 0;
    border-radius: 999px;
    background: var(--primary-500);
    color: var(--white);
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-search button:hover,
.filter-reset:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

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

.hero-actions a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-actions a:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateY(-2px);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

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

.section-white {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: var(--white);
}

.section-heading {
    display: flex;
    align-items: end;
    gap: 24px;
    margin-bottom: 26px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    color: var(--secondary-800);
    font-weight: 900;
}

.section-heading p {
    margin: 7px 0 0;
    color: var(--secondary-600);
}

.section-heading span {
    flex: 1;
    height: 4px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-500), rgba(238, 127, 56, 0));
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--warm-100), var(--primary-50));
}

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

.movie-card:hover .poster-wrap img,
.compact-card:hover img,
.category-overview-card:hover img {
    transform: scale(1.06);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12) 58%, transparent);
}

.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(238, 127, 56, 0.92);
    color: var(--white);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: rgba(67, 63, 60, 0.86);
}

.play-chip {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 54px;
    height: 54px;
    margin: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-500);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: scale(1);
}

.card-copy,
.large-card-copy {
    display: block;
    padding: 16px;
}

.card-copy strong,
.large-card-copy strong {
    display: block;
    color: var(--secondary-800);
    font-size: 17px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-copy em,
.large-card-copy em {
    display: -webkit-box;
    min-height: 44px;
    margin-top: 8px;
    color: var(--secondary-600);
    font-size: 14px;
    font-style: normal;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-copy span,
.large-card-copy span {
    display: block;
    margin-top: 12px;
    color: var(--secondary-500);
    font-size: 13px;
    font-weight: 700;
}

.movie-card-large {
    position: relative;
    min-height: 320px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-lg);
}

.movie-card-large .poster-wrap {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

.movie-card-large .large-card-copy {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    color: var(--white);
    padding: 22px;
}

.movie-card-large .large-card-copy strong {
    color: var(--white);
    font-size: 24px;
}

.movie-card-large .large-card-copy em,
.movie-card-large .large-card-copy span {
    color: rgba(255, 255, 255, 0.86);
}

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

.category-tile,
.category-overview-card {
    display: block;
    min-height: 160px;
    padding: 22px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-tile strong,
.category-overview-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--secondary-800);
    font-size: 20px;
    font-weight: 900;
}

.category-tile span,
.category-overview-card em {
    color: var(--secondary-600);
    font-style: normal;
    font-size: 14px;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 18px;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    object-fit: cover;
    background: var(--warm-100);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
    gap: 34px;
    align-items: start;
}

.ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 15px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-list a:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.ranking-list span {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-500);
    color: var(--white);
    font-weight: 900;
}

.ranking-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-list em {
    color: var(--secondary-500);
    font-style: normal;
    font-size: 13px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 15px;
    background: var(--white);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: var(--warm-50);
    transform: translateX(3px);
}

.compact-cover {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 12px;
    background: var(--warm-100);
}

.compact-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.compact-info strong {
    display: block;
    color: var(--secondary-800);
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-info em {
    display: block;
    margin-top: 4px;
    color: var(--secondary-500);
    font-size: 13px;
    font-style: normal;
}

.page-hero,
.detail-hero {
    position: relative;
    color: var(--white);
    background: linear-gradient(135deg, var(--secondary-700), var(--secondary-600));
    overflow: hidden;
}

.page-hero-warm {
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
}

.page-hero-inner,
.detail-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
    position: relative;
    z-index: 2;
}

.page-hero .eyebrow,
.detail-hero .eyebrow {
    background: rgba(255, 255, 255, 0.16);
}

.breadcrumb,
.breadcrumb-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 800;
}

.breadcrumb-line strong {
    color: var(--white);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 170px auto;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.filter-bar-wide {
    grid-template-columns: minmax(0, 1fr) 190px 190px auto;
}

.filter-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--warm-200);
    border-radius: 999px;
    outline: 0;
    background: var(--warm-50);
    color: var(--secondary-800);
    padding: 0 16px;
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(238, 127, 56, 0.13);
}

.detail-hero {
    min-height: 360px;
    display: flex;
    align-items: end;
    background: var(--secondary-800);
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    filter: blur(2px) saturate(1.1);
    transform: scale(1.02);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(67, 63, 60, 0.96), rgba(67, 63, 60, 0.66) 48%, rgba(67, 63, 60, 0.42));
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card,
.detail-card,
.sticky-panel {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.56));
    color: var(--white);
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(238, 127, 56, 0.94);
    color: var(--white);
    font-size: 28px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

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

.detail-card {
    padding: 28px;
}

.detail-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
}

.detail-title-row h2 {
    margin: 0;
    color: var(--secondary-800);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
}

.category-pill {
    flex: 0 0 auto;
    padding: 9px 13px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 900;
}

.meta-pills,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 24px;
}

.meta-pills span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--warm-100);
    color: var(--secondary-700);
    font-size: 14px;
    font-weight: 800;
}

.tag-list {
    margin-bottom: 0;
}

.tag-list span {
    background: var(--accent-100);
    color: var(--accent-700);
}

.detail-card section {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--warm-200);
}

.detail-card section h3,
.sticky-panel h2 {
    margin: 0 0 12px;
    color: var(--secondary-800);
    font-size: 21px;
    font-weight: 900;
}

.detail-card section p {
    margin: 0;
    color: var(--secondary-700);
    white-space: pre-line;
}

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

.sticky-panel {
    padding: 20px;
    margin-bottom: 18px;
}

@supports (position: sticky) {
    .sticky-panel {
        position: sticky;
        top: 88px;
    }
}

.ranking-split {
    grid-template-columns: minmax(0, 1fr) 360px;
}

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

.site-footer {
    background: var(--secondary-800);
    color: var(--warm-100);
    margin-top: 20px;
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 24px;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 0.7fr 0.8fr;
    gap: 34px;
}

.footer-brand p {
    max-width: 560px;
    color: var(--warm-200);
}

.footer-column h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.footer-column a {
    color: var(--warm-200);
    font-size: 14px;
}

.footer-column a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(224, 206, 199, 0.2);
    color: var(--warm-300);
    font-size: 14px;
}

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

@media (max-width: 1024px) {
    .hero-shell,
    .split-section,
    .detail-layout,
    .ranking-split,
    .footer-main {
        grid-template-columns: 1fr;
    }

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

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

    .detail-hero {
        min-height: 300px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-shell {
        padding: 48px 0;
    }

    .hero-search,
    .filter-bar,
    .filter-bar-wide {
        grid-template-columns: 1fr;
        border-radius: var(--radius-md);
    }

    .hero-search {
        display: grid;
    }

    .hero-search button,
    .filter-reset {
        width: 100%;
    }

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

    .movie-card-large {
        min-height: 260px;
    }

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

    .section-heading span {
        width: 100%;
    }

    .ranking-list a {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .ranking-list em {
        grid-column: 2;
    }

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

    .detail-title-row,
    .footer-bottom {
        flex-direction: column;
        align-items: start;
    }

    .detail-card {
        padding: 20px;
    }

    .page-hero-inner,
    .detail-hero-inner,
    .content-section,
    .footer-shell,
    .nav-shell,
    .mobile-panel {
        width: min(100% - 24px, 1180px);
    }
}
