:root {
    --primary-50: #fef8f2;
    --primary-100: #fdecd8;
    --primary-400: #f29d5b;
    --primary-500: #ee7f38;
    --primary-600: #e0642d;
    --primary-700: #ba4d27;
    --accent-50: #fefce8;
    --accent-100: #fef9c3;
    --accent-500: #eab308;
    --secondary-50: #f5f5f4;
    --secondary-500: #736d5f;
    --secondary-700: #4d4944;
    --secondary-800: #433f3c;
    --warm-50: #fdf8f6;
    --warm-100: #f2e8e5;
    --warm-200: #eaddd7;
    --warm-500: #bfa094;
    --white: #ffffff;
    --shadow-sm: 0 6px 18px rgba(67, 63, 60, 0.08);
    --shadow-md: 0 12px 30px rgba(67, 63, 60, 0.12);
    --shadow-lg: 0 22px 55px rgba(67, 63, 60, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--warm-50);
    color: var(--secondary-800);
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(67, 63, 60, 0.09);
    backdrop-filter: blur(18px);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--secondary-800);
    letter-spacing: 0.01em;
}

.brand {
    font-size: 22px;
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    color: var(--white);
    font-size: 14px;
    box-shadow: 0 8px 18px rgba(238, 127, 56, 0.35);
}

.desktop-menu {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 600;
    color: var(--secondary-700);
}

.desktop-menu a,
.mobile-menu a,
.footer-grid a {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-menu a:hover,
.mobile-menu a:hover,
.footer-grid a:hover {
    color: var(--primary-500);
}

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

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

.mobile-menu {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--warm-200);
    background: rgba(255, 255, 255, 0.98);
}

.mobile-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--secondary-700);
    font-weight: 600;
}

.mobile-menu.is-open {
    display: block;
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 72px 0 64px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-400) 48%, var(--accent-500));
}

.hero-section::before,
.hero-section::after {
    position: absolute;
    content: "";
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    filter: blur(4px);
}

.hero-section::before {
    top: -160px;
    left: -110px;
}

.hero-section::after {
    right: -140px;
    bottom: -190px;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 850px;
    margin: 0 auto 34px;
    text-align: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0;
    color: var(--primary-50);
    font-size: clamp(17px, 2vw, 22px);
}

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

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

.hero-feature-grid .movie-card-large {
    min-height: 330px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--white);
    color: var(--primary-700);
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(67, 63, 60, 0.13);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.page-hero {
    padding: 58px 0;
    color: var(--white);
    background: linear-gradient(120deg, var(--secondary-700), var(--secondary-500));
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.2;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--warm-100);
    font-size: 18px;
}

.section-block {
    padding: 54px 0;
}

.section-block.white {
    background: var(--white);
}

.section-block.soft {
    background: linear-gradient(90deg, var(--warm-100), var(--primary-50));
}

.section-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2 {
    margin: 0;
    color: var(--secondary-800);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-head span {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-500), transparent);
}

.section-head.accent span {
    background: linear-gradient(90deg, var(--accent-500), transparent);
}

.section-more {
    flex: 0 0 auto;
    color: var(--primary-600);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-link {
    position: relative;
    display: block;
    min-height: 100%;
}

.poster-frame {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--secondary-800);
}

.poster-wide {
    aspect-ratio: 16 / 9;
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.48s ease, filter 0.48s ease;
}

.movie-card:hover img,
.compact-card:hover img,
.category-card:hover img,
.ranking-item:hover img {
    transform: scale(1.06);
    filter: saturate(1.08);
}

.movie-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary-500);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.play-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-500);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.24s ease, transform 0.24s ease;
    box-shadow: var(--shadow-md);
}

.movie-card:hover .play-hover,
.compact-card:hover .play-hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3,
.compact-card h3,
.ranking-item h2 {
    margin: 0 0 8px;
    color: var(--secondary-800);
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover h3,
.compact-card:hover h3,
.ranking-item:hover h2 {
    color: var(--primary-500);
}

.movie-card-body p,
.compact-card p,
.ranking-item p {
    margin: 0 0 14px;
    color: var(--secondary-500);
    font-size: 14px;
    line-height: 1.55;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    color: var(--secondary-500);
    font-size: 13px;
}

.movie-card-large {
    position: relative;
    min-height: 300px;
    border-radius: 22px;
    background: transparent;
    box-shadow: var(--shadow-lg);
}

.movie-card-large .movie-link,
.movie-card-large .poster-frame {
    height: 100%;
    min-height: inherit;
    border-radius: inherit;
}

.movie-card-large .poster-frame::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18) 56%, rgba(0, 0, 0, 0.05));
}

.movie-overlay-text {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    padding: 24px;
    color: var(--white);
}

.movie-overlay-text h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.22;
}

.movie-overlay-text p {
    margin: 0 0 12px;
    color: var(--warm-100);
    font-size: 14px;
}

.movie-overlay-text .meta-row {
    color: var(--warm-100);
}

.horizontal-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
}

.horizontal-row {
    display: flex;
    gap: 18px;
    min-width: max-content;
}

.horizontal-row .movie-card {
    width: 260px;
}

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

.compact-card {
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.compact-card a {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    padding: 10px;
}

.compact-card figure {
    margin: 0;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    background: var(--secondary-800);
}

.compact-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.compact-card div {
    min-width: 0;
}

.compact-card span {
    color: var(--secondary-500);
    font-size: 12px;
}

.search-panel {
    padding: 18px;
    margin: 0 0 26px;
    border: 1px solid var(--warm-200);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
}

.search-panel label {
    display: grid;
    gap: 8px;
    color: var(--secondary-700);
    font-weight: 800;
}

.search-panel input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--warm-200);
    border-radius: 14px;
    outline: 0;
    background: var(--white);
    color: var(--secondary-800);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -8px 0 26px;
}

.filter-pill {
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid var(--warm-200);
    border-radius: 999px;
    background: var(--white);
    color: var(--secondary-700);
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-pill:hover,
.filter-pill.is-active {
    background: var(--primary-500);
    color: var(--white);
    transform: translateY(-1px);
}

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

.category-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card figure {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.category-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.category-card div {
    padding: 18px;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--secondary-500);
    font-size: 14px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 64px 160px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.rank-num {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    color: var(--white);
    font-weight: 900;
}

.ranking-item figure {
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 9;
    background: var(--secondary-800);
}

.ranking-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.ranking-item h2 {
    font-size: 20px;
}

.detail-wrap {
    padding: 34px 0 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--secondary-500);
    font-size: 14px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
    gap: 28px;
    align-items: start;
}

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

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

.movie-player {
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.12));
    color: var(--white);
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-overlay-inner {
    display: grid;
    gap: 12px;
    justify-items: center;
    font-size: 18px;
    font-weight: 900;
}

.play-circle {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-500);
    font-size: 28px;
    box-shadow: var(--shadow-lg);
}

.player-error {
    display: none;
    position: absolute;
    inset: 0;
    place-items: center;
    padding: 24px;
    color: var(--white);
    text-align: center;
    background: rgba(0, 0, 0, 0.72);
}

.player-error.is-visible {
    display: grid;
}

.detail-panel {
    padding: 28px;
}

.detail-panel h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.18;
}

.badge-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 26px;
}

.badge-row span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--warm-100);
    color: var(--secondary-700);
    font-size: 13px;
    font-weight: 800;
}

.badge-row span:nth-child(3n),
.tag-row span:nth-child(3n) {
    background: var(--primary-100);
    color: var(--primary-700);
}

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

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: var(--secondary-700);
}

.review-box {
    padding: 18px;
    border-radius: 16px;
    background: var(--warm-50);
}

.sidebar-card {
    padding: 18px;
}

.sidebar-card figure {
    margin: 0 0 16px;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 9;
    background: var(--secondary-800);
}

.sidebar-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.sidebar-related {
    display: grid;
    gap: 12px;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

.footer-brand {
    color: var(--white);
    font-size: 22px;
}

.footer-main p,
.footer-grid li,
.footer-grid a {
    color: var(--warm-200);
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-grid ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-grid li + li {
    margin-top: 8px;
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--warm-200);
    text-align: center;
    font-size: 14px;
}

.is-hidden-by-filter,
.is-hidden-by-search {
    display: none !important;
}

@media (max-width: 1050px) {
    .desktop-menu {
        display: none;
    }

    .mobile-toggle {
        display: inline-block;
    }

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

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

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

@media (max-width: 720px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero-section {
        padding: 52px 0 44px;
    }

    .hero-feature-grid,
    .movie-grid,
    .movie-grid.three,
    .category-grid,
    .related-grid,
    .compact-list {
        grid-template-columns: 1fr;
    }

    .compact-card a,
    .ranking-item {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .ranking-item .rank-num {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .ranking-item {
        position: relative;
        padding-left: 14px;
    }

    .ranking-item figure {
        grid-column: 1;
        grid-row: 1;
    }

    .ranking-item > a {
        grid-column: 2;
    }

    .section-head {
        flex-wrap: wrap;
    }

    .section-head span {
        flex-basis: 100%;
        order: 3;
    }

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

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }
}
