* {
    box-sizing: border-box;
}

:root {
    --bg: #fff7ed;
    --bg-soft: #fff1f2;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-solid: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: rgba(248, 113, 113, 0.18);
    --brand: #dc2626;
    --brand-2: #f97316;
    --brand-3: #16a34a;
    --dark: #052e16;
    --shadow: 0 24px 60px rgba(127, 29, 29, 0.16);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(248, 113, 113, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(251, 146, 60, 0.22), transparent 30rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 48%, #f0fdf4 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(127, 29, 29, 0.06);
}

.nav-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-icon,
.footer-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.25);
    color: #fff;
    font-size: 22px;
}

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

.brand-title {
    font-weight: 900;
    font-size: 21px;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--brand);
    background: rgba(254, 226, 226, 0.72);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 292px;
    padding: 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(248, 113, 113, 0.22);
    box-shadow: 0 8px 24px rgba(127, 29, 29, 0.06);
}

.top-search input,
.mobile-search input,
.filter-box input,
.filter-box select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.top-search input {
    padding-left: 12px;
    min-width: 0;
}

.top-search button,
.mobile-search button,
.hero-search button,
.rank-action,
.primary-button,
.secondary-button {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button {
    padding: 9px 15px;
    white-space: nowrap;
}

.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.rank-action:hover,
.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(220, 38, 38, 0.28);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff7ed;
    color: var(--brand);
    font-weight: 900;
    font-size: 20px;
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

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

.mobile-link {
    display: block;
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 10px 0 0;
}

.mobile-search input {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
}

.mobile-search button {
    padding: 10px 16px;
}

main {
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: calc(100vh - 72px);
    display: grid;
    align-items: center;
    padding: 78px 0 64px;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.42;
    pointer-events: none;
}

.hero::before {
    width: 440px;
    height: 440px;
    left: -120px;
    top: 80px;
    background: #fb7185;
}

.hero::after {
    width: 520px;
    height: 520px;
    right: -160px;
    bottom: -70px;
    background: #fb923c;
}

.hero-inner,
.section,
.page-hero,
.detail-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
    gap: 42px;
    align-items: center;
}

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

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--brand);
    background: rgba(254, 226, 226, 0.78);
    border: 1px solid rgba(248, 113, 113, 0.25);
    font-weight: 900;
    font-size: 13px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.gradient-text {
    background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead,
.page-hero p,
.detail-title p {
    color: #4b5563;
    font-size: 18px;
    line-height: 1.85;
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
}

.secondary-button {
    color: var(--brand);
    background: #ffffff;
    border: 1px solid rgba(248, 113, 113, 0.25);
    box-shadow: 0 12px 28px rgba(127, 29, 29, 0.08);
}

.hero-search {
    display: flex;
    gap: 10px;
    max-width: 560px;
    padding: 8px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 14px;
    font-size: 16px;
}

.hero-search button {
    padding: 12px 20px;
}

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

.hero-pills a,
.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #7f1d1d;
    background: rgba(255, 237, 213, 0.92);
    border: 1px solid rgba(251, 146, 60, 0.28);
    font-weight: 800;
    font-size: 12px;
}

.hero-pills a {
    padding: 10px 14px;
}

.hero-stage {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    opacity: 0;
    transform: translateX(28px) scale(0.98);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

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

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 36px;
    min-height: 520px;
    box-shadow: 0 38px 80px rgba(127, 29, 29, 0.22);
    background: #111827;
}

.hero-card img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    transition: transform 0.65s ease;
}

.hero-card:hover img {
    transform: scale(1.05);
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.1) 0%, rgba(17, 24, 39, 0.82) 100%),
        linear-gradient(90deg, rgba(220, 38, 38, 0.45), transparent 55%);
}

.hero-slide-copy {
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 28px;
    z-index: 2;
    color: #fff;
}

.hero-slide-copy h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.08;
}

.hero-slide-copy p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.hero-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.hero-slide-copy a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

.hero-controls {
    position: absolute;
    z-index: 8;
    right: 26px;
    top: 26px;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(8px);
    font-size: 20px;
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(220, 38, 38, 0.28);
}

.hero-dots button.active {
    width: 32px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.section {
    padding: 66px 0;
}

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

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

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
    max-width: 720px;
}

.section-link {
    flex: 0 0 auto;
    color: var(--brand);
    font-weight: 900;
}

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

.movie-card,
.category-card,
.stat-card,
.info-card,
.related-panel,
.filter-box,
.rank-item,
.player-card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 30px 68px rgba(127, 29, 29, 0.2);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(17, 24, 39, 0.82));
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 8px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

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

.card-meta span {
    display: inline-flex;
    align-items: center;
}

.card-meta span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 8px;
    border-radius: 999px;
    background: #f97316;
}

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

.movie-card h3 a:hover,
.rank-copy h3 a:hover {
    color: var(--brand);
}

.movie-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.7;
    font-size: 14px;
}

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

.tag-row span {
    padding: 6px 8px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    min-height: 188px;
    border-radius: 24px;
    transition: transform 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -50px;
    top: -50px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(249, 115, 22, 0.26));
}

.category-card strong {
    position: relative;
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

.category-card p {
    position: relative;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 18px;
}

.category-card span {
    position: relative;
    color: var(--brand);
    font-weight: 900;
}

.page-hero {
    padding: 72px 0 30px;
}

.page-hero h1 {
    max-width: 860px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 20px;
}

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

.filter-box {
    border-radius: 24px;
    padding: 18px;
    margin: 10px 0 28px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(120px, 1fr));
    gap: 14px;
}

.filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 900;
}

.filter-grid input,
.filter-grid select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 16px;
    background: rgba(255, 247, 237, 0.9);
    border: 1px solid rgba(248, 113, 113, 0.18);
}

.filter-status {
    margin-top: 12px;
    color: var(--muted);
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 86px 60px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
}

.rank-poster {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
    background: #111827;
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-number {
    font-size: 28px;
    font-weight: 1000;
    color: var(--brand);
    text-align: center;
}

.rank-copy h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-copy p {
    margin: 0 0 10px;
    color: #4b5563;
    line-height: 1.65;
}

.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    white-space: nowrap;
}

.detail-wrap {
    padding: 52px 0 72px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 30px;
    align-items: start;
}

.detail-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.meta-pill {
    padding: 8px 12px;
}

.player-card {
    overflow: hidden;
    border-radius: 28px;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #050816;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(5, 8, 22, 0.1), rgba(5, 8, 22, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover button {
    position: relative;
    z-index: 2;
    width: 78px;
    height: 78px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-size: 30px;
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.32);
}

.detail-side {
    display: grid;
    gap: 18px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow);
    background: #111827;
}

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

.stat-card,
.info-card,
.related-panel {
    border-radius: 24px;
    padding: 20px;
}

.stat-card strong {
    display: block;
    font-size: 32px;
    color: var(--brand);
    line-height: 1;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

.info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.info-card h2,
.related-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.info-card p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

.related-panel {
    margin-top: 28px;
}

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

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

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

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

.site-footer {
    color: #fff;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.25), transparent 28rem),
        linear-gradient(135deg, #052e16, #14532d 45%, #052e16);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.footer-brand {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    max-width: 720px;
}

.footer-brand p {
    grid-column: 2;
    margin: -6px 0 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: 28px 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
}

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

.copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 22px;
}

.empty-state.show {
    display: block;
}

@media (max-width: 1100px) {
    .hero-inner,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 560px;
    }

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

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

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

    .hero {
        padding-top: 44px;
    }

    .hero-inner,
    .section,
    .page-hero,
    .detail-wrap,
    .footer-inner,
    .nav-wrap,
    .mobile-panel {
        width: min(100% - 24px, 720px);
    }

    .hero-search,
    .section-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .section-heading {
        gap: 12px;
    }

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

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

    .rank-item {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .rank-number {
        position: absolute;
        transform: translate(42px, -38px);
        color: #fff;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.48);
    }

    .rank-action {
        grid-column: 1 / -1;
    }
}

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

    .brand-subtitle {
        display: none;
    }

    .hero-card,
    .hero-card img {
        min-height: 440px;
    }

    .hero-stage {
        min-height: 500px;
    }

    .hero-slide-copy {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .movie-grid,
    .category-grid,
    .related-grid,
    .info-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 46px 0;
    }
}
