* {
    box-sizing: border-box;
}

:root {
    --rose: #f43f5e;
    --rose-dark: #e11d48;
    --orange: #fb923c;
    --amber: #facc15;
    --cyan: #06b6d4;
    --green: #22c55e;
    --purple: #a855f7;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.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.88);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: var(--ink);
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 12px 26px rgba(244, 63, 94, 0.25);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

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

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

.nav-search,
.hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.hero-search input,
.archive-tools input,
.archive-tools select {
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 220px;
    padding: 10px 16px;
}

.nav-search button,
.hero-search button {
    border: 0;
    color: #fff;
    background: var(--rose);
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
}

.nav-search input:focus,
.hero-search input:focus,
.archive-tools input:focus,
.archive-tools select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff1f2;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--rose);
}

.hero-section {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #f43f5e 0%, #ec4899 48%, #fb923c 100%);
}

.hero-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(50px);
    opacity: 0.32;
    pointer-events: none;
}

.hero-glow-one {
    width: 320px;
    height: 320px;
    left: 6%;
    top: 8%;
    background: #fff;
}

.hero-glow-two {
    width: 420px;
    height: 420px;
    right: 6%;
    bottom: 0;
    background: #fde047;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: 48px;
    min-height: 590px;
    padding: 72px 0;
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.hero-copy h1 {
    margin: 18px 0;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: var(--rose);
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.primary-button.small {
    padding: 9px 16px;
    font-size: 14px;
    color: #fff;
    background: var(--rose);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
}

.ghost-button.dark {
    color: var(--rose);
    border-color: #fecdd3;
    background: #fff1f2;
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.hero-search {
    max-width: 580px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 13px 18px;
}

.hero-feature {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.32);
    transform: rotate(1deg);
}

.hero-feature img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    background: linear-gradient(135deg, #111827, #f43f5e);
    transition: transform 0.35s ease;
}

.hero-feature:hover img {
    transform: scale(1.05);
}

.hero-feature-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 34px;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0));
}

.hero-feature-overlay span {
    display: inline-flex;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 5px 12px;
    color: #fff;
    background: var(--rose);
    font-size: 13px;
    font-weight: 800;
}

.hero-feature-overlay h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.hero-feature-overlay p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.section-block,
.category-band,
.ranking-band {
    padding: 70px 0;
}

.section-block {
    background: #fff;
}

.section-block.alternating:nth-child(even),
.alternating {
    background: #f9fafb;
}

.category-band {
    background: linear-gradient(90deg, #eff6ff, #ecfeff);
}

.ranking-band {
    background: linear-gradient(135deg, #faf5ff, #fff1f2, #fff7ed);
}

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

.section-heading .section-kicker,
.archive-hero .section-kicker,
.detail-content .section-kicker {
    color: var(--rose);
    background: #fff1f2;
    border-color: #fecdd3;
}

.section-heading h2,
.archive-hero h1 {
    margin: 10px 0 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
}

.section-more {
    color: var(--rose);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #f43f5e);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge,
.poster-play {
    position: absolute;
    color: #fff;
    font-weight: 800;
}

.poster-badge {
    left: 14px;
    top: 14px;
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(244, 63, 94, 0.92);
}

.poster-play {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.56);
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta-line a {
    color: var(--rose);
    font-weight: 800;
}

.movie-card h2 {
    margin: 9px 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover {
    color: var(--rose);
}

.movie-card p {
    min-height: 52px;
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 14px;
}

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

.tag-row span {
    border-radius: 999px;
    padding: 4px 9px;
    color: #4b5563;
    background: #f3f4f6;
    font-size: 12px;
}

.wide-tags span {
    font-size: 13px;
}

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

.category-tile,
.category-overview-card {
    display: block;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile strong,
.category-overview-head span {
    display: block;
    margin-bottom: 4px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile > span,
.category-overview-head strong {
    color: var(--rose);
    font-weight: 800;
}

.category-tile small,
.category-overview-card p {
    display: block;
    margin: 10px 0 18px;
    color: var(--muted);
}

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

.mini-posters a {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

.mini-posters img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    opacity: 0.82;
}

.mini-posters span {
    position: absolute;
    inset: auto 8px 7px 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 150px minmax(0, 1fr) 120px;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 20px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 19px;
    font-weight: 900;
}

.rank-medal {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-normal {
    color: #4b5563;
    background: #f3f4f6;
}

.rank-cover img {
    width: 150px;
    height: 90px;
    object-fit: cover;
    border-radius: 14px;
    background: #111827;
}

.rank-info h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.rank-info p {
    margin: 0 0 8px;
    color: #4b5563;
}

.rank-score {
    text-align: right;
    color: var(--rose);
}

.rank-score strong {
    display: block;
    font-size: 20px;
}

.rank-score span {
    color: var(--muted);
    font-size: 12px;
}

.archive-hero {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    padding: 64px 0;
}

.archive-hero.compact-hero {
    background: linear-gradient(135deg, #f43f5e, #fb923c);
}

.archive-hero h1 {
    color: #fff;
}

.archive-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.archive-tools {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 16px;
    max-width: 840px;
    margin-top: 28px;
}

.archive-tools label {
    display: grid;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 800;
}

.archive-tools input,
.archive-tools select {
    width: 100%;
    padding: 13px 16px;
}

.archive-count {
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 800;
}

.empty-state {
    border: 1px dashed #fda4af;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    color: var(--rose);
    background: #fff1f2;
    font-weight: 800;
}

.category-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-overview-card ul {
    margin: 18px 0 22px;
    padding: 0;
    list-style: none;
}

.category-overview-card li + li {
    margin-top: 10px;
}

.category-overview-card li a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #374151;
}

.category-overview-card li a:hover {
    color: var(--rose);
}

.detail-shell {
    padding: 36px 0 72px;
    background: #f9fafb;
}

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

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

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

.player-card,
.side-card {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    background: #000;
}

.site-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(244, 63, 94, 0.92);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-overlay span {
    margin-left: 4px;
    font-size: 30px;
}

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

.player-wrap:hover .player-overlay {
    opacity: 1;
    pointer-events: auto;
}

.detail-content {
    padding: 28px;
}

.title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.title-row h1 {
    margin: 12px 0 12px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.18;
}

.detail-meta {
    margin-bottom: 18px;
}

.text-panel {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.text-panel h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.text-panel p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

.review-panel {
    border-radius: 18px;
    border: 0;
    padding: 24px;
    background: linear-gradient(135deg, #fff1f2, #fdf2f8);
}

.detail-side {
    display: grid;
    gap: 22px;
    align-content: start;
}

.side-card {
    padding: 22px;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    background: #111827;
    margin-bottom: 16px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-card img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
    grid-row: span 2;
}

.related-card span {
    font-weight: 800;
    line-height: 1.35;
}

.related-card small {
    color: var(--muted);
}

.related-card:hover span {
    color: var(--rose);
}

.site-footer {
    color: #d1d5db;
    background: #111827;
    padding: 48px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.8fr;
    gap: 30px;
}

.footer-brand {
    color: #fff;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

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

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

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

[hidden] {
    display: none !important;
}

@media (max-width: 980px) {
    .mobile-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 18px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-search input {
        width: 100%;
    }

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

    .hero-grid {
        min-height: auto;
        padding: 52px 0;
    }

    .movie-grid.three-cols,
    .movie-grid.four-cols,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-row {
        grid-template-columns: 46px 118px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
    }

    .archive-tools {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero-copy p,
    .archive-hero p {
        font-size: 16px;
    }

    .hero-search,
    .nav-search {
        align-items: stretch;
        flex-direction: column;
        border-radius: 22px;
    }

    .hero-search input,
    .hero-search button,
    .nav-search input,
    .nav-search button {
        width: 100%;
    }

    .movie-grid.three-cols,
    .movie-grid.four-cols,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 40px 90px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-cover img {
        width: 90px;
        height: 64px;
    }

    .rank-score {
        grid-column: 1 / -1;
        text-align: left;
    }

    .title-row {
        flex-direction: column;
    }

    .detail-content,
    .side-card {
        padding: 18px;
    }
}
