:root {
    --paper: #fafaf9;
    --paper-deep: #f4f0e8;
    --ink: #3d3d3d;
    --muted: #6f6a60;
    --primary: #267f56;
    --primary-dark: #17613f;
    --primary-soft: #dcf2e4;
    --accent: #cf6913;
    --accent-soft: #fcefd0;
    --line: rgba(61, 61, 61, 0.12);
    --shadow: 0 18px 50px rgba(45, 38, 24, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: radial-gradient(circle at 18% 0%, rgba(220, 242, 228, 0.9), transparent 28%), var(--paper);
    font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.7;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 249, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(38, 127, 86, 0.28);
}

.logo-text {
    font-size: 1.22rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #4e4a44;
}

.main-nav a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    border: 0;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 1.1rem;
}

.hero-section {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #ffffff;
    background: #17251f;
}

.hero-bg-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 16%, rgba(207, 105, 19, 0.42), transparent 26%),
        radial-gradient(circle at 20% 12%, rgba(38, 127, 86, 0.55), transparent 34%),
        linear-gradient(135deg, #13211b 0%, #25372d 52%, #14100d 100%);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    align-items: center;
    gap: clamp(28px, 6vw, 80px);
    width: min(1200px, calc(100% - 36px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 600ms ease, transform 600ms ease;
    padding: 72px 0;
}

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

.hero-image-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.42);
}

.hero-image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.48), transparent 48%);
}

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

.poster-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.62);
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

img.is-missing {
    display: none;
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-size: clamp(2.3rem, 5.2vw, 5.6rem);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 620px;
    margin: 22px 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
}

.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: 3px 10px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid rgba(38, 127, 86, 0.12);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 14px 28px rgba(38, 127, 86, 0.24);
}

.btn-ghost {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost.light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.26);
}

.btn.wide {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-size: 2rem;
    cursor: pointer;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

.hero-dots button.is-active {
    width: 28px;
    background: #ffffff;
}

.search-panel,
.section-block {
    margin-top: 48px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.ranking-head h2,
.detail-content h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    letter-spacing: -0.03em;
}

.search-panel p,
.category-card span,
.overview-card p,
.movie-desc,
.movie-meta,
.page-hero p,
.detail-one-line,
.detail-content p,
.site-footer p {
    color: var(--muted);
}

.search-box,
.filters label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.search-box input,
.filters select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color: var(--ink);
    background: #ffffff;
}

.search-box input:focus,
.filters select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(38, 127, 86, 0.12);
}

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

.section-heading a {
    color: var(--primary);
    font-weight: 900;
}

.compact-heading {
    align-items: center;
}

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

.category-card,
.overview-card,
.ranking-box,
.movie-card,
.ranking-card,
.info-panel {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(45, 38, 24, 0.08);
}

.category-card {
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    overflow: hidden;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: auto -30px -50px auto;
    width: 120px;
    height: 120px;
    background: var(--accent-soft);
    border-radius: 999px;
}

.category-card strong {
    font-size: 1.28rem;
}

.category-count {
    align-self: flex-start;
    padding: 3px 10px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.category-card em {
    position: relative;
    z-index: 1;
    color: var(--accent);
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 800;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

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

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

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

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

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

.poster-link,
.detail-poster,
.rank-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.poster-link img,
.detail-poster img,
.rank-poster img {
    position: relative;
    z-index: 1;
    transition: transform 300ms ease;
}

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

.poster-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    padding: 3px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
}

.movie-card-body {
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    min-height: 3.2em;
    overflow: hidden;
    font-weight: 900;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--primary);
}

.movie-meta,
.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0;
    font-size: 0.86rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card .movie-desc,
.compact-card .tag-row {
    display: none;
}

.ranking-box {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.ranking-head {
    margin-bottom: 16px;
}

.ranking-head span {
    color: var(--muted);
    font-size: 0.88rem;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.rank-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 56px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--paper);
}

.rank-row:hover {
    background: var(--primary-soft);
}

.rank-no {
    color: var(--accent);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.rank-score {
    text-align: right;
    color: var(--primary-dark);
    font-weight: 900;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 10%, rgba(207, 105, 19, 0.35), transparent 30%),
        linear-gradient(135deg, #17251f, #274234);
}

.page-hero {
    padding: 76px 0;
}

.small-hero {
    padding: 58px 0;
}

.page-hero h1 {
    font-size: clamp(2rem, 4.4vw, 4.5rem);
}

.page-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.76);
}

.page-hero-inner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

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

.overview-card {
    padding: 24px;
}

.overview-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.overview-top span {
    color: var(--primary-dark);
    font-weight: 900;
}

.overview-top a {
    color: var(--accent);
    font-weight: 900;
}

.overview-card ul {
    margin: 14px 0 0;
    padding-left: 18px;
}

.overview-card li + li {
    margin-top: 6px;
}

.filters {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 180px 200px;
    gap: 14px;
    align-items: end;
    margin-bottom: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 110px;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.rank-poster {
    border-radius: 16px;
}

.ranking-card h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.ranking-card p {
    margin: 0 0 10px;
    color: var(--muted);
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-line span {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--paper-deep);
    font-size: 0.78rem;
    font-weight: 800;
}

.rank-no.big {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 0.82rem;
}

.heat-score {
    text-align: center;
    color: var(--primary-dark);
}

.heat-score strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
}

.heat-score span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.detail-hero {
    padding: 56px 0;
}

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

.detail-poster {
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

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

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

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-stats span {
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
}

.detail-stats strong {
    color: #ffffff;
}

.detail-tags {
    margin-bottom: 24px;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #111111;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(38, 127, 86, 0.25), rgba(0, 0, 0, 0.65));
    cursor: pointer;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 18px 44px rgba(38, 127, 86, 0.36);
    font-size: 1.8rem;
}

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

.player-overlay em {
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    margin-top: 48px;
}

.detail-content article,
.info-panel {
    padding: 24px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.detail-content article + article {
    margin-top: 18px;
}

.info-panel dl,
.info-panel dd {
    margin: 0;
}

.info-panel div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.info-panel dt {
    color: var(--muted);
    font-weight: 800;
}

.info-panel dd {
    overflow-wrap: anywhere;
}

.info-panel a {
    color: var(--primary);
    font-weight: 900;
}

.result-empty {
    display: none;
    padding: 22px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

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

.site-footer {
    margin-top: 60px;
    padding: 46px 0;
    color: rgba(255, 255, 255, 0.78);
    background: #17251f;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 0.8fr;
    gap: 24px;
}

.footer-logo {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 900;
}

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

.site-footer a {
    display: block;
    margin: 7px 0;
    color: rgba(255, 255, 255, 0.76);
}

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

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

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

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

    .ranking-box {
        position: static;
    }
}

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

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

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

    .main-nav a {
        padding: 12px;
        border-radius: 12px;
    }

    .main-nav a:hover {
        background: var(--primary-soft);
    }

    .hero-section {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
        padding: 46px 0 82px;
    }

    .hero-image-wrap {
        width: min(270px, 72vw);
        margin: 0 auto;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-tags,
    .hero-actions {
        justify-content: center;
    }

    .hero-arrow {
        display: none;
    }

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

    .page-hero-inner {
        display: grid;
    }

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

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

    .heat-score {
        grid-column: 1 / -1;
        display: flex;
        align-items: baseline;
        gap: 8px;
        text-align: left;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

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

    .movie-card-body {
        padding: 11px;
    }

    .movie-desc,
    .tag-row {
        display: none;
    }

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

    .detail-content article,
    .info-panel,
    .search-panel {
        padding: 18px;
    }
}
