:root {
    --site-bg: #f8f6f1;
    --panel-bg: #ffffff;
    --text-main: #171717;
    --text-muted: #5f6368;
    --text-soft: #8a8f98;
    --line: #e8e2d9;
    --accent: #dc2626;
    --accent-dark: #b91c1c;
    --accent-soft: #fee2e2;
    --earth: #1f1916;
    --shadow: 0 18px 45px rgba(23, 23, 23, 0.08);
    --shadow-soft: 0 10px 25px rgba(23, 23, 23, 0.06);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--site-bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(232, 226, 217, 0.85);
    backdrop-filter: blur(16px);
}

.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;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.26);
}

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

.desktop-nav a,
.mobile-nav a {
    color: #3f3f46;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--accent);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f4f1eb;
    color: var(--text-main);
    cursor: pointer;
}

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

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

.mobile-nav a {
    padding: 10px 14px;
    border-radius: 12px;
    background: #ffffff;
}

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

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: #111111;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.75s ease;
    pointer-events: none;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 20%, rgba(220, 38, 38, 0.28), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: #ffffff;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 750;
}

.hero-title {
    margin: 0 0 14px;
    font-size: clamp(36px, 5.6vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-site-title {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(18px, 2.2vw, 28px);
    font-weight: 700;
}

.hero-desc {
    max-width: 620px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.hero-meta span,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

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

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

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

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

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

.btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.btn-light {
    background: #ffffff;
    color: var(--accent);
    box-shadow: var(--shadow-soft);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
    padding: 64px 0;
}

.section-tight {
    padding: 42px 0;
}

.section-white {
    background: #ffffff;
}

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

.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 850;
}

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

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

.category-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 9px 18px;
    border-radius: 14px;
    background: #ffffff;
    color: #3f3f46;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.category-pill:hover {
    color: var(--accent);
    background: #fff5f5;
    transform: translateY(-2px);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(232, 226, 217, 0.78);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-media {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #2a2522, #57423a);
}

.movie-grid.compact .poster-media {
    height: 220px;
}

.poster-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-media img {
    transform: scale(1.07);
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 9px;
    background: var(--accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 850;
}

.type-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.56);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(7px);
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 7px;
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: var(--accent);
}

.card-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.clamp-1,
.clamp-2,
.clamp-3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.clamp-1 {
    -webkit-line-clamp: 1;
}

.clamp-2 {
    -webkit-line-clamp: 2;
}

.clamp-3 {
    -webkit-line-clamp: 3;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.card-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f4f1eb;
}

.horizontal-scroll {
    overflow-x: auto;
    padding: 4px 2px 18px;
}

.scroll-row {
    display: flex;
    gap: 18px;
    width: max-content;
}

.scroll-row .movie-card {
    width: 280px;
    flex: 0 0 auto;
}

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

.latest-item {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 12px;
    border: 1px solid rgba(232, 226, 217, 0.78);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.latest-item:hover {
    border-color: rgba(220, 38, 38, 0.28);
    transform: translateX(4px);
}

.latest-rank {
    color: var(--accent);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.latest-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.latest-desc {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.latest-meta {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 750;
}

.page-hero {
    padding: 66px 0 36px;
    background:
        radial-gradient(circle at 10% 0%, rgba(220, 38, 38, 0.12), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, var(--site-bg) 100%);
}

.page-title {
    margin: 0;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.page-desc {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 17px;
}

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

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

.filter-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin: 0 0 24px;
}

.search-input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text-main);
    outline: none;
    box-shadow: var(--shadow-soft);
}

.search-input:focus {
    border-color: rgba(220, 38, 38, 0.45);
}

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

.category-card {
    padding: 22px;
    border: 1px solid rgba(232, 226, 217, 0.82);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    border-color: rgba(220, 38, 38, 0.25);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--text-muted);
}

.count-text {
    margin-top: 16px;
    color: var(--accent);
    font-weight: 900;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin-top: 38px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    min-height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 8px 12px;
    border-radius: 12px;
    background: #ffffff;
    color: #3f3f46;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.pagination .current,
.pagination a:hover {
    background: var(--accent);
    color: #ffffff;
}

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

.player-card,
.detail-panel,
.side-panel {
    border: 1px solid rgba(232, 226, 217, 0.82);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-play {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--accent);
    cursor: pointer;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-play:hover {
    background: #ffffff;
    transform: scale(1.08);
}

.player-play svg {
    margin-left: 5px;
}

.player-error {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: none;
    max-width: calc(100% - 36px);
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(127, 29, 29, 0.88);
    color: #ffffff;
    font-size: 14px;
}

.player-error.is-visible {
    display: block;
}

.detail-panel {
    padding: 26px;
    margin-top: 22px;
}

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

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

.detail-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f4f1eb;
    color: #4b5563;
    font-size: 13px;
    font-weight: 800;
}

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

.detail-section h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

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

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tag-cloud a,
.tag-cloud span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff5f5;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.side-panel {
    padding: 18px;
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.side-poster {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #2a2522, #57423a);
}

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

.side-info {
    display: grid;
    gap: 9px;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.side-info b {
    color: var(--text-main);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 110px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 12px;
    border: 1px solid rgba(232, 226, 217, 0.82);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-num {
    color: var(--accent);
    font-size: 32px;
    font-weight: 950;
    text-align: center;
}

.rank-cover {
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #2a2522, #57423a);
}

.rank-cover img {
    width: 110px;
    height: 144px;
    object-fit: cover;
}

.rank-title {
    margin: 0;
    font-size: 20px;
}

.rank-desc {
    margin: 4px 0 0;
    color: var(--text-muted);
}

.rank-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.rank-tags span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f4f1eb;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.site-footer {
    margin-top: 70px;
    background: #15120f;
    color: #f5f5f4;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
}

.footer-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.footer-text {
    max-width: 560px;
    margin: 0;
    color: #d6d3d1;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #d6d3d1;
}

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

.hidden-by-search {
    display: none !important;
}

.empty-state {
    display: none;
    padding: 26px;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-muted);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

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

@media (max-width: 1040px) {
    .movie-grid,
    .movie-grid.compact,
    .related-grid,
    .category-overview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .side-panel {
        order: -1;
    }

    .rank-item {
        grid-template-columns: 58px 96px 1fr;
    }

    .rank-item .btn {
        grid-column: 3;
        justify-self: start;
    }

    .rank-cover img {
        width: 96px;
        height: 130px;
    }
}

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-content {
        align-items: flex-end;
        padding-bottom: 84px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-arrow {
        top: auto;
        bottom: 24px;
        transform: none;
    }

    .hero-prev {
        left: 20px;
    }

    .hero-next {
        right: 20px;
    }

    .hero-dots {
        bottom: 38px;
    }

    .section {
        padding: 46px 0;
    }

    .section-head {
        display: block;
    }

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

    .poster-media,
    .movie-grid.compact .poster-media {
        height: 230px;
    }

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

    .latest-meta {
        grid-column: 2;
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .header-inner {
        width: min(100% - 22px, 1180px);
    }

    .main-shell,
    .hero-content,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .hero-title {
        font-size: 34px;
    }

    .hero-site-title {
        font-size: 17px;
    }

    .button-row .btn {
        width: 100%;
    }

    .movie-grid,
    .movie-grid.compact,
    .related-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .poster-media,
    .movie-grid.compact .poster-media {
        height: 300px;
    }

    .rank-item {
        grid-template-columns: 42px 88px 1fr;
        gap: 12px;
    }

    .rank-num {
        font-size: 24px;
    }

    .rank-cover img {
        width: 88px;
        height: 118px;
    }

    .rank-title {
        font-size: 17px;
    }

    .player-play {
        width: 68px;
        height: 68px;
    }
}
