:root {
    --page-bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #fff7ed;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --orange: #f97316;
    --amber: #facc15;
    --green: #16a34a;
    --blue: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(254, 215, 170, 0.42), transparent 32rem),
        radial-gradient(circle at top right, rgba(191, 219, 254, 0.45), transparent 34rem),
        linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #f1f5f9 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    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.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 78px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 25px rgba(220, 38, 38, 0.28);
    transform: translateZ(0);
    transition: transform 0.28s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
    transform: scale(1.08) rotate(-4deg);
}

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

.brand-name {
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 900;
    line-height: 1;
    color: transparent;
    background: linear-gradient(90deg, var(--red), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
}

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

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

.nav-link {
    position: relative;
    font-weight: 700;
    color: #374151;
    transition: color 0.22s ease;
    white-space: nowrap;
}

.nav-link-sub {
    font-size: 14px;
    color: #64748b;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--red), var(--orange));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.mobile-search input {
    width: 190px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 10px;
    color: var(--text);
}

.header-search button,
.mobile-search button,
.btn-primary,
.btn-ghost,
.filter-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.header-search button,
.mobile-search button,
.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.2);
}

.header-search button,
.mobile-search button {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    font-weight: 800;
}

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

.btn-primary:hover,
.btn-ghost:hover,
.header-search button:hover,
.mobile-search button:hover,
.filter-button:hover {
    transform: translateY(-2px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    background: #f3f4f6;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #111827;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 18px 16px 22px;
    background: rgba(255, 255, 255, 0.98);
}

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

.mobile-panel nav {
    display: grid;
    gap: 14px;
    margin: 0 auto 18px;
    width: min(1180px, 100%);
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0) 55%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: max(16px, calc((100vw - 1180px) / 2));
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 86px;
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--amber);
    font-weight: 900;
}

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

.hero p {
    margin: 0 0 26px;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
}

.hero-meta,
.detail-meta,
.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span,
.result-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

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

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

.hero-dots button {
    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-dots button.active {
    width: 36px;
    background: #ffffff;
}

.section {
    padding: 58px 0;
}

.section.soft {
    margin: 18px auto 48px;
    padding: 52px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.9), rgba(255, 247, 237, 0.92));
    box-shadow: var(--soft-shadow);
}

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

.section-eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--red);
    font-weight: 900;
}

.section h2,
.page-title h1,
.detail-copy h2,
.related-panel h2 {
    margin: 0;
    color: #1f2937;
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.18;
}

.section-head p,
.page-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.link-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--red);
    font-weight: 900;
}

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

.movie-card {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
    box-shadow: var(--soft-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.poster-wrap img,
.compact-poster img,
.detail-poster img,
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.42s ease;
}

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

.movie-card:hover img,
.compact-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
    opacity: 1;
}

.card-badge,
.rank-num {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 9px;
    color: #ffffff;
    background: var(--red);
    font-size: 12px;
    font-weight: 900;
}

.card-badge.muted {
    background: rgba(220, 38, 38, 0.9);
}

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: auto;
    color: var(--red);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: scale(1);
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    color: #1f2937;
    font-weight: 900;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

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

.movie-meta,
.movie-tag {
    color: var(--muted);
    font-size: 13px;
}

.movie-tag {
    display: inline-flex;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--red);
    background: #fee2e2;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 26px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: auto -30px -42px auto;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(249, 115, 22, 0.26));
}

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

.category-card strong {
    display: block;
    margin-bottom: 10px;
    color: #1f2937;
    font-size: 22px;
}

.category-card span {
    color: var(--muted);
    line-height: 1.7;
}

.compact-list {
    display: grid;
    gap: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.compact-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #111827;
}

.compact-info {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 22px 24px;
}

.compact-info strong {
    font-size: 20px;
    color: #1f2937;
}

.compact-info em {
    font-style: normal;
    color: var(--red);
    font-weight: 800;
}

.compact-info span {
    color: var(--muted);
    line-height: 1.7;
}

.rank-num {
    left: 12px;
    right: auto;
    top: 12px;
    min-width: 36px;
    text-align: center;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.page-title {
    padding: 56px 0 26px;
}

.filter-panel {
    margin: 10px 0 32px;
    padding: 22px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.filter-row + .filter-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.filter-search {
    flex: 1 1 260px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
}

.filter-button {
    padding: 10px 16px;
    color: #374151;
    background: #f3f4f6;
    font-weight: 800;
}

.filter-button.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.16);
}

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

.result-empty.show {
    display: block;
}

.player-shell {
    background: #000000;
}

.player-inner {
    position: relative;
    width: min(1180px, 100%);
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.34);
    cursor: pointer;
    transition: background 0.22s ease;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 98px;
    height: 98px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 20px 50px rgba(220, 38, 38, 0.35);
    font-size: 34px;
    transition: transform 0.22s ease;
}

.player-start:hover {
    background: rgba(0, 0, 0, 0.42);
}

.player-start:hover span {
    transform: scale(1.08);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 28px;
    padding: 36px 0 0;
}

.detail-copy,
.related-panel {
    padding: 30px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.detail-copy h1 {
    margin: 0 0 18px;
    color: #1f2937;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.18;
}

.detail-copy h2,
.related-panel h2 {
    margin-top: 30px;
    margin-bottom: 14px;
    font-size: 24px;
}

.detail-meta span {
    color: #374151;
    background: #f3f4f6;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 24px;
}

.detail-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    font-size: 14px;
    font-weight: 700;
}

.detail-copy p {
    color: #4b5563;
    line-height: 1.9;
    text-align: justify;
}

.review-box {
    margin-top: 28px;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fef2f2, #fff7ed);
}

.related-panel {
    position: sticky;
    top: 102px;
    align-self: start;
}

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

.related-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 13px;
    padding: 10px;
    margin: -10px;
    border-radius: 16px;
    transition: background 0.22s ease;
}

.related-card:hover {
    background: #f9fafb;
}

.related-thumb {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: #111827;
}

.related-info strong {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 6px;
    color: #1f2937;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.breadcrumb {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.site-footer {
    margin-top: 70px;
    color: #e5e7eb;
    background: linear-gradient(135deg, #0f172a, #7f1d1d 58%, #1e293b);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0 34px;
}

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

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

.site-footer p,
.site-footer a {
    color: #d1d5db;
    line-height: 1.75;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    padding: 20px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-bottom p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
}

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

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

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

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

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

    .related-panel {
        position: static;
    }

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

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

    .header-inner {
        min-height: 66px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .brand-name {
        font-size: 20px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero {
        min-height: 520px;
    }

    .hero-content {
        bottom: 78px;
    }

    .hero h1,
    .hero h2 {
        font-size: 36px;
    }

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

    .section {
        padding: 42px 0;
    }

    .section.soft {
        padding: 28px 18px;
        border-radius: 24px;
    }

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

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

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

    .compact-card {
        grid-template-columns: 128px minmax(0, 1fr);
    }

    .compact-info {
        padding: 14px;
    }

    .compact-info strong {
        font-size: 16px;
    }

    .compact-info span {
        display: none;
    }

    .filter-panel {
        padding: 16px;
    }

    .detail-copy,
    .related-panel {
        padding: 22px;
    }

    .player-start span {
        width: 72px;
        height: 72px;
        font-size: 26px;
    }

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