:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --dark: #0f172a;
    --line: rgba(15, 23, 42, 0.1);
    --brand: #d97706;
    --brand-2: #f59e0b;
    --brand-dark: #92400e;
    --radius: 22px;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(146, 64, 14, 0.96), rgba(217, 119, 6, 0.96), rgba(234, 88, 12, 0.96));
    box-shadow: 0 14px 40px rgba(146, 64, 14, 0.24);
    backdrop-filter: blur(16px);
}

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

.logo,
.desktop-nav,
.mobile-nav {
    display: flex;
    align-items: center;
}

.logo {
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: var(--brand-dark);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.desktop-nav {
    gap: 20px;
    font-size: 15px;
    font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    flex-wrap: wrap;
    gap: 14px 18px;
    padding: 0 16px 18px;
}

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

.hero-carousel {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.45), transparent 38%), linear-gradient(135deg, #111827, #451a03 48%, #0f172a);
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    filter: saturate(1.1) contrast(1.05);
}

.hero-backdrop::after,
.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18)), linear-gradient(0deg, rgba(15, 23, 42, 1), transparent 52%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.55fr);
    align-items: end;
    gap: 52px;
    min-height: 720px;
    padding-top: 90px;
    padding-bottom: 86px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 13px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(217, 119, 6, 0.92);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.detail-copy h1,
.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.hero-copy p,
.detail-copy p,
.page-hero p {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span,
.detail-tags a {
    padding: 7px 12px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.primary-btn,
.secondary-btn,
.text-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 0 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 34px rgba(217, 119, 6, 0.36);
}

.secondary-btn {
    padding: 0 22px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.text-btn {
    color: #fbbf24;
}

.primary-btn:hover,
.secondary-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.45), rgba(15, 23, 42, 0.9));
    box-shadow: var(--shadow);
}

.hero-poster {
    aspect-ratio: 3 / 4;
    align-self: center;
    transform: rotate(2deg);
}

.hero-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.content-section,
.search-panel,
.detail-section,
.player-section {
    margin: 54px 0;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
}

.search-panel h2,
.section-heading h2,
.player-section h2,
.detail-section h2 {
    margin: 0 0 8px;
    font-size: clamp(25px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.search-panel p,
.section-heading p {
    margin: 0;
    color: var(--muted);
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(120px, 0.3fr) minmax(120px, 0.3fr);
    gap: 12px;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    background: #f8fafc;
    font: inherit;
    outline: none;
}

.filter-row input:focus,
.filter-row select:focus {
    border-color: rgba(217, 119, 6, 0.5);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.section-heading::after {
    content: "";
    flex: 1;
    height: 4px;
    max-width: 420px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), transparent);
}

.section-more {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 16px;
    color: var(--brand-dark);
    background: #fffbeb;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.55), rgba(15, 23, 42, 0.9));
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 3;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.94);
}

.rank-badge {
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.3);
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--brand);
}

.movie-info p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span {
    padding: 5px 9px;
    color: var(--brand-dark);
    background: #fffbeb;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    padding: 20px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #92400e);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.15));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    display: block;
    margin-top: 68px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 25% 15%, rgba(251, 191, 36, 0.4), transparent 36%), linear-gradient(135deg, #111827, #451a03 52%, #0f172a);
}

.slim-hero {
    padding: 74px 0 82px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-hero {
    min-height: 640px;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #111827, #7c2d12);
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: blur(2px) saturate(1.1);
}

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 52px;
    align-items: center;
    min-height: 640px;
    padding: 74px 0;
}

.detail-poster {
    aspect-ratio: 2 / 3;
}

.detail-copy h1 {
    max-width: 900px;
}

.detail-tags {
    margin: 22px 0 30px;
}

.detail-main {
    max-width: 1080px;
}

.player-section,
.detail-section {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.25));
    cursor: pointer;
}

.player-cover.is-hidden {
    display: none;
}

.big-play {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-size: 36px;
    box-shadow: 0 18px 42px rgba(217, 119, 6, 0.34);
}

.detail-section p {
    margin: 0;
    color: #334155;
    font-size: 17px;
}

.meta-table dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.meta-table div {
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.meta-table dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.meta-table dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 72px;
    color: rgba(255, 255, 255, 0.78);
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.9fr;
    gap: 42px;
    padding: 52px 0;
}

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.site-footer a {
    display: block;
    margin: 7px 0;
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.is-filtered-out {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-poster,
    .detail-poster {
        width: min(320px, 80vw);
        margin: 0 auto;
    }

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

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

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

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

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

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .filter-row,
    .footer-grid,
    .meta-table dl {
        grid-template-columns: 1fr;
    }

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

    .section-heading::after {
        width: 100%;
    }

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

    .movie-info {
        padding: 13px;
    }

    .detail-layout {
        padding: 44px 0;
    }

    .player-section,
    .detail-section {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }

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

    .hero-copy h1,
    .detail-copy h1,
    .page-hero h1 {
        font-size: 40px;
    }

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