:root {
    color-scheme: light;
    --bg: #fafaf9;
    --panel: #ffffff;
    --panel-soft: #f5f5f4;
    --text: #1c1917;
    --muted: #78716c;
    --line: #e7e5e4;
    --green: #15803d;
    --green-2: #166534;
    --green-soft: #dcfce7;
    --amber: #d97706;
    --amber-2: #92400e;
    --stone-900: #1c1917;
    --stone-800: #292524;
    --shadow: 0 20px 45px rgba(28, 25, 23, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.92);
    box-shadow: 0 8px 28px rgba(28, 25, 23, 0.06);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--green-2);
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--green-2));
    box-shadow: 0 12px 24px rgba(21, 128, 61, 0.25);
}

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

.desktop-nav a,
.mobile-nav a {
    color: #57534e;
    padding: 10px 16px;
    border-radius: 14px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--green-2);
    background: var(--green-soft);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #57534e;
    background: #f5f5f4;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 6px;
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--stone-900);
}

.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-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 40%, rgba(217, 119, 6, 0.22), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.55) 48%, rgba(0, 0, 0, 0.15));
}

.hero-content {
    position: relative;
    min-height: 72vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 48px;
    padding-top: 40px;
    padding-bottom: 70px;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green), var(--amber));
    border-radius: 999px;
    font-size: 14px;
    font-weight: 760;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5.6vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
}

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

.tag-row span {
    color: var(--green-2);
    background: var(--green-soft);
}

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

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 760;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    min-height: 50px;
    padding: 0 26px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green), var(--green-2));
    box-shadow: 0 18px 32px rgba(21, 128, 61, 0.28);
}

.ghost-button {
    min-height: 50px;
    padding: 0 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-card span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: #ffffff;
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 66px;
    z-index: 6;
    width: min(640px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    transform: translateX(-50%);
}

.hero-search input,
.toolbar input {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: #ffffff;
}

.hero-search input {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
}

.hero-search button {
    border: 0;
    padding: 0 22px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--green);
    cursor: pointer;
    font-weight: 750;
}

.section-block {
    padding: 58px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.15;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-link {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 18px;
    color: var(--green-2);
    background: var(--green-soft);
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.86);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 28px rgba(28, 25, 23, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(21, 128, 61, 0.24);
    box-shadow: 0 24px 48px rgba(28, 25, 23, 0.14);
}

.movie-poster {
    position: relative;
    overflow: hidden;
    display: block;
    background: var(--panel-soft);
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.year-badge,
.rank-badge,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 800;
}

.year-badge {
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    font-size: 12px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--green));
    box-shadow: 0 12px 20px rgba(217, 119, 6, 0.25);
}

.poster-play {
    left: 50%;
    bottom: 14px;
    padding: 9px 15px;
    color: #ffffff;
    background: rgba(21, 128, 61, 0.9);
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, 0);
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card h3 a:hover {
    color: var(--green-2);
}

.movie-meta,
.movie-line {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-line {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px;
    border-radius: var(--radius);
    color: #ffffff;
    background: var(--stone-900);
    box-shadow: var(--shadow);
}

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

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, 0.78));
}

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 24px;
    font-weight: 850;
}

.category-tile small {
    color: rgba(255, 255, 255, 0.82);
}

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

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

.movie-card-compact {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: stretch;
}

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

.movie-card-compact .movie-line {
    min-height: auto;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, var(--stone-900), var(--green-2));
}

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

.slim-hero,
.search-hero,
.ranking-hero,
.category-hero {
    background:
        radial-gradient(circle at 70% 20%, rgba(217, 119, 6, 0.34), transparent 28%),
        linear-gradient(135deg, #1c1917, #14532d);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.8);
}

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

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

.toolbar {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 34px rgba(28, 25, 23, 0.08);
}

.sticky-toolbar {
    position: sticky;
    top: 82px;
    z-index: 20;
}

.toolbar input {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-button {
    border: 0;
    padding: 9px 14px;
    border-radius: 999px;
    color: #57534e;
    background: #f5f5f4;
    cursor: pointer;
    font-weight: 700;
}

.filter-button:hover,
.filter-button.is-active {
    color: #ffffff;
    background: var(--green);
}

.movie-card.is-hidden {
    display: none;
}

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

.detail-overlay {
    background:
        radial-gradient(circle at 75% 30%, rgba(217, 119, 6, 0.2), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6) 54%, rgba(0, 0, 0, 0.2));
}

.detail-header {
    position: relative;
    z-index: 2;
    padding: 62px 0 76px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-cover {
    width: 100%;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-copy {
    color: #ffffff;
}

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 64px);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.38);
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--green), var(--amber));
    font-size: 34px;
    line-height: 1;
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.25);
}

.player-overlay strong {
    font-size: clamp(24px, 4vw, 42px);
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 22px 0 40px;
}

.content-card,
.side-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 34px rgba(28, 25, 23, 0.07);
}

.content-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-card p {
    margin: 0 0 24px;
    color: #44403c;
    font-size: 17px;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.info-list div {
    padding: 14px;
    border-radius: 16px;
    background: var(--panel-soft);
}

.info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.info-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

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

.side-list .movie-card-compact {
    grid-template-columns: 90px minmax(0, 1fr);
}

.side-list .movie-card-body {
    padding: 12px;
}

.side-list .movie-line,
.side-list .tag-row,
.side-list .poster-play {
    display: none;
}

.site-footer {
    margin-top: 30px;
    padding: 48px 0 24px;
    color: #d6d3d1;
    background: linear-gradient(135deg, var(--stone-900), var(--stone-800));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1.15fr;
    gap: 34px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p {
    margin: 0;
    color: #a8a29e;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(214, 211, 209, 0.14);
    color: #a8a29e;
    text-align: center;
    font-size: 14px;
}

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

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

    .hero-card {
        display: none;
    }

    .detail-cover {
        max-width: 320px;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-slider,
    .hero-content {
        min-height: 78vh;
    }

    .hero-content {
        display: flex;
        align-items: center;
        padding-bottom: 120px;
    }

    .hero-search {
        bottom: 54px;
        border-radius: 22px;
    }

    .hero-search input {
        min-width: 0;
    }

    .hero-search button {
        padding: 0 16px;
    }

    .hero-controls {
        bottom: 20px;
    }

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

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

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

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

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

    .movie-card-compact .movie-poster img {
        min-height: 136px;
    }

    .detail-header {
        padding: 38px 0 50px;
    }

    .detail-hero {
        min-height: auto;
    }

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

    .content-card,
    .side-card {
        padding: 20px;
    }
}

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

    .site-logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

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

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

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

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

    .category-tile {
        min-height: 190px;
    }

    .sticky-toolbar {
        top: 74px;
    }
}
