:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #e5e7eb;
    --accent: #dc2626;
    --accent-dark: #991b1b;
    --accent-soft: #fee2e2;
    --gold: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
}

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

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.28);
}

.brand-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
    font-weight: 650;
    color: #374151;
}

.nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--soft);
    border-radius: 12px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

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

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

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

.mobile-nav-link {
    padding: 11px 12px;
    border-radius: 12px;
    background: #f9fafb;
    color: #374151;
    font-weight: 650;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(248, 113, 113, 0.24), transparent 35%),
        radial-gradient(circle at 85% 20%, rgba(251, 191, 36, 0.10), transparent 30%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    min-height: 570px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 70px 0;
}

.hero-copy {
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.95);
    color: #ffffff;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.03em;
}

.hero-copy h1,
.compact-hero h1,
.detail-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 5vw, 66px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-copy p,
.compact-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-meta {
    margin-top: 22px;
}

.hero-meta span,
.card-meta span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.90);
    font-size: 13px;
    font-weight: 650;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.35);
}

.btn-light {
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
}

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

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.40);
    transform: rotate(1.5deg);
}

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

.hero-poster span,
.play-mark,
.detail-cover span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.45);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.search-strip {
    position: relative;
    z-index: 2;
    margin-top: -36px;
}

.search-strip-inner,
.filter-bar {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    align-items: center;
    gap: 24px;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-strip h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.search-strip p {
    margin: 0;
    color: var(--muted);
}

.hero-search {
    display: flex;
    gap: 12px;
}

.hero-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--soft);
    border-radius: 13px;
    background: #ffffff;
    color: #111827;
    padding: 0 14px;
    outline: none;
}

.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.16);
}

.hero-search button {
    min-width: 96px;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 800;
}

.section {
    padding: 72px 0;
}

.section.white {
    background: #ffffff;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

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

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

.movie-card {
    min-width: 0;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: #e5e7eb;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.play-mark {
    width: 52px;
    height: 52px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.poster-link:hover .poster-shade,
.poster-link:hover .play-mark {
    opacity: 1;
}

.type-badge,
.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    top: 10px;
    right: 10px;
    background: rgba(220, 38, 38, 0.92);
}

.score-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(17, 24, 39, 0.78);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
}

.card-body {
    padding: 12px 2px 0;
}

.card-body h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

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

.card-meta {
    margin-top: 8px;
}

.card-meta span {
    background: #f3f4f6;
    color: #4b5563;
    min-height: 24px;
    font-size: 12px;
}

.card-body p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.16);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.3s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.88), rgba(127, 29, 29, 0.20));
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 1;
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.45;
}

.two-column-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 42px;
}

.ranking-block {
    background: linear-gradient(180deg, #f9fafb, #ffffff);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-item.hidden {
    display: none;
}

.rank-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #e5e7eb;
}

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

.rank-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-number {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    font-weight: 900;
}

.rank-info h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.rank-info p {
    margin: 8px 0 0;
    color: var(--muted);
}

.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 800;
    white-space: nowrap;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #7f1d1d 58%, #111827);
}

.compact-hero {
    padding: 72px 0;
}

.compact-hero p {
    color: rgba(255, 255, 255, 0.78);
}

.sub-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.sub-nav a {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 14px;
    font-weight: 750;
}

.filter-bar {
    grid-template-columns: 1fr 180px;
    margin-bottom: 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar.large {
    grid-template-columns: minmax(280px, 1fr) 220px 180px;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    min-height: 220px;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.category-overview-cover {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #111827;
}

.category-overview-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-body {
    padding: 24px;
}

.category-overview-body h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.category-overview-body p {
    margin: 0 0 18px;
    color: var(--muted);
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 10%, rgba(248, 113, 113, 0.22), transparent 28%);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 34px 0 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

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

.detail-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 24px;
    background: #e5e7eb;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
    max-width: 850px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
    gap: 34px;
    align-items: start;
}

.player-card,
.detail-article {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    padding: 14px;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 18px 48px rgba(220, 38, 38, 0.44);
    font-size: 28px;
}

.play-cover strong {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.55);
}

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

.detail-article {
    padding: 28px;
}

.detail-article h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.detail-article h2:not(:first-child) {
    margin-top: 26px;
}

.detail-article p {
    margin: 0;
    color: #4b5563;
    line-height: 1.85;
}

.info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 28px 0 0;
}

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

.info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.info-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.prev-next {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.prev-next a {
    padding: 12px 14px;
    border-radius: 13px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 750;
}

.prev-next a:hover {
    color: var(--accent);
}

.site-footer {
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
}

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

.site-footer p,
.site-footer li,
.footer-bottom {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

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

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

    .hero-content,
    .detail-layout,
    .detail-main {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-cover {
        width: min(320px, 80vw);
        justify-self: center;
    }

    .detail-main {
        gap: 24px;
    }
}

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

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

    .hero-slider,
    .hero-stage,
    .hero-content {
        min-height: 660px;
    }

    .hero-content {
        padding: 48px 0 84px;
        gap: 28px;
    }

    .search-strip-inner,
    .filter-bar,
    .filter-bar.large {
        grid-template-columns: 1fr;
    }

    .hero-search {
        flex-direction: column;
    }

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

    .two-column-section,
    .overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .category-overview-cover {
        min-height: 220px;
    }

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

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

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
    }

    .brand-name {
        font-size: 17px;
    }

    .hero-copy h1,
    .compact-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .hero-copy p,
    .compact-hero p,
    .detail-one-line {
        font-size: 16px;
    }

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

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

    .section {
        padding: 48px 0;
    }

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

    .detail-article,
    .player-card {
        border-radius: 18px;
    }

    .detail-article {
        padding: 20px;
    }

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