:root {
    --bg: #f8fafc;
    --soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --red-soft: #fee2e2;
    --radius: 16px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0f172a, #1e293b);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.22);
}

.site-nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    background: var(--red);
    box-shadow: 0 8px 22px rgba(220, 38, 38, 0.35);
    font-size: 14px;
}

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

.nav-links a {
    position: relative;
    color: #e2e8f0;
    font-weight: 700;
    font-size: 14px;
    transition: color .2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    border-radius: 999px;
    transform: scaleX(0);
    background: var(--red);
    transition: transform .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #f87171;
}

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

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.35), transparent 32%), linear-gradient(135deg, #0f172a 0%, #7f1d1d 54%, #0f172a 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
}

.hero-glow {
    position: absolute;
    right: -140px;
    top: 70px;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.28);
    filter: blur(40px);
}

.hero-inner {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
}

.hero-slide {
    width: 100%;
    display: none;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 420px);
    align-items: center;
    gap: 54px;
}

.hero-slide.active {
    display: grid;
    animation: fadeUp .45s ease both;
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fecaca;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #e2e8f0;
    font-size: clamp(18px, 2.5vw, 24px);
}

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

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

.hero-tags span,
.detail-tags a,
.tag-row span {
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.9);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

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

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

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

.btn-primary {
    color: #fff;
    background: var(--red);
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.26);
}

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

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.17);
    backdrop-filter: blur(8px);
}

.btn-ghost.dark {
    color: var(--dark);
    background: #fff;
}

.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    background: rgba(15, 23, 42, 0.55);
}

.hero-poster img,
.poster-wrap img,
.detail-poster img,
.category-tile img,
.compact-card img,
.ranking-line img,
.rank-row img,
.category-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-play,
.play-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.95);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.32);
}

.hero-play {
    left: 50%;
    top: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 44px;
    display: flex;
    gap: 10px;
}

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

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

.section {
    padding: 76px 0;
}

.bg-white {
    background: #fff;
}

.bg-soft {
    background: var(--soft);
}

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

.section-title div {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

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

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

.small-grid {
    grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
}

.wide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: var(--radius);
    transition: transform .2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: #cbd5e1;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.poster-wrap img {
    transition: transform .3s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.68), transparent 55%);
    opacity: 0;
    transition: opacity .2s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 8px;
    padding: 3px 8px;
    color: #fff;
    background: var(--red);
    font-size: 12px;
    font-weight: 800;
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.86);
    transition: opacity .2s ease, transform .2s ease;
}

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

.movie-info {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-top: 12px;
}

.movie-info strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover .movie-info strong {
    color: var(--red);
}

.movie-meta,
.movie-line {
    color: var(--muted);
    font-size: 13px;
}

.movie-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-wide .poster-wrap {
    aspect-ratio: 16 / 10;
}

.search-panel {
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

.search-row input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    outline: 0;
}

.search-row input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.filter-pill {
    border: 0;
    border-radius: 999px;
    padding: 7px 13px;
    color: #334155;
    background: #e2e8f0;
    font-weight: 700;
}

.filter-pill.active,
.filter-pill:hover {
    color: #fff;
    background: var(--red);
}

.category-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
}

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    min-height: 170px;
    background: var(--dark);
    box-shadow: var(--shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    opacity: .55;
    transition: transform .3s ease;
}

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

.category-tile span {
    position: absolute;
    inset: auto 18px 18px;
    color: #fff;
}

.category-tile strong,
.category-overview-card strong {
    display: block;
    font-size: 22px;
    line-height: 1.2;
}

.category-tile em,
.category-overview-card em {
    display: block;
    margin-top: 8px;
    color: #e2e8f0;
    font-size: 13px;
    font-style: normal;
}

.category-overview-card {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: #fff;
}

.category-thumbs {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    opacity: .42;
}

.category-overview-card strong,
.category-overview-card em {
    position: relative;
}

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

.rank-list,
.ranking-lines,
.compact-list,
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-row,
.ranking-line,
.compact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform .2s ease;
}

.rank-row:hover,
.ranking-line:hover,
.compact-card:hover {
    transform: translateX(4px);
}

.rank-num {
    min-width: 42px;
    color: var(--red);
    font-size: 22px;
    font-weight: 900;
}

.rank-row img,
.ranking-line img {
    width: 58px;
    height: 78px;
    border-radius: 10px;
    background: #cbd5e1;
}

.rank-row strong,
.ranking-line strong,
.compact-card strong {
    display: block;
    color: var(--text);
}

.rank-row em,
.ranking-line em,
.compact-card em {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.ranking-card {
    align-self: start;
    position: sticky;
    top: 98px;
    border-radius: 24px;
    color: #fff;
    padding: 30px;
    background: linear-gradient(135deg, #991b1b, #0f172a);
    box-shadow: var(--shadow);
}

.ranking-card h2 {
    margin: 0 0 12px;
    font-size: 32px;
    line-height: 1.1;
}

.page-hero {
    padding: 72px 0;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #7f1d1d, #0f172a);
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #e2e8f0;
    font-size: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #fecaca;
    font-weight: 700;
}

.breadcrumbs a:hover {
    color: #fff;
}

.detail-hero {
    color: #fff;
    padding: 54px 0;
    background: radial-gradient(circle at 18% 12%, rgba(239, 68, 68, .35), transparent 30%), linear-gradient(135deg, #0f172a, #1e293b 48%, #7f1d1d);
}

.detail-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: start;
}

.detail-poster {
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    box-shadow: var(--shadow);
    background: #334155;
}

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

.lead {
    color: #e2e8f0;
    font-size: 18px;
    margin: 18px 0 0;
}

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

.detail-meta span {
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    padding: 7px 10px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
}

.detail-side {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    padding: 18px;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(14px);
}

.detail-side h2,
.player-section h2,
.article-card h2,
.side-card h2 {
    margin: 0 0 16px;
}

.compact-card {
    background: rgba(255, 255, 255, .1);
    box-shadow: none;
}

.compact-card img {
    width: 54px;
    height: 74px;
    border-radius: 10px;
    background: #334155;
}

.compact-card strong {
    color: #fff;
}

.compact-card em {
    color: #cbd5e1;
}

.player-section {
    padding: 64px 0;
    background: #020617;
    color: #fff;
}

.player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .74), rgba(0, 0, 0, .22));
}

.player-cover-hidden {
    display: none;
}

.big-play {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--red);
    box-shadow: 0 18px 42px rgba(220, 38, 38, .35);
    font-size: 28px;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
}

.article-card,
.side-card {
    border-radius: 20px;
    background: #fff;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

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

.article-card p {
    color: #334155;
    font-size: 17px;
}

.side-card {
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-card a {
    border-radius: 12px;
    background: var(--soft);
    padding: 12px 14px;
    color: var(--dark);
    font-weight: 800;
}

.side-card a:hover {
    color: #fff;
    background: var(--red);
}

.ranking-main {
    flex: 1;
    min-width: 0;
}

.ranking-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.footer-logo {
    font-size: 20px;
    margin-bottom: 16px;
}

.site-footer p {
    color: #94a3b8;
    margin: 0;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 14px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.is-hidden {
    display: none !important;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-radius: 18px;
        padding: 10px;
        background: #111827;
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px;
    }

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

    .hero-inner {
        padding: 48px 0 84px;
    }

    .hero-poster {
        max-width: 340px;
        margin: 0 auto;
        transform: none;
    }

    .hero-dots {
        left: 0;
        right: 0;
        justify-content: center;
    }

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

    .ranking-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

    .hero,
    .hero-inner {
        min-height: 620px;
    }

    .section {
        padding: 52px 0;
    }

    .search-row,
    .section-title,
    .ranking-line {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .movie-info strong {
        font-size: 14px;
    }

    .movie-line,
    .tag-row,
    .ranking-meta {
        display: none;
    }

    .page-hero,
    .detail-hero {
        padding: 46px 0;
    }
}
