:root {
    --bg: #fafaf9;
    --panel: #ffffff;
    --ink: #292524;
    --muted: #78716c;
    --line: #e7e5e4;
    --soft: #f5f5f4;
    --brand: #dc2626;
    --brand-dark: #991b1b;
    --brand-soft: #fee2e2;
    --gold: #f59e0b;
    --shadow: 0 18px 45px rgba(41, 37, 36, 0.12);
    --radius: 22px;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.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);
    box-shadow: 0 8px 25px rgba(41, 37, 36, 0.06);
}

.nav-shell {
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border-radius: 14px;
    box-shadow: 0 12px 25px rgba(220, 38, 38, 0.28);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-menu a {
    color: #57534e;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--brand);
}

.search-box {
    position: relative;
    width: min(300px, 28vw);
}

.search-box input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f5f5f4;
    color: var(--ink);
    padding: 0 14px 0 38px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-box::before {
    content: "⌕";
    position: absolute;
    left: 14px;
    top: 8px;
    color: #a8a29e;
    z-index: 1;
}

.search-box input:focus {
    background: #ffffff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.search-panel {
    position: absolute;
    right: 0;
    top: 48px;
    width: min(420px, 90vw);
    max-height: 430px;
    overflow: auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 10px;
    display: none;
}

.search-panel.open {
    display: block;
}

.search-result-item {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border-radius: 12px;
}

.search-result-item:hover {
    background: var(--soft);
}

.search-result-item strong {
    font-size: 14px;
}

.search-result-item span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 25px;
    padding: 6px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
    padding: 14px 22px 18px;
    background: #ffffff;
}

.mobile-menu.open {
    display: grid;
    gap: 14px;
}

.mobile-menu nav {
    display: grid;
    gap: 7px;
}

.mobile-menu a {
    padding: 9px 10px;
    border-radius: 10px;
}

.mobile-menu a.active,
.mobile-menu a:hover {
    color: var(--brand);
    background: var(--brand-soft);
}

.mobile-menu .search-box {
    width: 100%;
}

.hero {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: #1c1917;
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.96), rgba(28, 25, 23, 0.76), rgba(28, 25, 23, 0.28)), var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 28%, rgba(239, 68, 68, 0.36), transparent 34%),
        linear-gradient(0deg, rgba(28, 25, 23, 0.72), transparent 45%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    min-height: 76vh;
    padding: 82px 22px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 58px;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.38);
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.hero h1,
.hero-site-title {
    margin: 24px 0 0;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.hero h2 {
    margin: 18px 0 0;
    font-size: clamp(26px, 3vw, 46px);
    line-height: 1.1;
}

.hero p {
    margin: 20px 0 0;
    max-width: 680px;
    color: #e7e5e4;
    font-size: 17px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-plain {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 15px 28px rgba(220, 38, 38, 0.34);
}

.btn-secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.btn-plain {
    color: var(--brand);
    background: var(--brand-soft);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-plain:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
    background: #0c0a09;
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    height: 100%;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    backdrop-filter: blur(12px);
}

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

.hero-dots button {
    width: 36px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.active {
    background: #ffffff;
}

.section,
.page-hero,
.detail-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 56px 22px;
}

.page-hero {
    padding-top: 62px;
    padding-bottom: 28px;
}

.page-hero h1,
.section-title h2,
.detail-title h1 {
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.04em;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p,
.section-title p,
.detail-title p {
    color: var(--muted);
    line-height: 1.8;
}

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

.section-title h2 {
    font-size: clamp(26px, 3vw, 38px);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.85);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 8px 24px rgba(41, 37, 36, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1c1917;
}

.poster-link img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.88);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-badge,
.poster-year {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    background: var(--brand);
}

.poster-year {
    right: 12px;
    background: rgba(0, 0, 0, 0.64);
}

.movie-card-body {
    padding: 15px 15px 16px;
}

.movie-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--brand);
}

.movie-card p {
    min-height: 44px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.58;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 11px;
    color: #57534e;
    font-size: 12px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--soft);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tag-row span,
.info-chip,
.detail-tags span {
    color: #7f1d1d;
    background: var(--brand-soft);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 182px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #1c1917;
    box-shadow: 0 12px 28px rgba(41, 37, 36, 0.12);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.45s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.84), rgba(28, 25, 23, 0.12));
}

.category-card-body {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1;
    color: #ffffff;
}

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

.category-card p {
    margin: 0;
    color: #e7e5e4;
    font-size: 13px;
    line-height: 1.55;
}

.ranking-panel {
    display: grid;
    gap: 12px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 58px 88px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(41, 37, 36, 0.05);
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    border-radius: 15px;
    font-weight: 900;
}

.ranking-thumb {
    overflow: hidden;
    border-radius: 14px;
    background: #1c1917;
}

.ranking-thumb img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.ranking-info h3 {
    margin: 0;
    font-size: 18px;
}

.ranking-info h3 a:hover {
    color: var(--brand);
}

.ranking-info p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: #57534e;
    font-size: 12px;
}

.ranking-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--soft);
}

.ranking-action {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--brand);
    background: var(--brand-soft);
    font-weight: 800;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 24px 0 28px;
}

.filter-bar input {
    width: min(520px, 100%);
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    padding: 0 15px;
    outline: none;
}

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

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    padding: 26px;
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 28px;
    background:
        radial-gradient(circle at 18% 8%, rgba(254, 202, 202, 0.65), transparent 32%),
        #ffffff;
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: #1c1917;
    box-shadow: 0 22px 48px rgba(41, 37, 36, 0.2);
}

.detail-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-title h1 {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
}

.detail-title p {
    font-size: 16px;
}

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

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

.player-section,
.content-panel,
.related-panel {
    margin-top: 34px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(41, 37, 36, 0.06);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 26px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #0c0a09;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

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

.player-button-core {
    display: grid;
    place-items: center;
    gap: 12px;
}

.player-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    background: rgba(220, 38, 38, 0.95);
    border-radius: 50%;
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.34);
    font-size: 30px;
}

.player-text {
    font-size: 17px;
    font-weight: 900;
}

.content-panel p {
    color: #44403c;
    line-height: 1.9;
    margin: 0 0 16px;
}

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

.related-grid .movie-card h3 {
    font-size: 14px;
}

.related-grid .movie-card p,
.related-grid .tag-row,
.related-grid .card-meta {
    display: none;
}

.site-footer {
    margin-top: 40px;
    background: #1c1917;
    color: #d6d3d1;
}

.footer-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 36px 22px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.footer-shell p {
    margin: 8px 0 0;
    color: #a8a29e;
}

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

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

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 13px;
    }

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

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

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

@media (max-width: 860px) {
    .desktop-nav,
    .nav-shell > .search-box {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 58px;
        padding-bottom: 72px;
    }

    .hero-poster {
        max-width: 260px;
        transform: rotate(0deg);
    }

    .section-title {
        align-items: start;
        flex-direction: column;
    }

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

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

    .detail-cover {
        max-width: 320px;
    }

    .ranking-row {
        grid-template-columns: 42px 70px minmax(0, 1fr);
    }

    .ranking-action {
        grid-column: 3;
        justify-self: start;
    }

    .footer-shell {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .nav-shell {
        height: 62px;
        padding: 0 16px;
    }

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

    .brand-subtitle {
        display: none;
    }

    .hero {
        min-height: 78vh;
    }

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

    .hero h2 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-actions {
        display: grid;
    }

    .section,
    .page-hero,
    .detail-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .ranking-row {
        grid-template-columns: 38px 62px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .player-section,
    .content-panel,
    .related-panel,
    .detail-hero {
        padding: 16px;
        border-radius: 20px;
    }
}
