:root {
    --primary: #f0641f;
    --primary-dark: #bb3513;
    --secondary: #14b895;
    --accent: #fefce8;
    --paper: #ffffff;
    --paper-soft: #fff8f1;
    --ink: #1c1917;
    --muted: #78716c;
    --line: #e7e5e4;
    --deep: #1c1917;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 10px 30px rgba(28, 25, 23, 0.13);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: #fafaf9;
    line-height: 1.6;
}

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

img {
    max-width: 100%;
}

main {
    min-height: 70vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 14px rgba(28, 25, 23, 0.06);
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    font-size: 17px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-text em {
    margin-top: 4px;
    font-style: normal;
    color: var(--muted);
    font-size: 12px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 600;
    color: #57534e;
    white-space: nowrap;
}

.site-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f5f5f4;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
    border-radius: 99px;
}

.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, #fff3e6 0, transparent 36%), linear-gradient(135deg, #fef6ee 0%, #fff 48%, #f0fdf9 100%);
}

.hero-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 42px;
}

.hero-shell {
    position: relative;
    border-radius: 32px;
    min-height: 560px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    background: #1c1917;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.75fr);
    gap: 36px;
    align-items: end;
    padding: 54px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.94) 0%, rgba(28, 25, 23, 0.75) 42%, rgba(28, 25, 23, 0.25) 100%), var(--cover);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #fff;
    background: rgba(240, 100, 31, 0.88);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.hero-copy {
    color: #fff;
    max-width: 710px;
}

.hero-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.hero-meta,
.meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-meta span,
.meta-pills span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 16px 28px rgba(240, 100, 31, 0.26);
}

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

.btn-light {
    color: var(--primary-dark);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

.hero-side {
    align-self: stretch;
    display: flex;
    align-items: flex-end;
}

.hero-focus-card {
    width: 100%;
    border-radius: 26px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    color: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.23);
}

.focus-cover {
    min-height: 260px;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.32), transparent), var(--cover);
    background-size: cover;
    background-position: center;
}

.focus-body {
    padding: 22px;
}

.focus-body strong {
    display: block;
    font-size: 22px;
    line-height: 1.25;
}

.focus-body em {
    display: block;
    margin-top: 8px;
    font-style: normal;
    color: rgba(255, 255, 255, 0.76);
}

.hero-controls {
    position: absolute;
    left: 54px;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 4;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-arrow {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    font-size: 20px;
    backdrop-filter: blur(8px);
}

.search-ribbon {
    margin-top: -24px;
    position: relative;
    z-index: 5;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    width: min(900px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--line);
}

.search-panel input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    background: #fafaf9;
    color: var(--ink);
    font-size: 15px;
    outline: none;
}

.search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(240, 100, 31, 0.12);
}

.section {
    padding: 66px 0;
}

.section.alt {
    background: #fff;
}

.section.soft {
    background: linear-gradient(135deg, #fff8f1, #f0fdf9);
}

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

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

.section-title p,
.page-title p {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 780px;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(231, 229, 228, 0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(240, 100, 31, 0.28);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-image: linear-gradient(145deg, rgba(240, 100, 31, 0.26), rgba(20, 184, 149, 0.18)), var(--cover);
    background-size: cover;
    background-position: center;
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 50%);
    opacity: 0.9;
}

.badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.score-badge {
    left: 12px;
    top: 12px;
    background: rgba(240, 100, 31, 0.9);
}

.year-badge {
    right: 12px;
    bottom: 12px;
    background: rgba(28, 25, 23, 0.78);
}

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

.movie-meta {
    margin: 0 0 8px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.movie-card-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card-title a:hover {
    color: var(--primary-dark);
}

.movie-card-desc {
    margin: 0;
    color: #57534e;
    font-size: 14px;
}

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

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
}

.category-card {
    position: relative;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px;
    border-radius: 22px;
    overflow: hidden;
    color: #fff;
    box-shadow: var(--shadow-soft);
    background-image: linear-gradient(145deg, rgba(240, 100, 31, 0.9), rgba(20, 184, 149, 0.72)), var(--cover);
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 25, 23, 0.72), rgba(28, 25, 23, 0.18));
    z-index: -1;
}

.category-card strong {
    font-size: 22px;
    line-height: 1.2;
}

.category-card em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
}

.category-glow {
    position: absolute;
    right: -35px;
    top: -35px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.rank-list {
    display: grid;
    gap: 14px;
}

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


.rank-item {
    display: grid;
    grid-template-columns: 44px 64px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    border-color: rgba(240, 100, 31, 0.35);
}

.rank-num {
    font-size: 20px;
    font-weight: 900;
    color: var(--primary);
    text-align: center;
}

.rank-cover {
    width: 64px;
    height: 86px;
    border-radius: 12px;
    background-image: linear-gradient(135deg, rgba(240, 100, 31, 0.22), rgba(20, 184, 149, 0.18)), var(--cover);
    background-size: cover;
    background-position: center;
}

.rank-main strong {
    display: block;
    font-size: 17px;
}

.rank-main em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.rank-hot {
    color: #fff;
    background: var(--primary);
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 900;
}

.page-hero {
    background: linear-gradient(135deg, #fff8f1, #ffffff 48%, #f0fdf9);
    border-bottom: 1px solid var(--line);
}

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

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

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(130px, 180px));
    gap: 12px;
    padding: 16px;
    margin-bottom: 28px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.empty-state {
    display: none;
    padding: 40px;
    text-align: center;
    border-radius: 22px;
    background: #fff;
    color: var(--muted);
}

.movie-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.55fr);
    gap: 28px;
    align-items: start;
}

.detail-card,
.side-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.detail-content {
    padding: 28px;
}

.detail-content h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-content p {
    color: #44403c;
    margin: 0 0 12px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111;
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #111;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(145deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.2)), var(--cover);
    background-size: cover;
    background-position: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-trigger {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
    font-size: 34px;
    cursor: pointer;
}

.side-poster {
    aspect-ratio: 3 / 4;
    background-image: linear-gradient(135deg, rgba(240, 100, 31, 0.18), rgba(20, 184, 149, 0.2)), var(--cover);
    background-size: cover;
    background-position: center;
}

.side-info {
    padding: 22px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    font-weight: 800;
}

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

.site-footer {
    color: #d6d3d1;
    background: #1c1917;
    margin-top: 28px;
}

.footer-wrap {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-brand h2,
.footer-links h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-brand p {
    margin: 0;
    max-width: 420px;
    color: #a8a29e;
}

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

.footer-links a {
    color: #d6d3d1;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    color: #a8a29e;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 44px;
    }

    .hero-side {
        display: none;
    }

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

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

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px;
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow-medium);
        border: 1px solid var(--line);
    }

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

    .site-nav a {
        padding: 12px;
        border-radius: 12px;
    }

    .site-nav a:hover {
        background: #fff7ed;
    }

    .brand-text em {
        display: none;
    }

    .hero-wrap {
        padding-top: 24px;
    }

    .hero-shell {
        min-height: 500px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 28px;
        align-items: end;
        min-height: 500px;
    }

    .hero-copy p {
        font-size: 15px;
    }

    .hero-controls {
        left: 28px;
        bottom: 18px;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 44px 0;
    }

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

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

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 38px 54px 1fr;
    }

    .rank-hot {
        display: none;
    }

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

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

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

    .hero-meta span,
    .meta-pills span {
        font-size: 12px;
    }
}
