:root {
    color-scheme: light;
    --text: #111827;
    --muted: #6b7280;
    --line: rgba(17, 24, 39, 0.10);
    --soft: #f7f7fb;
    --white: #ffffff;
    --red: #dc2626;
    --pink: #db2777;
    --orange: #f97316;
    --shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    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: var(--text);
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 45%, #fff1f2 100%);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.26);
}

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s ease;
}

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

.nav-sub {
    color: #6b7280;
    font-weight: 600;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 800;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.hero-track,
.hero-slide,
.hero-slide::before,
.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
}

.hero-slide::before {
    content: "";
    z-index: 1;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.56) 44%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 72px;
}

.hero-copy {
    width: min(680px, 100%);
}

.hero-kicker,
.type-badge,
.rank-badge,
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-style: normal;
}

.hero-kicker {
    gap: 8px;
    margin-bottom: 18px;
}

.hero-kicker span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 800;
}

.hero-kicker span:first-child {
    background: var(--red);
}

.hero h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

.hero-actions,
.filter-bar,
.player-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    border: 0;
    background: linear-gradient(135deg, var(--red), var(--pink));
}

.btn.dark {
    color: #111827;
    border-color: #e5e7eb;
    background: #ffffff;
}

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

.hero-btn {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 24px;
    cursor: pointer;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

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

main {
    min-height: 60vh;
}

.content-section,
.page-hero,
.detail-layout,
.category-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    padding: 44px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-title p,
.category-card p,
.site-footer p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    color: var(--red);
    font-weight: 900;
}

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

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

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7f1d1d 55%, #db2777);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.10);
    transition: 0.24s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.65));
}

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

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

.type-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.20);
    font-size: 13px;
}

.card-body {
    display: grid;
    gap: 6px;
    padding: 12px 2px 0;
}

.card-body strong {
    font-size: 15px;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body em,
.card-body small {
    color: var(--muted);
    font-style: normal;
    line-height: 1.55;
}

.card-body em {
    font-size: 12px;
}

.card-body small {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.card-tags span,
.detail-tags span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
}

.page-hero {
    padding: 54px 0 20px;
}

.page-hero-card {
    border-radius: 30px;
    padding: clamp(24px, 5vw, 46px);
    color: #ffffff;
    background: radial-gradient(circle at 10% 20%, rgba(219, 39, 119, 0.65), transparent 35%), linear-gradient(135deg, #111827 0%, #7f1d1d 55%, #db2777 100%);
    box-shadow: var(--shadow);
}

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

.category-card {
    min-height: 180px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

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

.category-card strong {
    font-size: 22px;
}

.filter-panel {
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 0 15px;
    color: #111827;
    background: #ffffff;
    outline: none;
    font-weight: 700;
}

.filter-bar input {
    flex: 1 1 280px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 64px 88px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.ranking-number {
    font-size: 26px;
    font-weight: 950;
    color: var(--red);
    text-align: center;
}

.ranking-cover {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #db2777);
}

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

.ranking-info h2 {
    margin: 0;
    font-size: 20px;
}

.ranking-info p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.score-badge {
    padding: 8px 12px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), var(--pink));
}

.detail-layout {
    padding: 34px 0 52px;
}

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

.breadcrumb a {
    color: var(--red);
    font-weight: 800;
}

.detail-title {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-meta {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.64));
    cursor: pointer;
}

.play-button {
    width: 78px;
    height: 78px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--pink));
    font-size: 28px;
    box-shadow: 0 24px 44px rgba(220, 38, 38, 0.35);
    cursor: pointer;
}

.player-message {
    position: absolute;
    left: 20px;
    bottom: 18px;
    color: #ffffff;
    font-weight: 800;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
}

.article-card,
.side-card {
    border-radius: 26px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid var(--line);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.article-card h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

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

.detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

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

.side-list a {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
}

.side-list img {
    width: 58px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #111827, #db2777);
}

.side-list strong {
    display: block;
    font-size: 14px;
    line-height: 1.45;
}

.side-list small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.site-footer {
    margin-top: 40px;
    padding: 34px 0;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-grid strong {
    color: #ffffff;
    font-size: 20px;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ffffff;
    font-weight: 800;
}

.hidden {
    display: none !important;
}

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

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

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

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

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

    .mobile-nav.open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .hero {
        min-height: 620px;
        height: 76vh;
    }

    .hero-content {
        padding-bottom: 96px;
    }

    .hero-controls {
        left: 16px;
        right: auto;
        bottom: 44px;
    }

    .hero-dots {
        left: 16px;
        bottom: 24px;
    }

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

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

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

    .ranking-item {
        grid-template-columns: 46px 70px 1fr;
    }

    .score-badge {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .container,
    .content-section,
    .page-hero,
    .detail-layout,
    .category-panel,
    .mobile-nav {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        min-width: 0;
    }

    .brand-text small {
        display: none;
    }

    .movie-grid,
    .movie-grid.wide {
        gap: 14px;
    }

    .card-body small,
    .card-tags {
        display: none;
    }
}
