:root {
    --primary: #d89410;
    --primary-dark: #b6790d;
    --primary-soft: #fff3df;
    --accent: #f95c16;
    --secondary: #1f2937;
    --secondary-deep: #111827;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --page: #f8fafc;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .08), 0 10px 22px -8px rgba(0, 0, 0, .12);
    --shadow-hover: 0 22px 45px -18px rgba(17, 24, 39, .36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(229, 231, 235, .9);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 14px 30px -16px var(--accent);
}

.brand-name {
    font-size: 21px;
    background: linear-gradient(90deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
    font-weight: 650;
    color: #374151;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

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

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 800;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-nav a {
    padding: 11px 12px;
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
}

.mobile-nav a:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: var(--secondary-deep);
}

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .55) 46%, rgba(0, 0, 0, .18)), radial-gradient(circle at 18% 66%, rgba(216, 148, 16, .45), transparent 34%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 76px;
}

.hero-labels,
.hero-actions,
.hero-meta,
.tag-row,
.movie-meta,
.section-heading,
.detail-meta,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-labels span,
.tag-row span,
.detail-meta span {
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, .15);
    color: inherit;
    font-size: 13px;
    font-weight: 750;
    backdrop-filter: blur(8px);
}

.hero h1 {
    max-width: 820px;
    margin: 18px 0 16px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1;
    letter-spacing: -.05em;
}

.hero p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
}

.hero-meta {
    margin-bottom: 30px;
    color: #f9fafb;
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

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

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 18px 34px -20px var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background .2s ease, transform .2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, .24);
    transform: translateY(-2px);
}

.hero-prev {
    left: 26px;
}

.hero-next {
    right: 26px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

.section,
.page-head,
.detail-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 66px 0;
}

.section.alt {
    width: 100%;
    background: #fff;
}

.section.alt > .section-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.section.dark {
    width: 100%;
    color: #fff;
    background: linear-gradient(135deg, #111827, #263244);
}

.section.dark > .section-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-heading h2,
.page-head h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -.03em;
}

.section-heading p,
.page-head p,
.detail-title p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
}

.dark .section-heading p,
.dark .movie-meta,
.dark .wide-card p {
    color: #d1d5db;
}

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

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

.movie-card,
.category-tile,
.content-card,
.player-wrap,
.filter-panel,
.wide-card {
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.movie-card {
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

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

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

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

.movie-card:hover img,
.wide-card:hover img,
.category-tile:hover img {
    transform: scale(1.06);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(0, 0, 0, .72), transparent);
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--secondary-deep);
    font-size: 16px;
    box-shadow: 0 18px 36px -18px #000;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 900;
}

.movie-info {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover,
.wide-info a:hover,
.breadcrumb a:hover {
    color: var(--primary-dark);
}

.movie-meta {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
    gap: 8px;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #d1d5db;
}

.movie-info p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    background: #f3f4f6;
    color: #4b5563;
    padding: 5px 9px;
    font-size: 12px;
}

.chip-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.chip-cloud a {
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.chip-cloud a:hover {
    background: #fff;
    color: var(--primary-dark);
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    padding: 24px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

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

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

.category-tile p {
    margin: 0;
    color: var(--muted);
}

.category-tile .tile-bg {
    position: absolute;
    right: -30px;
    bottom: -42px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(249, 92, 22, .24), rgba(216, 148, 16, 0));
}

.wide-list {
    display: grid;
    gap: 16px;
}

.wide-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 18px;
    padding: 12px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

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

.wide-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
}

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

.wide-poster b {
    position: absolute;
    left: 8px;
    top: 8px;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.wide-info {
    align-self: center;
}

.wide-info a {
    display: block;
    color: #111827;
    font-size: 18px;
    font-weight: 850;
}

.wide-card p {
    margin: 6px 0 10px;
    color: #4b5563;
}

.page-head {
    padding: 58px 0 22px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr .8fr .8fr;
    gap: 14px;
    padding: 18px;
    margin: 24px 0 28px;
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: #374151;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(216, 148, 16, .12);
}

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

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

.detail-shell {
    padding: 28px 0 66px;
}

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

.player-wrap {
    overflow: hidden;
}

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

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

.player-poster-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
}

.player-poster-layer img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .72;
}

.player-poster-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(216, 148, 16, .24), rgba(0, 0, 0, .62));
}

.player-poster-layer.is-hidden {
    display: none;
}

.player-overlay-button {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--secondary-deep);
    font-size: 34px;
    box-shadow: 0 24px 60px -24px #000;
    transition: transform .2s ease, background .2s ease;
}

.player-poster-layer:hover .player-overlay-button {
    transform: scale(1.08);
    background: #fff;
}

.detail-title {
    padding: 24px;
}

.detail-meta {
    margin: 12px 0 18px;
}

.detail-meta span {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.content-card {
    padding: 24px;
    margin-top: 22px;
}

.content-card h2,
.sidebar-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.sidebar-card {
    position: sticky;
    top: 92px;
    padding: 20px;
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

.related-item {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    transition: background .2s ease;
}

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

.related-item img {
    width: 92px;
    height: 62px;
    object-fit: cover;
    border-radius: 12px;
}

.related-item strong {
    display: block;
    line-height: 1.35;
}

.related-item span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    background: linear-gradient(135deg, #111827, #263244);
    color: #fff;
}

.footer-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 34px;
    display: grid;
    grid-template-columns: 1.3fr .85fr .85fr;
    gap: 34px;
}

.footer-main p {
    max-width: 560px;
    color: #d1d5db;
}

.footer-links h2 {
    margin: 0 0 12px;
    color: #fbbf24;
    font-size: 17px;
}

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

.footer-links a {
    color: #d1d5db;
}

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: #9ca3af;
    font-size: 14px;
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

    .sidebar-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 82px;
    }

    .hero-control {
        display: none;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section {
        padding: 44px 0;
    }

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

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

    .wide-card {
        grid-template-columns: 104px 1fr;
        gap: 12px;
    }

    .wide-card p {
        display: none;
    }

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

@media (max-width: 480px) {
    .nav-shell,
    .section,
    .page-head,
    .detail-shell,
    .hero-content,
    .footer-shell,
    .footer-bottom {
        width: min(100% - 22px, 1240px);
    }

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

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

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }
}
