:root {
    --page-bg: #f8fafc;
    --text-main: #111827;
    --text-soft: #6b7280;
    --line: #e5e7eb;
    --card: #ffffff;
    --red: #ef4444;
    --red-dark: #b91c1c;
    --orange: #f97316;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.28);
    font-size: 18px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #374151;
    font-weight: 650;
}

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

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

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

.site-search input,
.page-filter input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 18px;
    outline: none;
    color: var(--text-main);
    background: #ffffff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-search input:focus,
.page-filter input:focus {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, 92vw);
    display: none;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.search-panel a {
    display: block;
    padding: 13px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.search-panel a:last-child {
    border-bottom: 0;
}

.search-panel strong {
    display: block;
    color: #111827;
    line-height: 1.35;
}

.search-panel span {
    display: block;
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 13px;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    color: #111827;
    font-size: 22px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 13px 0;
    color: #374151;
    font-weight: 650;
    border-bottom: 1px solid #f3f4f6;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.72) 43%, rgba(17, 24, 39, 0.24) 100%),
        radial-gradient(circle at 18% 22%, rgba(239, 68, 68, 0.36), transparent 32%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    align-items: center;
    padding: 96px 0 80px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: #fecaca;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 900;
}

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

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.28);
}

.btn-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.btn-soft {
    color: var(--red-dark);
    background: #fee2e2;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

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

.hero .pill {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    display: flex;
    gap: 10px;
}

.hero-control {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.section {
    padding: 72px 0 0;
}

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

.section-kicker {
    color: var(--red);
    font-weight: 900;
    letter-spacing: 0.08em;
    font-size: 13px;
}

.section-title {
    margin: 6px 0 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.18;
    letter-spacing: -0.03em;
    font-weight: 900;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--text-soft);
    max-width: 680px;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(239, 68, 68, 0.25);
}

.movie-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(145deg, #111827, #374151);
}

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.94);
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 14px 14px 16px;
}

.movie-info h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info p {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.movie-tag {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 23px;
    font-weight: 900;
}

.category-card p {
    margin: 10px 0 16px;
    color: var(--text-soft);
}

.ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 62px 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.rank-num {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 900;
}

.rank-cover {
    width: 92px;
    height: 124px;
    border-radius: 14px;
    object-fit: cover;
    background: #111827;
}

.rank-copy h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

.rank-copy p {
    margin: 7px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    padding: 76px 0 44px;
    background:
        radial-gradient(circle at 12% 0%, rgba(239, 68, 68, 0.16), transparent 28%),
        linear-gradient(180deg, #ffffff, #f8fafc);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    color: #111827;
}

.page-hero p {
    max-width: 760px;
    color: var(--text-soft);
    font-size: 18px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 14px;
}

.crumbs a {
    color: var(--red-dark);
    font-weight: 750;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.page-filter {
    width: min(480px, 100%);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #6b7280;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    font-weight: 800;
}

.filter-btn.is-active {
    color: #ffffff;
    background: var(--red);
}

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

.detail-main,
.detail-side,
.text-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.detail-main {
    overflow: hidden;
}

.detail-title {
    padding: 28px;
}

.detail-title h1 {
    color: #111827;
    font-size: clamp(32px, 5vw, 56px);
}

.detail-title p {
    margin: 16px 0 0;
    color: var(--text-soft);
    font-size: 18px;
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    cursor: pointer;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    cursor: pointer;
    z-index: 3;
}

.play-layer.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.play-stack {
    display: grid;
    place-items: center;
    gap: 12px;
}

.play-mark {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 42px rgba(239, 68, 68, 0.36);
    font-size: 30px;
    padding-left: 5px;
}

.play-title {
    font-size: 18px;
    font-weight: 900;
}

.detail-body {
    padding: 28px;
}

.text-panel {
    padding: 24px;
    margin-top: 18px;
}

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

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

.detail-side {
    padding: 20px;
}

.side-cover {
    width: 100%;
    border-radius: 20px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #111827;
}

.side-meta {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    color: #374151;
}

.side-meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 9px;
}

.side-meta span:first-child {
    color: var(--text-soft);
}

.related-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.related-card {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f9fafb;
}

.related-card img {
    width: 74px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.related-card strong {
    display: block;
    line-height: 1.35;
    font-size: 15px;
}

.related-card span {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--text-soft);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
}

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

.site-footer {
    margin-top: 78px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 30px;
    padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.site-footer p,
.site-footer a {
    color: #d1d5db;
    font-size: 14px;
}

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

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0;
    color: #9ca3af;
    font-size: 13px;
}

@media (max-width: 960px) {
    .site-nav,
    .site-header .site-search {
        display: none;
    }

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

    .mobile-nav .site-search {
        display: block;
        width: 100%;
        margin: 14px 0;
    }

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

    .category-grid,
    .ranking-list,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-side {
        order: -1;
    }
}

@media (max-width: 700px) {
    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding: 76px 0 88px;
    }

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

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

    .section {
        padding-top: 52px;
    }

    .section-head {
        display: block;
    }

    .section-actions {
        margin-top: 16px;
    }

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

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

    .rank-cover {
        width: 76px;
        height: 102px;
    }

    .detail-title,
    .detail-body {
        padding: 20px;
    }

    .text-panel {
        padding: 20px;
    }
}

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

    .brand {
        font-size: 18px;
    }

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

    .movie-card {
        border-radius: 18px;
    }
}
