:root {
    --bg: #f5f3ef;
    --bg-soft: #faf9f7;
    --ink: #1c1917;
    --muted: #78716c;
    --line: #e7e5e4;
    --card: #ffffff;
    --amber: #d97706;
    --amber-dark: #92400e;
    --stone: #292524;
    --stone-soft: #44403c;
    --shadow: 0 20px 60px rgba(41, 37, 36, 0.12);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fafaf9 0%, var(--bg) 38%, #e7e5e4 100%);
    min-height: 100vh;
}

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

img {
    max-width: 100%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 250, 249, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.9);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #92400e);
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.brand-text {
    font-size: 1.14rem;
}

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

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--stone-soft);
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: var(--amber-dark);
    background: rgba(217, 119, 6, 0.1);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(41, 37, 36, 0.08);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--stone);
    border-radius: 999px;
}

.hero-section {
    position: relative;
    height: 72vh;
    min-height: 540px;
    overflow: hidden;
    background: #1c1917;
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: radial-gradient(circle at 72% 20%, rgba(245, 158, 11, 0.28), transparent 38%), #1c1917;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(28, 25, 23, 0.94) 0%, rgba(28, 25, 23, 0.72) 42%, rgba(28, 25, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(28, 25, 23, 0.85) 0%, rgba(28, 25, 23, 0) 40%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 74px;
}

.hero-copy {
    max-width: 720px;
    color: #fff;
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: var(--amber);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--amber-dark);
    background: rgba(245, 158, 11, 0.12);
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-tags span {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.quick-search button {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover,
.quick-search button:hover {
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #f59e0b;
}

.search-panel {
    position: relative;
    z-index: 4;
    margin-top: -44px;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 460px);
    gap: 28px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel span {
    color: var(--amber-dark);
    font-weight: 900;
}

.search-panel h2 {
    margin: 8px 0 8px;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.search-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    background: #fff;
    color: var(--ink);
    outline: none;
}

.content-section {
    padding: 72px 0 0;
}

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

.section-head.compact {
    align-items: start;
    margin-bottom: 18px;
}

.section-kicker {
    color: var(--amber-dark);
    background: rgba(217, 119, 6, 0.12);
}

.section-head h2 {
    margin: 10px 0 8px;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link,
.watch-link,
.card-category {
    color: var(--amber-dark);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.92);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 30px rgba(41, 37, 36, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(217, 119, 6, 0.32);
    box-shadow: 0 22px 54px rgba(41, 37, 36, 0.13);
}

.poster-link {
    position: relative;
    display: block;
}

.image-box {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.35), transparent 30%),
        linear-gradient(135deg, #292524, #78716c);
}

.poster-box {
    aspect-ratio: 3 / 4;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

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

.image-box.image-fallback::after {
    content: attr(data-title);
    position: absolute;
    inset: 18px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #fff;
    font-weight: 900;
    line-height: 1.35;
    font-size: clamp(1rem, 3vw, 1.6rem);
}

.image-box .is-hidden,
.category-cover-grid .is-hidden {
    display: none;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(217, 119, 6, 0.9);
    font-size: 0.78rem;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

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

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.card-body p {
    min-height: 4.8em;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

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

.category-tile {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(41, 37, 36, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile .poster-box {
    border-radius: 16px;
}

.category-tile strong {
    display: block;
    font-size: 1.05rem;
}

.category-tile span {
    display: block;
    margin: 4px 0;
    color: var(--amber-dark);
    font-size: 0.86rem;
    font-weight: 800;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.split-section {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 22px;
    align-items: stretch;
}

.ranking-card,
.guide-card,
.detail-article,
.player-shell,
.category-overview-card,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(41, 37, 36, 0.07);
}

.ranking-card,
.guide-card {
    padding: 26px;
}

.ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.ranking-list li:last-child {
    border-bottom: 0;
}

.rank-num {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: var(--stone);
    font-weight: 900;
}

.ranking-list small {
    color: var(--muted);
}

.guide-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
}

.guide-card h2 {
    margin: 12px 0;
    font-size: 2rem;
}

.guide-card p {
    color: var(--muted);
    line-height: 1.8;
}

.page-hero {
    padding: 72px 0 24px;
}

.page-hero h1 {
    color: var(--ink);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.breadcrumb-links,
.inline-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    color: var(--muted);
}

.breadcrumb-links a,
.inline-samples a {
    color: var(--amber-dark);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    margin-bottom: 24px;
}

.filter-count {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 18px;
}

.category-cover-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    align-self: stretch;
    min-height: 170px;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #292524, #78716c);
}

.category-cover-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.category-overview-card span {
    color: var(--amber-dark);
    font-weight: 900;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 40px;
    padding: 60px 0 36px;
    align-items: center;
}

.detail-poster .poster-box {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    color: var(--ink);
}

.detail-one-line {
    max-width: 780px;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-meta div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.detail-meta dd {
    margin: 6px 0 0;
    font-weight: 900;
}

.large-tags {
    gap: 10px;
}

.player-section {
    padding-top: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #0c0a09;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: #fff;
    border: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(217, 119, 6, 0.28), transparent 24%),
        linear-gradient(180deg, rgba(12, 10, 9, 0.12), rgba(12, 10, 9, 0.72));
    cursor: pointer;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 18px 44px rgba(217, 119, 6, 0.38);
    font-size: 1.6rem;
}

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

.player-overlay small,
.player-message {
    color: rgba(255, 255, 255, 0.76);
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 16px;
    margin: 0;
    font-size: 0.92rem;
}

.article-section {
    padding-top: 34px;
}

.detail-article {
    padding: 28px;
}

.detail-article h2 {
    margin: 0 0 12px;
    font-size: 1.5rem;
}

.detail-article h2 + p {
    margin-top: 0;
}

.detail-article p {
    color: var(--stone-soft);
    line-height: 2;
}

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

.search-page-panel {
    padding-top: 36px;
}

.global-search-panel {
    grid-template-columns: 1fr 180px 180px auto;
}

.site-footer {
    margin-top: 80px;
    padding: 42px 0;
    color: rgba(255, 255, 255, 0.8);
    background: #1c1917;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-brand {
    color: #fff;
    font-size: 1.2rem;
}

.footer-inner p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 440px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.is-hidden-card {
    display: none !important;
}

@media (max-width: 1100px) {
    .movie-grid,
    .featured-grid,
    .all-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

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

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

    .hero-section {
        height: 78vh;
        min-height: 580px;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(28, 25, 23, 0.28), rgba(28, 25, 23, 0.94));
    }

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

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

    .search-panel,
    .footer-inner {
        display: grid;
    }

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

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

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .page-container,
    .nav-wrap,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: clamp(2rem, 12vw, 3.5rem);
    }

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

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

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

    .card-body {
        padding: 13px;
    }

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

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

    .category-tile {
        grid-template-columns: 78px 1fr;
    }

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

    .ranking-list li {
        grid-template-columns: 46px 1fr;
    }

    .ranking-list small {
        grid-column: 2;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .featured-grid,
    .all-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
}
