:root {
    color-scheme: dark;
    --bg: #0d0f14;
    --bg-soft: #151923;
    --bg-card: rgba(24, 28, 38, 0.86);
    --red: #b91c1c;
    --red-dark: #7f1d1d;
    --red-soft: rgba(185, 28, 28, 0.18);
    --gold: #fde68a;
    --text: #f8fafc;
    --muted: #a7b0c0;
    --line: rgba(255, 255, 255, 0.1);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(185, 28, 28, 0.24), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(253, 230, 138, 0.12), transparent 26rem),
        linear-gradient(180deg, #111827 0%, var(--bg) 38%, #07090d 100%);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, 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: 60;
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.96), rgba(185, 28, 28, 0.94), rgba(127, 29, 29, 0.96));
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1360px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, #fde68a, #f97316);
    color: #7f1d1d;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.brand-text strong,
.footer-brand {
    display: block;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.brand-text em {
    display: block;
    margin-top: 4px;
    color: #fecaca;
    font-size: 12px;
    font-style: normal;
}

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

.nav-link,
.mobile-link {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

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

.nav-search,
.wide-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    width: 240px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    outline: none;
    padding: 0 16px;
}

.nav-search input::placeholder,
.wide-search input::placeholder,
.filter-bar input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.nav-search button,
.wide-search button,
.primary-btn,
.ghost-btn,
.section-link {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.wide-search button,
.primary-btn {
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #49100d;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.nav-search button,
.wide-search button {
    height: 42px;
    padding: 0 18px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.ghost-btn,
.section-link {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #fff7ed;
}

.nav-search button:hover,
.wide-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    max-height: 460px;
    overflow: auto;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(16, 18, 27, 0.98);
    box-shadow: var(--shadow);
}

.search-results.is-visible {
    display: grid;
    gap: 8px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.search-result-item:hover {
    background: rgba(185, 28, 28, 0.28);
}

.search-result-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.search-result-item strong,
.search-result-item em {
    display: block;
}

.search-result-item em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(69, 10, 10, 0.98);
}

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

.mobile-panel nav {
    width: min(1360px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-stage,
.hero-slide,
.hero-bg,
.hero-shade {
    position: absolute;
    inset: 0;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.12) contrast(1.08);
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(8, 10, 15, 0.92) 0%, rgba(10, 12, 18, 0.76) 42%, rgba(127, 29, 29, 0.32) 100%),
        linear-gradient(0deg, rgba(13, 15, 20, 0.92) 0%, transparent 52%);
}

.hero-content {
    position: relative;
    width: min(1360px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px 0 110px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(34px, 5vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 22px 0 0;
    color: #fff7ed;
    font-size: clamp(26px, 3.5vw, 48px);
    line-height: 1.12;
}

.hero-summary,
.page-hero p,
.detail-line {
    max-width: 760px;
    color: #d8dee9;
    font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff7ed;
    font-size: 13px;
}

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

.hero-control {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(12px);
}

.hero-control > button,
.hero-dot {
    border: 0;
    color: #fff;
    cursor: pointer;
}

.hero-control > button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
    width: 30px;
    border-radius: 999px;
    background: var(--gold);
}

.quick-search-panel,
.content-section,
.split-section,
.page-shell,
.site-footer,
.player-section {
    width: min(1360px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    margin-top: -48px;
    position: relative;
    z-index: 10;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-panel h2,
.quick-search-panel p {
    margin: 0;
}

.quick-search-panel p {
    color: var(--muted);
}

.wide-search input {
    width: min(460px, 50vw);
    background: rgba(255, 255, 255, 0.08);
}

.content-section,
.split-section {
    margin-top: 56px;
}

.content-section.compact {
    width: auto;
    margin: 0;
}

.section-heading,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.section-heading.simple {
    margin-bottom: 18px;
}

.section-heading h2,
.category-overview-head h2,
.player-section h2,
.detail-text h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-heading p,
.category-overview-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.section-link {
    padding: 9px 16px;
    white-space: nowrap;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(9, 11, 16, 0.94), rgba(127, 29, 29, 0.18));
}

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 1;
}

.category-tile span {
    font-size: 24px;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.52;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(20, 24, 33, 0.86);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.36);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.5), rgba(15, 23, 42, 0.92));
}

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

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

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(127, 29, 29, 0.92);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.card-body p {
    display: -webkit-box;
    min-height: 62px;
    margin: 10px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-card.small .card-body p {
    display: none;
}

.movie-card.small .card-title {
    min-height: 44px;
    font-size: 15px;
}

.tag-row span {
    min-height: 24px;
    padding: 0 8px;
    color: #fde68a;
    font-size: 12px;
    background: rgba(250, 204, 21, 0.1);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 28px;
    align-items: start;
}

.ranking-panel,
.category-overview-card,
.page-hero,
.detail-hero,
.player-section,
.detail-text,
.filter-bar {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(20, 24, 33, 0.82);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.rank-list,
.ranking-grid {
    display: grid;
    gap: 12px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 64px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.ranking-grid .rank-item {
    grid-template-columns: auto 86px 1fr;
}

.rank-item:hover {
    border-color: rgba(250, 204, 21, 0.32);
    background: rgba(185, 28, 28, 0.18);
}

.rank-no {
    min-width: 34px;
    color: var(--gold);
    font-size: 18px;
    font-weight: 900;
}

.rank-item img {
    width: 64px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-grid .rank-item img {
    width: 86px;
    height: 116px;
}

.rank-item strong,
.rank-item em {
    display: block;
}

.rank-item strong {
    color: #ffffff;
}

.rank-item em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-shell {
    padding: 42px 0 70px;
}

.page-hero {
    padding: clamp(28px, 5vw, 56px);
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.72), rgba(17, 24, 39, 0.88)),
        radial-gradient(circle at 80% 20%, rgba(250, 204, 21, 0.16), transparent 24rem);
}

.page-hero.slim {
    margin-bottom: 28px;
}

.category-overview-list {
    display: grid;
    gap: 28px;
}

.category-overview-card {
    padding: 24px;
}

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

.filter-bar input {
    flex: 1 1 320px;
    width: auto;
}

.filter-bar select {
    width: 190px;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.catalog-grid .movie-card.is-hidden {
    display: none;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: clamp(24px, 4vw, 44px);
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.56), rgba(17, 24, 39, 0.9)),
        radial-gradient(circle at 82% 24%, rgba(250, 204, 21, 0.14), transparent 24rem);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.detail-info .primary-btn {
    margin-top: 28px;
}

.detail-meta {
    margin: 22px 0;
}

.player-section {
    margin-top: 34px;
    padding: clamp(18px, 3vw, 30px);
}

.video-frame {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
    color: #ffffff;
    cursor: pointer;
}

.play-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #49100d;
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.34);
}

.play-cover strong {
    font-size: 18px;
}

.detail-text {
    padding: clamp(22px, 4vw, 36px);
}

.detail-text p {
    color: #d8dee9;
    font-size: 17px;
}

.site-footer {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner p {
    max-width: 640px;
}

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

.footer-links a:hover {
    color: var(--gold);
}

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        gap: 14px;
    }

    .nav-search {
        margin-left: auto;
    }

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

    .ranking-panel {
        position: static;
    }

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

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

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

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

@media (max-width: 780px) {
    .header-inner {
        min-height: 68px;
    }

    .brand-text em,
    .nav-search {
        display: none;
    }

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding-top: 60px;
    }

    .quick-search-panel {
        grid-template-columns: 1fr;
        margin-top: 0;
        border-radius: 0;
        width: 100%;
    }

    .wide-search {
        display: grid;
        grid-template-columns: 1fr auto;
        width: 100%;
    }

    .wide-search input {
        width: 100%;
        min-width: 0;
    }

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

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

    .rank-item,
    .ranking-grid .rank-item {
        grid-template-columns: auto 64px 1fr;
    }

    .ranking-grid .rank-item img {
        width: 64px;
        height: 86px;
    }

    .filter-bar select {
        flex: 1 1 160px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .category-grid,
    .movie-grid,
    .movie-grid.three,
    .movie-grid.mini,
    .movie-grid.related,
    .ranking-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .detail-hero,
    .page-hero,
    .category-overview-card,
    .player-section,
    .detail-text {
        border-radius: 18px;
    }
}
