
:root {
    --primary-50: #fef7ee;
    --primary-100: #feead2;
    --primary-500: #f07315;
    --primary-600: #e1590b;
    --primary-700: #bb420b;
    --accent-50: #fdf8f3;
    --accent-500: #d9804f;
    --secondary-500: #0fcaaa;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --shadow-sm: 0 8px 20px rgba(41, 37, 36, 0.06);
    --shadow-md: 0 16px 36px rgba(41, 37, 36, 0.10);
    --shadow-xl: 0 26px 70px rgba(41, 37, 36, 0.18);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.86);
    box-shadow: var(--shadow-sm);
}

.nav-shell {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 10px 24px rgba(240, 115, 21, 0.34);
}

.logo-text {
    font-size: 22px;
    color: var(--neutral-800);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    color: var(--neutral-600);
    font-weight: 650;
    font-size: 15px;
    transition: color 0.2s ease;
}

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

.nav-search,
.mobile-search,
.page-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.page-search input,
.filter-toolbar input,
.filter-toolbar select {
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    background: #fff;
    color: var(--neutral-800);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 230px;
    padding: 10px 12px;
}

.nav-search input:focus,
.mobile-search input:focus,
.page-search input:focus,
.filter-toolbar input:focus,
.filter-toolbar select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(240, 115, 21, 0.14);
}

.nav-search button,
.mobile-search button,
.page-search button,
.filter-toolbar button,
.primary-button,
.ghost-button {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 800;
}

.nav-search button,
.mobile-search button,
.page-search button,
.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 12px 24px rgba(240, 115, 21, 0.24);
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
}

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.ghost-button.dark {
    color: var(--primary-700);
    background: #fff;
    border-color: var(--primary-100);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-50);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--primary-700);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--neutral-200);
    padding: 16px;
    background: #fff;
}

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

.mobile-nav {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.mobile-nav-link {
    color: var(--neutral-700);
    font-weight: 700;
    padding: 8px 0;
}

.mobile-search input,
.page-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
}

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

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.16) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-section::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -180px;
    bottom: -210px;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    filter: blur(5px);
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.hero-slide {
    display: none;
    width: 100%;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 46px;
    align-items: center;
}

.hero-slide.is-active {
    display: grid;
    animation: heroFade 0.55s ease both;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--primary-700);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow {
    color: rgba(255, 255, 255, 0.86);
}

.hero-copy h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.90);
    font-size: 20px;
}

.hero-tags,
.card-tags,
.genre-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.card-tags span,
.genre-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-poster {
    position: relative;
    display: block;
    min-height: 470px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: rotate(1.5deg);
    isolation: isolate;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.78));
    z-index: 1;
}

.hero-poster img {
    width: 100%;
    height: 470px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.20);
}

.hero-poster span {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    z-index: 2;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.25;
}

.hero-controls {
    position: absolute;
    left: 0;
    bottom: 48px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

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

.section {
    padding-top: 68px;
    padding-bottom: 68px;
}

.section-white {
    background: #fff;
}

.section-soft {
    background: linear-gradient(135deg, var(--accent-50), var(--primary-50));
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--neutral-800);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 36px);
}

.section-heading a {
    color: var(--primary-600);
    font-weight: 850;
}

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    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-box {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-50));
}

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

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

.poster-box::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
    transition: opacity 0.24s ease;
}

.movie-card:hover .poster-box::after {
    opacity: 1;
}

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

.year-pill {
    right: 12px;
    bottom: 12px;
    min-height: 26px;
    padding: 3px 9px;
    color: #fff;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.70);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    color: #fff;
    border-radius: 999px;
    background: rgba(240, 115, 21, 0.92);
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    padding: 18px;
}

.card-body h3 {
    min-height: 2.6em;
    margin: 0;
    color: var(--neutral-800);
    font-size: 17px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--primary-600);
}

.card-body p {
    margin: 0;
    color: var(--neutral-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--neutral-500);
    font-size: 12px;
    font-weight: 800;
}

.card-meta span {
    padding: 3px 8px;
    border-radius: 8px;
    background: var(--neutral-100);
}

.card-tags span,
.genre-cloud span {
    color: var(--primary-700);
    background: var(--primary-50);
}

.movie-list,
.rank-strip {
    display: grid;
    gap: 16px;
}

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

.movie-card-wide {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: stretch;
}

.movie-card-wide .poster-box {
    height: 100%;
    min-height: 138px;
    aspect-ratio: auto;
}

.movie-card-wide .card-body h3 {
    min-height: auto;
}

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -50px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(240, 115, 21, 0.14), rgba(15, 202, 170, 0.18));
}

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

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    font-weight: 900;
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-tile p {
    margin: 0 0 16px;
    color: var(--neutral-600);
}

.category-tile strong {
    color: var(--primary-600);
}

.center-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 34px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500), var(--secondary-500));
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(34px, 4vw, 52px);
}

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

.page-hero .section-kicker,
.detail-hero .section-kicker {
    color: rgba(255, 255, 255, 0.86);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fff;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(150px, 0.8fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.filter-toolbar label {
    display: grid;
    gap: 7px;
    color: var(--neutral-600);
    font-size: 13px;
    font-weight: 800;
}

.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
}

.filter-toolbar button {
    min-height: 44px;
    color: var(--primary-700);
    background: var(--primary-50);
}

.empty-state {
    padding: 44px 22px;
    text-align: center;
    border-radius: 22px;
    color: var(--neutral-600);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.page-search {
    max-width: 680px;
    margin-top: 24px;
}

.detail-hero {
    padding-bottom: 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    margin: 0;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 0.18);
}

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

.detail-copy h1 {
    color: #fff;
    font-size: clamp(36px, 5vw, 64px);
}

.detail-one-line {
    max-width: 760px;
    margin: 18px 0 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-weight: 800;
    font-size: 13px;
}

.player-section {
    margin-top: -34px;
    position: relative;
    z-index: 3;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #050505;
    box-shadow: var(--shadow-xl);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050505;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.52));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(240, 115, 21, 0.94);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
    font-size: 34px;
    padding-left: 6px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.content-card {
    padding: 26px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: var(--neutral-700);
}

.info-card {
    grid-column: 1 / -1;
}

.info-card dl {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.info-card dl div {
    padding: 14px;
    border-radius: 16px;
    background: var(--neutral-50);
}

.info-card dt {
    color: var(--neutral-500);
    font-size: 12px;
    font-weight: 900;
}

.info-card dd {
    margin: 4px 0 0;
    font-weight: 850;
}

.site-footer {
    padding: 54px 0;
    color: var(--neutral-300);
    background: var(--neutral-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 32px;
}

.footer-logo {
    margin-bottom: 16px;
    color: #fff;
    font-size: 22px;
}

.site-footer p {
    margin: 0;
    color: var(--neutral-300);
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 17px;
}

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

.site-footer a:hover {
    color: #fff;
}

[hidden] {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 72px 0 96px;
    }

    .hero-inner {
        align-items: stretch;
    }

    .hero-poster {
        min-height: 380px;
        transform: none;
    }

    .hero-poster img {
        height: 380px;
    }

    .hero-controls {
        left: 16px;
    }

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

    .rank-strip {
        grid-template-columns: 1fr;
    }

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

    .detail-layout {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    .info-card dl,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

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

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-poster {
        min-height: 300px;
        border-radius: 22px;
    }

    .hero-poster img {
        height: 300px;
    }

    .section {
        padding-top: 46px;
        padding-bottom: 46px;
    }

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

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

    .movie-card-wide {
        grid-template-columns: 128px minmax(0, 1fr);
    }

    .movie-card-wide .poster-box {
        min-height: 120px;
    }

    .card-body {
        padding: 14px;
    }

    .card-body p,
    .card-tags {
        display: none;
    }

    .filter-toolbar {
        grid-template-columns: 1fr;
        padding: 14px;
    }

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

    .detail-poster {
        max-width: 260px;
    }

    .info-card dl,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .center-actions,
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .category-grid,
    .category-grid-full {
        grid-template-columns: 1fr;
    }

    .movie-card-wide {
        grid-template-columns: 1fr;
    }

    .logo-text {
        font-size: 19px;
    }
}
