html {
    box-sizing: border-box;
    font-size: 16px;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #111827;
    background: #f9fafb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.site-bar {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626, #ea580c);
    box-shadow: 0 12px 22px rgba(220, 38, 38, 0.28);
}

.logo-text {
    font-size: 1.45rem;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #dc2626, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    gap: 26px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #dc2626;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-large input,
.filter-bar input,
.filter-bar select {
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-large input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.header-search button,
.mobile-search button,
.search-large button,
.quick-search button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #ffffff;
    background: #dc2626;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-large button:hover,
.quick-search button:hover,
.primary-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-button span {
    width: 20px;
    height: 2px;
    background: #111827;
    border-radius: 9px;
}

.mobile-panel {
    display: none;
    padding: 16px 24px 22px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

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

.mobile-search {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.mobile-search input {
    flex: 1;
}

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

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 30%, rgba(234, 88, 12, 0.42), transparent 30%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.82) 44%, rgba(17, 24, 39, 0.38) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 1), rgba(17, 24, 39, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 142px 24px 140px;
    color: #ffffff;
}

.hero-kicker,
.section-title p,
.page-hero p {
    margin: 0 0 12px;
    color: #fb923c;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h2 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.6rem, 6vw, 5.7rem);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero-content p {
    max-width: 720px;
    margin: 24px 0 0;
    color: #e5e7eb;
    font-size: 1.12rem;
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 0.8rem;
    font-weight: 800;
}

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

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: #dc2626;
    box-shadow: 0 16px 28px rgba(220, 38, 38, 0.3);
}

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

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 36px;
    background: #ffffff;
}

.section-card,
.section-wrap,
.split-section,
.category-overview-grid,
.rank-page-list,
.search-page-box,
.detail-top,
.player-section,
.detail-content {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.quick-search {
    margin-top: -58px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding-top: 28px;
    padding-bottom: 28px;
    background: #ffffff;
    border-radius: 26px;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
}

.quick-search h1 {
    margin: 0 0 8px;
    font-size: clamp(1.75rem, 3vw, 2.7rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.quick-search p {
    margin: 0;
    color: #6b7280;
}

.quick-search form,
.search-large {
    display: flex;
    gap: 12px;
}

.quick-search input,
.search-large input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 14px 18px;
    outline: none;
}

.section-wrap {
    margin-top: 58px;
}

.no-margin {
    margin-top: 0;
    padding: 0;
}

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

.section-title h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    letter-spacing: -0.04em;
}

.section-title a,
.text-link {
    color: #dc2626;
}

.compact {
    align-items: center;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #f3f4f6;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.15);
}

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

.poster-link img,
.rank-poster img,
.detail-poster img,
.category-tile img,
.small-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover img,
.category-tile:hover img,
.small-card:hover img {
    transform: scale(1.06);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 4px 10px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    font-weight: 900;
    font-size: 0.78rem;
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 800;
}

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

.card-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 7px;
    color: #d1d5db;
}

.movie-card h2,
.rank-card h2 {
    margin: 10px 0 8px;
    font-size: 1.05rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.movie-card h2 a:hover,
.rank-card h2 a:hover {
    color: #dc2626;
}

.movie-card p,
.rank-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: #4b5563;
    font-size: 0.92rem;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    margin-top: 64px;
}

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

.category-tile {
    min-height: 170px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
    border-radius: 24px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.2));
}

.category-tile img {
    position: absolute;
    inset: 0;
}

.category-tile span {
    position: relative;
    z-index: 2;
    padding: 22px;
}

.category-tile strong,
.small-card strong {
    display: block;
    font-size: 1.2rem;
}

.category-tile em,
.small-card em,
.rank-row em {
    display: block;
    margin-top: 4px;
    color: #e5e7eb;
    font-style: normal;
    font-size: 0.88rem;
}

.rank-panel {
    border-radius: 26px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
    align-self: start;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: #fef2f2;
    transform: translateX(3px);
}

.rank-row b {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, #dc2626, #ea580c);
}

.rank-row span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 900;
}

.rank-row em {
    grid-column: 2;
    color: #6b7280;
}

.page-hero {
    max-width: 1280px;
    margin: 34px auto 0;
    padding: 56px 24px;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 146, 60, 0.6), transparent 28%),
        linear-gradient(135deg, #111827, #7f1d1d 55%, #ea580c);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.3rem);
    letter-spacing: -0.06em;
    line-height: 1.05;
}

.page-hero span,
.page-hero > p + h1 + span,
.page-hero > p + h1 + p {
    display: block;
    max-width: 760px;
    margin-top: 16px;
    color: #fee2e2;
    font-size: 1.06rem;
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 36px;
    margin-bottom: 64px;
}

.category-overview-card {
    padding: 24px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.1);
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.category-overview-card h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.category-overview-card p {
    margin: 0;
    color: #6b7280;
}

.mini-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.small-card {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(70px, auto);
    border-radius: 18px;
    background: #111827;
    color: #ffffff;
}

.small-card img {
    aspect-ratio: 2 / 3;
}

.small-card span {
    padding: 12px;
}

.small-card strong {
    font-size: 0.95rem;
    line-height: 1.3;
}

.small-card em {
    color: #d1d5db;
}

.filter-bar {
    max-width: 1280px;
    margin: 26px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 160px 180px 160px;
    gap: 12px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border-radius: 16px;
}

.category-list-wrap {
    margin-top: 28px;
    margin-bottom: 72px;
}

.rank-page-list {
    margin-top: 36px;
    margin-bottom: 72px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.rank-card {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

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

.rank-poster b {
    position: absolute;
    left: 10px;
    top: 10px;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 14px;
    background: #dc2626;
}

.search-page-box {
    margin-top: 28px;
}

.search-large {
    padding: 20px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.search-tags a {
    border-radius: 999px;
    padding: 8px 14px;
    color: #991b1b;
    background: #fee2e2;
    font-weight: 800;
}

.detail-top {
    margin-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #6b7280;
    font-weight: 700;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    padding: 30px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 80% 20%, rgba(234, 88, 12, 0.18), transparent 32%),
        #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #111827, #7f1d1d);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: -0.06em;
    line-height: 1.08;
}

.detail-line {
    max-width: 820px;
    margin: 18px 0;
    color: #374151;
    font-size: 1.15rem;
    font-weight: 700;
}

.detail-tags {
    margin: 22px 0 26px;
}

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

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
    cursor: pointer;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dc2626;
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.38);
    font-size: 2.2rem;
    line-height: 1;
    padding-left: 6px;
}

.player-overlay strong {
    font-size: 1.25rem;
}

.detail-content {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.prose-card {
    padding: 26px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.prose-card h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.prose-card p {
    margin: 0;
    color: #374151;
    white-space: pre-wrap;
}

.related-wrap {
    margin-bottom: 72px;
}

.site-footer {
    margin-top: 80px;
    padding: 46px 24px 24px;
    color: #ffffff;
    background: #111827;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) 1fr 1fr;
    gap: 36px;
}

.site-footer p {
    max-width: 460px;
    color: #9ca3af;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

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

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

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

.footer-bottom {
    max-width: 1280px;
    margin: 34px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
}

.is-filtered-out {
    display: none !important;
}

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        width: 100%;
    }
}

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

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

    .quick-search,
    .detail-hero,
    .detail-content,
    .footer-grid,
    .category-overview-grid,
    .rank-page-list {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 680px) {
    .site-bar {
        height: 62px;
        padding: 0 16px;
    }

    .logo-text {
        font-size: 1.08rem;
    }

    .hero {
        min-height: 600px;
    }

    .hero-content {
        padding: 100px 18px 118px;
    }

    .quick-search {
        margin-top: -34px;
        border-radius: 22px;
    }

    .quick-search form,
    .search-large,
    .mobile-search {
        flex-direction: column;
    }

    .movie-grid,
    .category-grid,
    .mini-list,
    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

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

    .section-card,
    .section-wrap,
    .split-section,
    .category-overview-grid,
    .rank-page-list,
    .search-page-box,
    .detail-top,
    .player-section,
    .detail-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-hero {
        margin-left: 16px;
        margin-right: 16px;
        padding: 38px 20px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .category-grid,
    .mini-list,
    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .play-icon {
        width: 68px;
        height: 68px;
        font-size: 1.8rem;
    }
}
