@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: #fdeee0;
    --primary-400: #f29d5b;
    --primary-500: #ee7f38;
    --primary-600: #e0642d;
    --primary-700: #ba4d27;
    --accent-50: #fefce8;
    --accent-100: #fef9c3;
    --accent-500: #eab308;
    --accent-700: #a16207;
    --warm-50: #fdf8f6;
    --warm-100: #f2e8e5;
    --warm-200: #eaddd7;
    --warm-500: #bfa094;
    --warm-800: #846358;
    --ink: #2d1b16;
    --muted: #7c6259;
    --card: #ffffff;
    --shadow: 0 20px 55px rgba(148, 62, 38, 0.16);
    --shadow-soft: 0 10px 30px rgba(148, 62, 38, 0.10);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--warm-50);
    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;
    width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(253, 248, 246, 0.88);
    border-bottom: 1px solid rgba(234, 221, 215, 0.72);
    backdrop-filter: blur(18px);
}

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

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

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

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

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

.nav-link {
    padding: 10px 16px;
    color: var(--warm-800);
    border-radius: 999px;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: var(--primary-500);
}

.menu-button {
    display: none;
    border: 0;
    color: var(--primary-700);
    background: var(--primary-100);
    border-radius: 14px;
    padding: 10px 13px;
    font-size: 22px;
    cursor: pointer;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-400) 52%, var(--accent-500));
}

.hero::before,
.hero::after {
    position: absolute;
    content: "";
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.45;
}

.hero::before {
    width: 360px;
    height: 360px;
    top: -120px;
    right: 6vw;
    background: rgba(255, 255, 255, 0.25);
}

.hero::after {
    width: 280px;
    height: 280px;
    left: -90px;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.18);
}

.hero-slide {
    display: none;
    min-height: 560px;
    position: relative;
    isolation: isolate;
}

.hero-slide.is-active {
    display: block;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: linear-gradient(90deg, rgba(45, 27, 22, 0.88), rgba(224, 100, 45, 0.68), rgba(234, 179, 8, 0.50)), var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
}

.hero-slide-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.22), transparent 28%), linear-gradient(0deg, rgba(45, 27, 22, 0.58), transparent 45%);
}

.hero-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 360px;
    gap: 40px;
    align-items: center;
    padding: 54px 0 74px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    color: var(--primary-50);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    max-width: 740px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span {
    padding: 7px 13px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    font-weight: 700;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 900;
    border: 1px solid transparent;
    cursor: pointer;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    box-shadow: 0 18px 30px rgba(148, 62, 38, 0.22);
}

.secondary-btn {
    color: var(--primary-700);
    background: #fff;
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    pointer-events: none;
}

.hero-arrows,
.hero-dots {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 20px;
}

.hero-dot {
    width: 28px;
    height: 8px;
    background: rgba(255, 255, 255, 0.42);
    border-radius: 999px;
}

.hero-dot.is-active {
    width: 48px;
    background: #fff;
}

.main-section {
    padding: 58px 0;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(234, 221, 215, 0.86);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
}

.poster-link img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.25s ease;
}

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

.year-badge,
.rank-badge,
.card-play {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.year-badge {
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(45, 27, 22, 0.68);
    border-radius: 999px;
    font-size: 12px;
}

.rank-badge {
    top: 12px;
    right: 12px;
    min-width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    border-radius: 12px;
}

.card-play {
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    color: var(--primary-700);
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: all 0.2s ease;
}

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

.card-body {
    padding: 16px;
}

.card-meta {
    color: var(--primary-700);
    font-size: 13px;
    font-weight: 800;
}

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

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span {
    padding: 4px 8px;
    color: var(--accent-700);
    background: var(--accent-50);
    border: 1px solid var(--accent-100);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-400) 58%, var(--accent-500));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

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

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.category-card span {
    margin-top: 18px;
    font-weight: 900;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 12px;
}

.rank-link {
    display: grid;
    grid-template-columns: 64px 1fr 34px;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--warm-200);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.rank-link img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.rank-link strong {
    display: block;
    line-height: 1.3;
}

.rank-link p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.rank-link > span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: var(--primary-500);
    border-radius: 12px;
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr));
    gap: 14px;
    padding: 18px;
    margin: 24px 0 28px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--warm-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--warm-800);
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--warm-200);
    border-radius: 14px;
    padding: 11px 13px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    outline: none;
}

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

.empty-state {
    padding: 28px;
    margin-bottom: 28px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--warm-200);
    border-radius: var(--radius-lg);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px 0 8px;
    color: var(--muted);
    font-weight: 700;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-700), var(--primary-500) 55%, var(--accent-500));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.detail-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-info .lead {
    margin: 0 0 20px;
    max-width: 820px;
    color: rgba(255, 255, 255, 0.90);
    font-size: 18px;
}

.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.info-pills span {
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    font-weight: 800;
}

.content-card,
.player-section {
    padding: 28px;
    background: #fff;
    border: 1px solid var(--warm-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.content-card h2,
.player-section h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.content-card p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #1f1714;
    border-radius: var(--radius-xl);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, rgba(45, 27, 22, 0.45), rgba(224, 100, 45, 0.38));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    color: var(--primary-700);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    font-size: 30px;
    box-shadow: var(--shadow);
}

.player-overlay b {
    font-size: 20px;
}

.player-box.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-stack {
    display: grid;
    gap: 26px;
    padding: 34px 0 58px;
}

.site-footer {
    margin-top: 30px;
    padding: 42px 0;
    color: var(--warm-800);
    background: var(--warm-100);
    border-top: 1px solid var(--warm-200);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    margin: 6px 0 0;
}

.footer-links {
    display: flex;
    gap: 16px;
    font-weight: 800;
}

.footer-links a:hover {
    color: var(--primary-700);
}

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

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

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

    .hero-poster,
    .detail-cover {
        max-width: 360px;
    }

    .rank-panel {
        position: static;
    }

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

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

    .menu-button {
        display: inline-grid;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        background: #fff;
        border: 1px solid var(--warm-200);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        text-align: center;
    }

    .hero-slide,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        padding: 42px 0 86px;
    }

    .hero h1,
    .hero h2 {
        font-size: clamp(34px, 11vw, 52px);
    }

    .hero-controls {
        align-items: center;
    }

    .hero-arrows {
        display: none;
    }

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

    .section-heading,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-hero,
    .content-card,
    .player-section {
        padding: 20px;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}
