:root {
    --red: #dc2626;
    --red-dark: #b91c1c;
    --red-soft: #fee2e2;
    --blue: #2563eb;
    --yellow: #f59e0b;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f9fafb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    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.96);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--red);
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
}

.site-logo-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), #ef4444);
    box-shadow: 0 10px 18px rgba(220, 38, 38, 0.26);
    font-size: 14px;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    color: #374151;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--red);
}

.header-search,
.mobile-search,
.search-page-form {
    display: flex;
    align-items: center;
    border-radius: 999px;
    background: #f3f4f6;
    overflow: hidden;
}

.header-search {
    margin-left: auto;
    width: 280px;
}

.header-search input,
.mobile-search input,
.search-page-form input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 11px 14px;
    color: var(--text);
}

.header-search button,
.mobile-search button,
.search-page-form button {
    border: 0;
    color: #ffffff;
    background: var(--red);
    padding: 11px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
    background: var(--red-dark);
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #374151;
    font-size: 26px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
}

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

.mobile-nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.category-strip {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 9px 0 10px;
    border-top: 1px solid #f3f4f6;
}

.category-strip a {
    flex: 0 0 auto;
    color: #4b5563;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.category-strip a:hover {
    color: var(--red);
}

.hero {
    position: relative;
    height: 600px;
    background: #000000;
    overflow: hidden;
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.14));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1200px;
    color: #ffffff;
}

.hero-content > * {
    max-width: 680px;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.hero-eyebrow span {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 6px;
    background: var(--red);
    font-size: 14px;
    font-weight: 700;
}

.hero-eyebrow strong {
    color: #fde68a;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 7vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.hero-tags,
.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-meta {
    margin-bottom: 18px;
    color: #f3f4f6;
}

.hero-tags span,
.detail-tags a,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 11px;
    font-size: 13px;
}

.hero-actions {
    margin-top: 28px;
}

.hero-primary,
.hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 28px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-primary {
    color: #ffffff;
    background: var(--red);
}

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

.hero-primary:hover,
.hero-secondary:hover {
    transform: translateY(-2px);
}

.hero-primary:hover {
    background: var(--red-dark);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.46);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    background: var(--red);
}

.page-container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.inner-page {
    padding-top: 42px;
}

.content-section {
    margin: 56px 0;
}

.soft-section {
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff1f2, #eff6ff);
}

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

.section-heading h2,
.rank-panel h2,
.detail-section h2,
.page-title-block h1,
.detail-main h1 {
    margin: 0;
    color: var(--text);
    font-weight: 900;
}

.section-heading h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.section-more,
.text-link {
    color: var(--red);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

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

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    left: 10px;
    top: 10px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--red);
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-card-body {
    padding: 15px;
}

.movie-card-body h2 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
}

.movie-card-body h2 a:hover {
    color: var(--red);
}

.movie-card-body p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #4b5563;
    font-size: 12px;
}

.card-meta span {
    border-radius: 6px;
    background: #f3f4f6;
    padding: 3px 6px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    color: var(--red);
    background: var(--red-soft);
}

.ranking-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 28px;
}

.rank-panel {
    border-radius: 20px;
    background: #ffffff;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-panel h2 {
    margin-bottom: 18px;
    font-size: 22px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 34px 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.rank-item:hover {
    background: #f9fafb;
}

.rank-num {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--red);
    font-weight: 900;
    font-size: 13px;
}

.rank-item img {
    width: 86px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text strong {
    margin-bottom: 4px;
    font-size: 14px;
}

.rank-text em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

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

.category-card,
.category-overview-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card img {
    width: 160px;
    height: 112px;
    border-radius: 16px;
    object-fit: cover;
}

.category-card strong,
.category-overview-card h2 {
    display: block;
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-card em,
.category-overview-card p {
    display: block;
    color: var(--muted);
    font-style: normal;
    line-height: 1.7;
}

.category-collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    align-self: stretch;
}

.category-collage img {
    width: 100%;
    height: 138px;
    object-fit: cover;
}

.category-collage img:first-child {
    border-radius: 14px 0 0 14px;
}

.category-collage img:last-child {
    border-radius: 0 14px 14px 0;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.category-samples a {
    border-radius: 999px;
    color: var(--red);
    background: var(--red-soft);
    padding: 5px 10px;
    font-size: 13px;
}

.page-title-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff, #fff1f2);
    padding: 34px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.category-title-block {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.page-title-block h1 {
    font-size: clamp(32px, 4vw, 44px);
}

.page-title-block p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.page-filter-box {
    display: flex;
    gap: 10px;
    min-width: 360px;
}

.page-filter-box input,
.page-filter-box select {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    padding: 12px 16px;
    outline: 0;
}

.search-title-block {
    align-items: stretch;
}

.search-page-form {
    width: min(680px, 100%);
    margin-top: 10px;
}

.ranking-page-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.rank-page-panel {
    position: sticky;
    top: 112px;
}

.rank-list-large .rank-item {
    grid-template-columns: 38px 96px minmax(0, 1fr);
}

.rank-list-large .rank-item img {
    width: 96px;
    height: 62px;
}

.player-stage {
    background: #000000;
}

.player-container {
    padding: 22px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #000000;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

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

.play-ring {
    position: relative;
    z-index: 2;
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.96);
    box-shadow: 0 16px 42px rgba(220, 38, 38, 0.38);
    font-size: 28px;
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 30px;
    align-items: start;
    padding-top: 34px;
}

.detail-main,
.detail-side .rank-panel {
    border-radius: 22px;
    background: #ffffff;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

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

.detail-main h1 {
    margin-bottom: 18px;
    font-size: clamp(30px, 4vw, 44px);
}

.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 700;
}

.detail-tags a {
    color: var(--red);
    background: var(--red-soft);
}

.detail-section {
    margin: 28px 0;
}

.detail-section h2 {
    margin-bottom: 12px;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

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

.detail-info-grid div {
    border-radius: 14px;
    background: #f9fafb;
    padding: 14px;
}

.detail-info-grid strong,
.detail-info-grid span {
    display: block;
}

.detail-info-grid strong {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

.detail-info-grid span {
    font-weight: 800;
}

.sticky-panel {
    position: sticky;
    top: 112px;
}

.related-section {
    padding-bottom: 28px;
}

.site-footer {
    margin-top: 70px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 34px;
    padding: 46px 0;
}

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.site-footer p {
    max-width: 430px;
    margin: 0;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 16px;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #9ca3af;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding: 18px 0;
    text-align: center;
    color: #9ca3af;
}

.movie-card.is-hidden {
    display: none;
}

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

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

    .rank-page-panel,
    .sticky-panel {
        position: static;
    }

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

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

    .menu-button {
        display: block;
    }

    .category-strip {
        padding-bottom: 12px;
    }

    .hero {
        height: 560px;
    }

    .hero-shade {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.38));
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 82px;
    }

    .hero-arrow {
        display: none;
    }

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

    .soft-section {
        padding: 20px;
    }

    .category-title-block {
        flex-direction: column;
        align-items: stretch;
    }

    .page-filter-box {
        min-width: 0;
        flex-direction: column;
    }

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

@media (max-width: 560px) {
    .site-header-inner,
    .page-container,
    .category-strip,
    .footer-grid {
        width: min(100% - 24px, 1200px);
    }

    .site-logo {
        font-size: 18px;
    }

    .hero {
        height: 520px;
    }

    .hero p {
        font-size: 15px;
        line-height: 1.65;
    }

    .hero-primary,
    .hero-secondary {
        min-height: 42px;
        padding: 0 18px;
        font-size: 14px;
    }

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

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

    .category-card img {
        width: 100%;
        height: 180px;
    }

    .page-title-block,
    .detail-main,
    .detail-side .rank-panel {
        padding: 22px;
    }

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

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