:root {
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-red: #dc2626;
    --color-red-dark: #b91c1c;
    --color-red-soft: #fee2e2;
    --color-gold: #f59e0b;
    --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 18px 45px rgba(220, 38, 38, 0.18);
    --radius-lg: 18px;
    --radius-md: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--color-text);
    background: linear-gradient(180deg, #fff7f7 0, var(--color-bg) 280px, var(--color-bg) 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

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

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

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

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-red), #fb7185);
    border-radius: 11px;
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 700;
    color: #374151;
}

.main-nav a {
    transition: color 0.2s ease;
}

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

.category-menu {
    position: relative;
}

.category-menu > button {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.category-dropdown {
    position: absolute;
    top: calc(100% + 18px);
    left: 0;
    width: 220px;
    padding: 10px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    transition: 0.2s ease;
}

.category-menu:hover .category-dropdown,
.category-menu:focus-within .category-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.category-dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.category-dropdown a:hover {
    background: var(--color-red-soft);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
}

.header-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 11px 14px;
    background: #fff;
    color: var(--color-text);
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn,
.header-search button,
.mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: var(--color-red);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.header-search button:hover,
.mobile-toggle:hover {
    transform: translateY(-1px);
    background: var(--color-red-dark);
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.22);
}

.btn-secondary {
    color: var(--color-red);
    background: #fff;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.btn-secondary:hover {
    color: #fff;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
}

.hero {
    position: relative;
    padding: 28px 0 38px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -160px -12% auto -12%;
    height: 420px;
    background: radial-gradient(circle at 20% 30%, rgba(248, 113, 113, 0.24), transparent 36%), radial-gradient(circle at 70% 5%, rgba(251, 146, 60, 0.18), transparent 34%);
    pointer-events: none;
}

.hero-carousel {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: 30px;
    background: #111827;
    box-shadow: 0 30px 80px rgba(17, 24, 39, 0.28);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 5vw, 72px);
    color: #fff;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.88) 56%, rgba(17, 24, 39, 0.08));
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--color-red);
    background: var(--color-red-soft);
    font-size: 13px;
    font-weight: 800;
}

.hero-kicker {
    color: #fecaca;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #374151;
    background: #f3f4f6;
    font-size: 13px;
    font-weight: 700;
}

.hero .pill {
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-art {
    position: relative;
    overflow: hidden;
}

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

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.68), transparent 38%), linear-gradient(0deg, rgba(17, 24, 39, 0.42), transparent 52%);
}

.hero-dots {
    position: absolute;
    left: clamp(32px, 5vw, 72px);
    bottom: 30px;
    z-index: 5;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 36px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.section {
    padding: 34px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--color-muted);
}

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--color-card);
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(220, 38, 38, 0.28);
    box-shadow: var(--shadow-hover);
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    background: linear-gradient(145deg, #1f2937, #991b1b);
}

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

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

.poster-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.86);
    text-align: center;
    font-weight: 900;
    line-height: 1.35;
    opacity: 0;
}

.poster-frame.is-missing .poster-fallback {
    opacity: 1;
}

.poster-frame.is-missing img {
    display: none;
}

.card-badge,
.rank-badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.94);
    font-size: 12px;
    font-weight: 800;
}

.card-score {
    position: absolute;
    z-index: 3;
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #111827;
    background: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-summary {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-top: auto;
    color: var(--color-muted);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius-lg);
    color: #fff;
    background: linear-gradient(135deg, #b91c1c, #111827);
    box-shadow: var(--shadow-card);
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -36px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.category-tile h3 {
    position: relative;
    z-index: 2;
    margin: 0 0 8px;
    font-size: 21px;
}

.category-tile p,
.category-tile span {
    position: relative;
    z-index: 2;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin: 0 0 22px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.result-count {
    margin: 0 0 18px;
    color: var(--color-muted);
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 112px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-red), #fb923c);
    font-size: 22px;
    font-weight: 900;
}

.rank-thumb {
    position: relative;
    width: 112px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(145deg, #111827, #991b1b);
}

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

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-info p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--color-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    padding: 48px 0 24px;
}

.page-hero-card {
    padding: clamp(26px, 4vw, 46px);
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    background: radial-gradient(circle at 10% 0, rgba(251, 146, 60, 0.36), transparent 34%), linear-gradient(135deg, #111827, #991b1b);
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.22);
}

.page-hero-card h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.page-hero-card p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
}

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.player-card {
    background: #080b12;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #080b12;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #080b12;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #fff;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.22), rgba(8, 11, 18, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.play-button-large {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: var(--color-red);
    box-shadow: 0 20px 45px rgba(220, 38, 38, 0.36);
    font-size: 34px;
}

.player-caption {
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.74);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.detail-card {
    padding: clamp(22px, 3vw, 34px);
}

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.16;
    letter-spacing: -0.05em;
}

.detail-lead {
    margin: 0 0 24px;
    color: #4b5563;
    font-size: 18px;
}

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

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: #374151;
}

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

.detail-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--color-red);
    background: var(--color-red-soft);
    font-size: 13px;
    font-weight: 800;
}

.side-card {
    padding: 16px;
}

.side-cover {
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(145deg, #111827, #991b1b);
}

.side-cover img {
    width: 100%;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
}

.info-list {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 14px;
}

.info-list strong {
    color: var(--color-text);
}

.pagination-note {
    margin-top: 22px;
    padding: 16px;
    border-radius: var(--radius-md);
    color: #475569;
    background: #fff;
    border: 1px dashed var(--color-border);
}

.site-footer {
    margin-top: 46px;
    padding: 36px 0;
    color: #64748b;
    background: #fff;
    border-top: 1px solid var(--color-border);
}

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

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

.empty-state {
    display: none;
    padding: 40px;
    text-align: center;
    color: var(--color-muted);
    background: #fff;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
}

.empty-state.is-visible {
    display: block;
}

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

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

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

    .main-nav,
    .header-search {
        display: none;
    }

    .site-header.is-open .main-nav,
    .site-header.is-open .header-search {
        display: flex;
    }

    .site-header.is-open .header-inner {
        align-items: stretch;
        flex-direction: column;
        padding: 14px 0;
    }

    .site-header.is-open .main-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header.is-open .header-search {
        min-width: 0;
    }

    .category-dropdown {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
    }

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

    .hero-art {
        position: absolute;
        inset: 0;
        opacity: 0.45;
    }

    .hero-copy {
        min-height: 520px;
        background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72));
    }

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

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

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

    .rank-item .btn {
        grid-column: 2 / -1;
        width: fit-content;
    }
}

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

    .logo {
        font-size: 18px;
    }

    .hero {
        padding-top: 14px;
    }

    .hero-carousel {
        min-height: 560px;
        border-radius: 22px;
    }

    .hero-copy {
        min-height: 560px;
        padding: 26px;
    }

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

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

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

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

    .rank-thumb {
        display: none;
    }

    .rank-info h3 {
        font-size: 17px;
    }
}
