* {
    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: #271012;
    background: linear-gradient(180deg, #fff7ed 0%, #fff1f2 42%, #ffffff 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #881337 0%, #9f1239 48%, #78350f 100%);
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(136, 19, 55, 0.24);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #fb7185, #f59e0b);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(251, 113, 133, 0.35);
}

.brand-name {
    font-size: 21px;
    white-space: nowrap;
}

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

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 15px;
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.header-search,
.mobile-search,
.large-search,
.search-page-panel,
.filter-panel {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.large-search input,
.search-page-panel input,
.filter-panel input {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(244, 63, 94, 0.18);
    outline: none;
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    color: #431407;
    box-shadow: 0 10px 24px rgba(136, 19, 55, 0.08);
}

.header-search input {
    width: 220px;
    padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.large-search button,
.search-page-panel button,
.primary-btn,
.ghost-btn,
.section-more {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 700;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    white-space: nowrap;
}

.header-search button,
.mobile-search button,
.large-search button,
.search-page-panel button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #e11d48, #f59e0b);
    box-shadow: 0 14px 26px rgba(225, 29, 72, 0.24);
}

.ghost-btn,
.section-more {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.section-more {
    color: #9f1239;
    background: #fff7ed;
    border-color: rgba(225, 29, 72, 0.18);
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.search-page-panel button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(225, 29, 72, 0.26);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    color: #ffffff;
    background: #1f0a0d;
}

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

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.64) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(28px, calc((100vw - 1180px) / 2));
    width: min(640px, calc(100% - 56px));
    transform: translateY(-50%);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.05;
    text-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

.hero p {
    margin: 0 0 24px;
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.72;
    color: rgba(255, 255, 255, 0.9);
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    color: #9f1239;
    background: #fff1f2;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    font-size: 30px;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.intro-band,
.content-section,
.footer-grid,
.copyright,
.detail-wrap {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.intro-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 28px;
    align-items: center;
    margin-top: -46px;
    position: relative;
    z-index: 2;
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 60px rgba(136, 19, 55, 0.16);
    backdrop-filter: blur(16px);
}

.intro-band h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    color: #3f0d12;
}

.intro-band h2 {
    font-size: clamp(28px, 4vw, 40px);
}

.intro-band p,
.section-heading p,
.page-hero p,
.category-tile p,
.detail-one-line,
.detail-article p,
.site-footer p {
    color: #6b3f36;
    line-height: 1.75;
}

.content-section {
    padding: 54px 0 12px;
}

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

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

.section-heading p {
    max-width: 720px;
    margin: 8px 0 0;
}

.movie-grid,
.rank-grid,
.category-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-card,
.category-tile {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(244, 63, 94, 0.1);
    box-shadow: 0 18px 44px rgba(136, 19, 55, 0.1);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover,
.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 54px rgba(136, 19, 55, 0.18);
}

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

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

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

.play-dot,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #e11d48, #f59e0b);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 999px;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.movie-card h3 {
    margin: 0 0 9px;
    color: #3f0d12;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #745048;
    font-size: 14px;
    line-height: 1.58;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-bottom: 14px;
}

.card-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #87645e;
    font-size: 13px;
}

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

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

.category-tile a {
    position: relative;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
}

.tile-glow {
    position: absolute;
    right: -46px;
    top: -46px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.42), rgba(225, 29, 72, 0));
}

.category-tile h3 {
    margin: 0 0 12px;
    color: #9f1239;
    font-size: 24px;
}

.tile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.tile-links a,
.category-tile strong {
    position: relative;
    z-index: 1;
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 10px;
    color: #9f1239;
    background: #fff1f2;
    font-size: 12px;
}

.category-tile strong {
    width: fit-content;
    color: #ffffff;
    background: linear-gradient(135deg, #e11d48, #f59e0b);
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #881337, #9f1239 50%, #78350f);
}

.small-hero {
    padding: 88px 0;
}

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

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
}

.filter-panel,
.search-page-panel {
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 36px rgba(136, 19, 55, 0.1);
}

.filter-panel input,
.search-page-panel input {
    max-width: 520px;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) brightness(0.45);
    transform: scale(1.08);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(63, 13, 18, 0.92), rgba(63, 13, 18, 0.58), rgba(120, 53, 15, 0.45));
}

.detail-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 72px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.82);
}

.detail-info h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.detail-one-line {
    max-width: 840px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

.detail-meta {
    margin: 20px 0;
}

.detail-tags span,
.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #11070a;
    box-shadow: 0 24px 60px rgba(63, 13, 18, 0.22);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
    cursor: pointer;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover span {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #e11d48, #f59e0b);
    font-size: 36px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

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

.detail-article,
.detail-side,
.detail-neighbor {
    margin-top: 24px;
    padding: 26px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 40px rgba(136, 19, 55, 0.1);
}

.detail-article h2,
.detail-side h2 {
    margin-bottom: 12px;
}

.detail-article p {
    margin: 0 0 22px;
    font-size: 16px;
}

.detail-neighbor {
    display: grid;
    gap: 12px;
}

.detail-neighbor a {
    color: #9f1239;
    font-weight: 700;
}

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

.detail-side .movie-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    border-radius: 18px;
}

.detail-side .poster-link {
    aspect-ratio: 2 / 3;
}

.detail-side .play-dot,
.detail-side .tag-row,
.detail-side .card-foot,
.detail-side .card-meta {
    display: none;
}

.detail-side .movie-card p {
    min-height: auto;
    -webkit-line-clamp: 2;
}

.site-footer {
    margin-top: 70px;
    color: #fdf2f8;
    background: #19070a;
}

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

.footer-brand {
    margin-bottom: 12px;
    color: #fbbf24;
    font-size: 22px;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #fbbf24;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
}

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

.copyright {
    padding: 18px 0 28px;
    color: rgba(255, 255, 255, 0.58);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-empty {
    grid-column: 1 / -1;
    padding: 44px;
    text-align: center;
    border-radius: 24px;
    color: #7f1d1d;
    background: #fff1f2;
}

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

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

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .mobile-nav.open {
        display: grid;
        gap: 12px;
    }

    .hero {
        height: 560px;
    }

    .intro-band,
    .section-heading,
    .footer-grid,
    .detail-wrap {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
    }

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

    .detail-wrap {
        gap: 22px;
    }

    .detail-poster {
        width: min(260px, 72vw);
    }
}

@media (max-width: 560px) {
    .brand-name {
        font-size: 18px;
    }

    .hero-content {
        left: 18px;
        width: calc(100% - 36px);
    }

    .hero-actions,
    .large-search,
    .search-page-panel,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-controls {
        right: 18px;
        bottom: 18px;
    }

    .movie-grid,
    .rank-grid,
    .category-grid,
    .category-grid.wide,
    .detail-side .side-list {
        grid-template-columns: 1fr;
    }

    .small-hero {
        padding: 58px 0;
    }

    .detail-side .movie-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}
