:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-panel: rgba(15, 23, 42, 0.78);
    --bg-card: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-2: #f97316;
    --accent-soft: rgba(245, 158, 11, 0.18);
    --green: #22c55e;
    --red: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.12), transparent 36rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(22px);
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--line);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #1f1300;
    background: linear-gradient(135deg, #facc15, #fb923c);
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.38);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--soft);
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.16);
}

.header-search {
    width: 260px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.search-panel input,
.filter-search input {
    min-width: 0;
    width: 100%;
    color: #fff;
    background: transparent;
    outline: none;
    border: 0;
}

.header-search button,
.search-panel button,
.primary-btn,
.secondary-btn,
.ghost-btn,
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.header-search button,
.search-panel button,
.primary-btn,
.play-button {
    color: #211200;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 800;
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.28);
}

.header-search button {
    padding: 8px 14px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    min-height: 46px;
    padding: 0 22px;
}

.secondary-btn,
.ghost-btn {
    color: #fff;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #fff;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

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

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

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, transparent 36%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 48px;
    align-items: center;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-title {
    max-width: 780px;
    margin: 14px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 680px;
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.page-lead {
    color: var(--muted);
}

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

.hero-meta span,
.tag-row span,
.info-pill,
.filter-button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
}

.hero-meta span {
    padding: 8px 13px;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hero-poster-card {
    position: relative;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
}

.hero-mini-info {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(14px);
}

.hero-mini-info strong {
    display: block;
    margin-bottom: 4px;
}

.hero-mini-info em {
    color: var(--muted);
    font-style: normal;
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(245, 158, 11, 0.9);
}

.hero-prev {
    left: max(16px, calc((100% - 1180px) / 2 - 72px));
}

.hero-next {
    right: max(16px, calc((100% - 1180px) / 2 - 72px));
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.search-panel,
.filter-panel,
.detail-hero,
.player-card,
.content-panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel {
    position: relative;
    z-index: 5;
    width: min(1060px, calc(100% - 32px));
    margin: -50px auto 48px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-panel input {
    min-height: 54px;
    padding: 0 20px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.45);
}

.search-panel button {
    min-width: 140px;
    min-height: 54px;
}

.content-section {
    margin-top: 58px;
}

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

.section-heading h1,
.section-heading h2,
.page-title {
    margin: 8px 0 10px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-lead {
    max-width: 760px;
    margin: 0;
    line-height: 1.8;
}

.section-more {
    color: var(--accent);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.52);
    box-shadow: 0 24px 62px rgba(0, 0, 0, 0.36);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #111827;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.82) 100%);
}

.poster-badges {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.poster-badges span,
.rank-badge {
    padding: 5px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.poster-badges .rank-badge {
    color: #1f1300;
    background: linear-gradient(135deg, #facc15, #fb923c);
}

.card-body {
    padding: 15px;
}

.card-title {
    display: block;
    min-height: 48px;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.42;
}

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

.card-meta {
    margin: 7px 0;
    font-size: 13px;
    line-height: 1.5;
}

.card-desc {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--soft);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 5px 9px;
    color: #fef3c7;
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--bg-soft);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.9));
}

.tile-content {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
}

.tile-content strong,
.tile-content em {
    display: block;
}

.tile-content strong {
    font-size: 19px;
    font-weight: 900;
}

.tile-content em {
    margin-top: 6px;
    color: var(--soft);
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
    gap: 24px;
}

.rank-panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.76);
    overflow: hidden;
}

.rank-panel h2,
.side-panel h2 {
    margin: 0;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    font-size: 22px;
}

.rank-list {
    display: grid;
}

.rank-row {
    display: grid;
    grid-template-columns: 46px 62px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    transition: background 0.25s ease;
}

.rank-row:hover {
    background: rgba(245, 158, 11, 0.1);
}

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

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #1f1300;
    background: linear-gradient(135deg, #facc15, #fb923c);
    font-weight: 900;
}

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

.rank-info strong {
    margin-bottom: 6px;
    font-size: 17px;
}

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

.rank-score {
    color: var(--accent);
    font-size: 20px;
    font-weight: 900;
}

.filter-panel {
    padding: 18px;
    margin: 28px 0;
}

.filter-search {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-button {
    padding: 9px 14px;
    color: var(--soft);
}

.filter-button.is-active,
.filter-button:hover {
    color: #1f1300;
    background: linear-gradient(135deg, #facc15, #fb923c);
}

.empty-state {
    display: none;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 24px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 32px;
    padding: 28px;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 24% 20%, rgba(245, 158, 11, 0.18), transparent 34rem);
    pointer-events: none;
}

.detail-poster,
.detail-body {
    position: relative;
    z-index: 2;
}

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

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

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

.detail-title {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

.info-pill {
    padding: 8px 12px;
}

.detail-summary {
    color: var(--soft);
    font-size: 17px;
    line-height: 1.9;
}

.player-card {
    overflow: hidden;
    margin-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.66));
    cursor: pointer;
}

.player-shell.is-playing .player-overlay {
    display: none;
}

.play-button {
    width: 98px;
    height: 98px;
    border-radius: 50%;
    font-size: 32px;
}

.player-copy {
    padding: 24px;
}

.player-copy h2,
.player-copy p {
    margin: 0;
}

.player-copy h2 {
    margin-bottom: 10px;
}

.player-copy p {
    color: var(--soft);
    line-height: 1.8;
}

.content-panel {
    margin-top: 28px;
    padding: 24px;
}

.content-panel h2 {
    margin: 0 0 14px;
}

.content-panel p {
    margin: 0 0 16px;
    color: var(--soft);
    line-height: 1.9;
}

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

.related-grid .card-title {
    min-height: auto;
    font-size: 15px;
}

.related-grid .card-desc,
.compact-card .card-desc {
    display: none;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 28px;
}

.footer-inner p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: start;
}

.footer-links a {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
}

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 30px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

@media (max-width: 1080px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .header-search {
        display: none;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .site-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(2, 6, 23, 0.96);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        padding: 12px 14px;
    }

    .hero-slider {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 36px 0 74px;
    }

    .hero-poster-card {
        width: min(280px, 100%);
    }

    .hero-control {
        display: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

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

    .rank-layout,
    .detail-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .header-inner,
    .page-main,
    .footer-inner,
    .copyright {
        width: min(100% - 22px, 1180px);
    }

    .brand-text {
        font-size: 18px;
    }

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

    .hero-desc,
    .detail-summary {
        font-size: 15px;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-title {
        min-height: 42px;
        font-size: 15px;
    }

    .card-desc {
        min-height: 40px;
        font-size: 13px;
    }

    .section-heading {
        display: block;
    }

    .rank-row {
        grid-template-columns: 36px 54px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .detail-hero,
    .content-panel,
    .filter-panel,
    .player-copy {
        padding: 18px;
    }

    .play-button {
        width: 78px;
        height: 78px;
        font-size: 26px;
    }
}
