* {
    box-sizing: border-box;
}

:root {
    --rose: #f43f5e;
    --orange: #f97316;
    --amber: #f59e0b;
    --dark: #111827;
    --muted: #6b7280;
    --soft: #fff7ed;
    --line: rgba(17, 24, 39, 0.08);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--dark);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 22%, #fff 100%);
}

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

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

.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.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--rose), var(--orange), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.32);
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #374151;
    font-weight: 600;
    transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--rose);
    background: #fff1f2;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff1f2;
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
}

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

.mobile-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
}

.mobile-cats a {
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 14px;
}

.hero-section {
    position: relative;
    height: 620px;
    min-height: 76vh;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-slide > img {
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(17, 24, 39, 0.56), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-copy {
    max-width: 680px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--rose);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #fed7aa;
}

.hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    text-shadow: 0 16px 42px rgba(0, 0, 0, 0.5);
}

.hero-copy p {
    margin: 0 0 24px;
    max-width: 610px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 23px);
    line-height: 1.7;
}

.hero-tags,
.tag-row,
.info-row,
.score-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.info-row span,
.score-line span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    backdrop-filter: blur(8px);
}

.tag-row span,
.score-line span {
    background: #fff7ed;
    color: #9a3412;
}

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

.primary-btn,
.ghost-btn,
.search-strip button,
.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.24s ease;
}

.primary-btn,
.search-strip button,
.search-box button {
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--orange));
    box-shadow: 0 14px 34px rgba(244, 63, 94, 0.32);
}

.primary-btn:hover,
.search-strip button:hover,
.search-box button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 40px rgba(244, 63, 94, 0.42);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(12px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-feature-card {
    width: min(360px, 32vw);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
}

.hero-feature-card span,
.hero-feature-card small {
    display: block;
    color: rgba(255, 255, 255, 0.74);
}

.hero-feature-card strong {
    display: block;
    margin: 12px 0;
    font-size: 28px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
    z-index: 6;
}

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

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

.quick-search-panel {
    position: relative;
    z-index: 8;
    margin-top: -42px;
    padding: 22px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-strip,
.search-box {
    display: flex;
    gap: 12px;
}

.search-strip input,
.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
    background: #fff;
    color: var(--dark);
    font-size: 15px;
}

.search-strip input:focus,
.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(244, 63, 94, 0.42);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.1);
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.pill-row a {
    padding: 9px 14px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 700;
    transition: 0.22s ease;
}

.pill-row a:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--orange));
}

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

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

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

.section-heading.light h2 {
    color: #fff;
}

.more-link {
    color: var(--rose);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 56px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

.poster-link img,
.rank-thumb img,
.detail-poster img {
    height: 100%;
    object-fit: cover;
}

.poster-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.74));
    opacity: 0;
    transition: 0.24s ease;
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(244, 63, 94, 0.88);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: 0.24s ease;
}

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

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.movie-card h3,
.rank-item h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card p,
.rank-item p,
.category-card span,
.site-footer p,
.story-card p,
.detail-intro,
.page-hero p,
.recommend-panel p {
    color: var(--muted);
    line-height: 1.75;
}

.gradient-band {
    background: radial-gradient(circle at top left, rgba(244, 63, 94, 0.24), transparent 34%), linear-gradient(135deg, #9f1239, #ea580c 48%, #f59e0b);
}

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

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

.category-card {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    transition: 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}

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

.category-card em {
    color: var(--rose);
    font-style: normal;
    font-weight: 800;
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 94px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.rank-num {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.rank-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: #111827;
}

.recommend-panel,
.story-card {
    padding: 24px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

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

.movie-card.compact .card-body {
    padding: 14px;
}

.movie-card.compact h3 {
    font-size: 15px;
}

.movie-card.compact p,
.movie-card.compact .tag-row {
    display: none;
}

.page-hero,
.detail-hero {
    position: relative;
    min-height: 410px;
    display: flex;
    align-items: center;
    color: #fff;
    background: linear-gradient(135deg, #111827, #9f1239 56%, #f97316);
    overflow: hidden;
}

.page-hero:not(.small-hero)::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--page-bg), var(--detail-bg);
    background-position: center;
    background-size: cover;
    opacity: 0.34;
}

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

.page-hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(127, 29, 29, 0.5));
}

.page-hero-content,
.detail-hero-content,
.small-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1,
.detail-copy h1,
.small-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.page-hero p,
.small-hero p {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 19px;
}

.crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
    margin-bottom: 28px;
}

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

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

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background: #111827;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.detail-copy {
    max-width: 760px;
}

.detail-intro {
    color: rgba(255, 255, 255, 0.84);
    font-size: 20px;
}

.info-row {
    margin: 24px 0;
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    margin-top: -70px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.34);
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.34), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-cover span {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 18px 50px rgba(244, 63, 94, 0.38);
    font-size: 32px;
}

.play-cover strong {
    font-size: 20px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 48px 0 0;
}

.story-card h2 {
    margin-top: 0;
    font-size: 26px;
}

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

.search-page {
    min-height: 480px;
}

.search-box {
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.site-footer {
    margin-top: 40px;
    background: linear-gradient(180deg, #fff7ed, #f3f4f6);
    border-top: 1px solid var(--line);
}

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

.footer-brand {
    margin-bottom: 14px;
}

.site-footer h3 {
    margin: 0 0 14px;
}

.site-footer a:not(.brand) {
    display: block;
    margin-bottom: 10px;
    color: #4b5563;
}

.site-footer a:hover {
    color: var(--rose);
}

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

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: #6b7280;
    border-top: 1px solid var(--line);
}

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

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

    .rank-layout,
    .rank-list.wide,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .recommend-panel {
        position: static;
    }

    .hero-feature-card {
        display: none;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-section {
        height: 620px;
        min-height: 82vh;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 88px;
    }

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

    .quick-search-panel {
        margin-top: 0;
        border-radius: 0;
        width: 100%;
    }

    .search-strip,
    .search-box,
    .filter-bar {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

    .card-body {
        padding: 14px;
    }

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card p,
    .movie-card .tag-row {
        display: none;
    }

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

    .rank-item {
        grid-template-columns: 42px 72px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-num {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .rank-item p,
    .score-line {
        display: none;
    }

    .detail-hero {
        min-height: auto;
        padding: 42px 0 110px;
    }

    .detail-grid {
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 18px;
    }

    .detail-poster {
        border-radius: 18px;
    }

    .detail-copy h1 {
        font-size: 32px;
    }

    .detail-intro {
        font-size: 15px;
    }

    .info-row span,
    .detail-tags span {
        font-size: 12px;
    }

    .player-section {
        margin-top: -74px;
    }

    .player-shell {
        border-radius: 18px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid,
    .compact-grid-detail,
    .category-grid,
    .category-grid.large {
        grid-template-columns: 1fr 1fr;
    }

    .container {
        width: min(100% - 22px, 1180px);
    }

    .hero-tags span:nth-child(n+4),
    .tag-row span:nth-child(n+4) {
        display: none;
    }
}
