:root {
    color-scheme: light;
    --bg: #f7f4ed;
    --card: #ffffff;
    --ink: #1c1917;
    --muted: #78716c;
    --line: #e7e5e4;
    --green: #16803c;
    --green-dark: #14532d;
    --amber: #b45309;
    --amber-soft: #fef3c7;
    --shadow: 0 22px 60px rgba(28, 25, 23, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #fff7ed 0%, #f0fdf4 42%, #f5f5f4 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--green-dark));
    box-shadow: 0 12px 30px rgba(20, 83, 45, 0.28);
}

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

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

.main-nav a,
.nav-more button {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    color: #57534e;
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.nav-more:hover button {
    color: var(--green);
    background: #f0fdf4;
}

.nav-more {
    position: relative;
}

.nav-panel {
    position: absolute;
    right: 0;
    top: 42px;
    display: none;
    width: 188px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.nav-more:hover .nav-panel {
    display: grid;
    gap: 4px;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    background: #f5f5f4;
    color: var(--ink);
    font-size: 22px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #0c0a09;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 44%, rgba(16, 185, 129, 0.22), transparent 34%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.56) 46%, rgba(0, 0, 0, 0.14) 100%),
        linear-gradient(0deg, rgba(12, 10, 9, 0.72), transparent 42%);
}

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

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 22px;
    color: #f5f5f4;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
}

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

.hero-kicker {
    margin-bottom: 18px;
}

.hero-kicker span,
.hero-kicker strong,
.tag-row span,
.hero-tags span,
.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero-kicker span {
    color: #ffffff;
    background: var(--green);
}

.hero-kicker strong {
    color: #fbbf24;
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-actions {
    margin-top: 24px;
}

.primary-btn,
.ghost-btn,
.text-link,
.pager-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 44px;
    padding: 0 20px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    box-shadow: 0 16px 34px rgba(22, 128, 60, 0.28);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(22, 128, 60, 0.34);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

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

.hero-dots button.active {
    background: #ffffff;
}

.section-block,
.search-band {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.search-band {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
    align-items: center;
}

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

.section-head.compact {
    display: block;
}

.section-head span,
.page-hero span {
    color: var(--green);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.section-head h2,
.page-hero h1 {
    margin: 6px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-head a,
.text-link {
    color: var(--green);
    font-weight: 800;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 22px;
    outline: none;
    padding: 18px 20px;
    background: #ffffff;
    color: var(--ink);
    font-size: 16px;
    box-shadow: 0 12px 32px rgba(28, 25, 23, 0.08);
}

.global-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    z-index: 20;
    display: none;
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.global-results.open {
    display: block;
}

.result-link {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #f5f5f4;
}

.result-link img {
    width: 52px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: #e7e5e4;
}

.result-link strong,
.rank-item strong,
.movie-title {
    display: block;
    color: var(--ink);
    font-weight: 900;
}

.result-link span,
.rank-item em,
.movie-meta,
.movie-line,
.page-hero p,
.footer-inner p,
.category-overview-card p,
.story-card p,
.detail-line {
    color: var(--muted);
    line-height: 1.72;
}

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

.category-tile {
    min-height: 150px;
    border: 1px solid rgba(22, 128, 60, 0.13);
    border-radius: 26px;
    padding: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.18), transparent 38%),
        linear-gradient(135deg, #ffffff, #f0fdf4);
    box-shadow: 0 12px 34px rgba(28, 25, 23, 0.08);
    transition: 0.2s ease;
}

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

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
}

.category-tile span {
    color: var(--muted);
    line-height: 1.65;
}

.two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    align-items: start;
}

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

.movie-grid.wide,
.category-list,
.ranking-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 10px 26px rgba(28, 25, 23, 0.08);
    transition: 0.2s ease;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #e7e5e4, #fef3c7);
}

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

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

.poster-year,
.rank-num {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.poster-year {
    right: 10px;
    bottom: 10px;
}

.rank-num {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, var(--amber), var(--green));
}

.movie-info {
    padding: 16px;
}

.movie-title {
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.36;
}

.movie-meta {
    margin: 0 0 8px;
    font-size: 13px;
}

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

.tag-row span {
    color: var(--green-dark);
    background: #dcfce7;
}

.side-rank {
    position: sticky;
    top: 88px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 34px rgba(28, 25, 23, 0.08);
}

.rank-list,
.related-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 34px 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: 0.2s ease;
}

.rank-item:hover {
    background: #f0fdf4;
}

.rank-index {
    color: var(--amber);
    font-size: 18px;
    font-weight: 950;
}

.rank-item img {
    width: 54px;
    height: 74px;
    border-radius: 12px;
    object-fit: cover;
    background: #e7e5e4;
}

.rank-item em {
    display: block;
    font-style: normal;
    font-size: 12px;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    border-radius: 34px;
    padding: clamp(34px, 7vw, 74px);
    background:
        radial-gradient(circle at right top, rgba(22, 128, 60, 0.22), transparent 34%),
        linear-gradient(135deg, #ffffff, #fef3c7 44%, #f0fdf4);
    box-shadow: var(--shadow);
}

.page-hero.category-hero,
.page-hero.ranking-hero {
    display: grid;
    grid-template-columns: 1fr 0.72fr;
    gap: 28px;
    align-items: center;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.08);
    transition: 0.2s ease;
}

.category-cover {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 2 / 3;
    background: #e7e5e4;
}

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

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

.category-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.category-preview a {
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--green-dark);
    background: #dcfce7;
    font-size: 13px;
    font-weight: 800;
}

.compact-card .movie-info {
    padding: 14px;
}

.compact-card .movie-title {
    font-size: 16px;
}

.compact-card .movie-line {
    min-height: 42px;
    font-size: 13px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #0c0a09;
}

.detail-bg,
.detail-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.detail-bg {
    object-fit: cover;
    filter: blur(8px) saturate(1.1);
    transform: scale(1.08);
}

.detail-shade {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.24)),
        linear-gradient(0deg, #0c0a09 0%, rgba(12, 10, 9, 0.16) 62%);
}

.detail-wrap {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    padding: 54px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb,
.breadcrumb a {
    display: flex;
    gap: 8px;
    color: #fbbf24;
    font-weight: 800;
}

.detail-info h1 {
    margin: 16px 0;
    color: #ffffff;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.detail-line {
    max-width: 760px;
    color: #f5f5f4;
    font-size: 20px;
}

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

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(8px);
}

.tag-row.large span {
    color: #ffffff;
    background: rgba(22, 128, 60, 0.74);
}

.detail-info .primary-btn {
    margin-top: 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    align-items: start;
}

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

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.62));
    cursor: pointer;
}

.play-cover span {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    font-size: 32px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.play-cover strong {
    font-size: 18px;
}

.play-cover.hide {
    display: none;
}

.story-card,
.detail-aside {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 26px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.08);
}

.story-card {
    margin-top: 24px;
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.story-card p {
    margin: 0 0 16px;
    font-size: 17px;
}

.pager-row {
    justify-content: space-between;
    margin-top: 24px;
}

.pager-row a {
    color: var(--green-dark);
    background: #dcfce7;
}

.detail-aside {
    position: sticky;
    top: 88px;
}

.related-list {
    grid-template-columns: 1fr;
}

.related-list .movie-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    border-radius: 18px;
}

.related-list .poster {
    height: 144px;
}

.related-list .tag-row {
    display: none;
}

.site-footer {
    margin-top: 54px;
    color: #d6d3d1;
    background: linear-gradient(90deg, #1c1917, #292524);
}

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

.footer-inner strong {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 20px;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: #fbbf24;
    font-weight: 800;
}

@media (max-width: 1040px) {
    .category-grid,
    .movie-grid.wide,
    .category-list,
    .ranking-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .two-columns,
    .detail-layout,
    .search-band,
    .page-hero.category-hero,
    .page-hero.ranking-hero {
        grid-template-columns: 1fr;
    }

    .side-rank,
    .detail-aside {
        position: static;
    }
}

@media (max-width: 780px) {
    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: 69px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--line);
        border-radius: 22px;
        padding: 12px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

    .nav-more,
    .nav-panel {
        display: none;
    }

    .hero {
        min-height: 620px;
        height: 74vh;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .category-grid,
    .movie-grid,
    .movie-grid.wide,
    .category-list,
    .ranking-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }
}

@media (max-width: 520px) {
    .brand-text {
        font-size: 18px;
    }

    .section-block,
    .search-band,
    .page-hero {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-content {
        width: min(100% - 26px, 1180px);
    }

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

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .related-list .movie-card {
        grid-template-columns: 88px 1fr;
    }
}
