:root {
    --bg: #fff8ed;
    --bg-soft: #fffbf4;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(120, 53, 15, 0.14);
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-hot: #f97316;
    --dark: #111827;
    --shadow: 0 24px 60px rgba(120, 53, 15, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.18), transparent 34rem), var(--bg);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

.shell,
.nav-shell,
.footer-grid,
.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 237, 213, 0.94), rgba(255, 251, 235, 0.94));
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.12);
    backdrop-filter: blur(18px);
}

.nav-shell {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-hot));
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    color: transparent;
    background: linear-gradient(90deg, var(--brand-dark), var(--brand-hot));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-text small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.nav-panel {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links,
.nav-categories,
.footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.nav-link,
.nav-categories a {
    position: relative;
    color: #4b5563;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link::after,
.nav-categories a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: var(--brand);
    transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-categories a:hover {
    color: var(--brand-dark);
}

.nav-link:hover::after,
.nav-link.active::after,
.nav-categories a:hover::after {
    width: 100%;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(251, 191, 36, 0.18);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--brand-dark);
    border-radius: 99px;
}

.hero {
    min-height: 650px;
    padding: 28px 0 52px;
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.75), rgba(255, 248, 237, 0));
}

.hero-stage {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 610px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 36px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.02);
}

.hero-slide::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62), rgba(146, 64, 14, 0.35));
    z-index: 1;
}

.hero-slide::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent);
    z-index: 1;
}

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 16px;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 0.96;
    color: #fff;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-line {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f59e0b;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #78350f;
    background: rgba(254, 243, 199, 0.9);
    font-size: 0.78rem;
    font-weight: 750;
}

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

.btn,
.more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-hot));
    box-shadow: 0 16px 36px rgba(217, 119, 6, 0.32);
}

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

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

.hero-poster,
.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

.hero-poster img,
.detail-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    right: 30px;
    bottom: 28px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    min-height: auto;
    padding: 0;
    background: rgba(255, 255, 255, 0.4) !important;
}

.hero-dot.active {
    width: 28px;
    background: #f59e0b !important;
}

.section {
    padding: 54px 0;
}

.section-head {
    margin-bottom: 24px;
}

.split-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.section-head h2,
.content-card h2 {
    margin: 6px 0 0;
    color: #111827;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.more-link {
    min-height: 40px;
    color: var(--brand-dark);
    background: rgba(251, 191, 36, 0.2);
}

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

.dense-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(249, 115, 22, 0.18));
}

.card-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-dot,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    font-style: normal;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.card-body h3 {
    margin: 8px 0;
    color: #111827;
    font-size: 1.08rem;
    line-height: 1.25;
}

.card-body p {
    min-height: 46px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.tag-row span {
    color: #92400e;
    background: #ffedd5;
}

.category-section {
    border-radius: 42px;
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.76), rgba(255, 251, 235, 0.88));
}

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

.category-card {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    padding: 24px;
    border-radius: 28px;
    background: #111827;
    box-shadow: var(--shadow);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.15), rgba(17, 24, 39, 0.94));
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
}

.category-card span,
.category-card strong,
.category-card p {
    position: relative;
    z-index: 2;
    display: block;
    color: #fff;
}

.category-card span {
    color: #fbbf24;
    font-weight: 900;
}

.category-card strong {
    margin-top: 82px;
    font-size: 1.6rem;
    line-height: 1.05;
}

.category-card p {
    color: rgba(255, 255, 255, 0.78);
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

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

.compact-card .card-poster img {
    height: 100%;
    min-height: 162px;
}

.compact-card .card-body p {
    min-height: auto;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 180px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.08);
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(146, 64, 14, 0.16);
    border-radius: 14px;
    padding: 0 12px;
    color: var(--text);
    background: #fff;
    outline: none;
}

.search-field {
    min-width: 0;
}

.empty-state {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.page-hero {
    margin-top: 28px;
    padding: 64px;
    overflow: hidden;
    border-radius: 36px;
    background: linear-gradient(135deg, #1f2937, #78350f 58%, #f97316);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 920px;
}

.category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: center;
}

.feature-strip {
    display: grid;
    gap: 12px;
}

.feature-mini {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.feature-mini img {
    width: 72px;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.category-overview-card {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: #111827;
}

.category-preview img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.category-overview-card > div {
    padding: 22px;
}

.category-overview-card h2 {
    margin: 8px 0;
}

.full-ranking {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

.detail-hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #111827;
}

.detail-shell {
    position: relative;
    z-index: 3;
    padding: 44px 0 70px;
}

.breadcrumb,
.breadcrumb-sep {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.detail-intro {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    margin-top: 34px;
}

.detail-cover {
    width: 310px;
}

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

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

.watch-section {
    margin-top: -40px;
    position: relative;
    z-index: 4;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(217, 119, 6, 0.36), rgba(0, 0, 0, 0.38));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-hot));
    box-shadow: 0 20px 44px rgba(217, 119, 6, 0.38);
}

.player-overlay strong {
    font-size: 1.1rem;
}

.player-box.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 3;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
}

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

.content-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 34px rgba(120, 53, 15, 0.08);
}

.site-footer {
    margin-top: 60px;
    color: rgba(255, 255, 255, 0.74);
    background: linear-gradient(135deg, #111827, #1f2937 52%, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 48px 0;
}

.footer-brand strong,
.site-footer h3 {
    color: #fff;
}

.footer-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
}

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

.footer-bottom {
    padding: 18px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.55);
}

[hidden],
.movie-card.is-hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .menu-button {
        display: block;
    }

    .nav-panel {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
        border-radius: 22px;
        background: rgba(255, 251, 235, 0.98);
        box-shadow: var(--shadow);
    }

    .nav-panel.open {
        display: flex;
    }

    .nav-links,
    .nav-categories {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .hero-stage {
        min-height: 700px;
    }

    .hero-content,
    .detail-intro,
    .category-hero,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-cover {
        width: min(280px, 70vw);
    }

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

    .page-hero {
        padding: 36px 24px;
    }

    .detail-copy h1,
    .hero-copy h1,
    .page-hero h1 {
        font-size: clamp(2.1rem, 13vw, 4rem);
    }
}

@media (max-width: 620px) {
    .shell,
    .nav-shell,
    .footer-grid,
    .footer-bottom,
    .hero-stage {
        width: min(100% - 22px, 1180px);
    }

    .brand-text strong {
        font-size: 1rem;
    }

    .hero {
        min-height: auto;
        padding-top: 16px;
    }

    .hero-stage {
        min-height: 660px;
        border-radius: 26px;
    }

    .hero-content {
        width: calc(100% - 28px);
        gap: 24px;
    }

    .hero-controls {
        left: 20px;
        right: auto;
        bottom: 18px;
    }

    .section {
        padding: 38px 0;
    }

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

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

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

    .card-body p {
        min-height: auto;
    }

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

    .detail-shell {
        padding-top: 28px;
    }
}
