:root {
    --primary: #4a7c54;
    --primary-dark: #233d26;
    --primary-soft: #f4f7f5;
    --accent: #e88f1a;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --bg: #f9fafb;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
    font: inherit;
}

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(74, 124, 84, 0.24);
}

.desktop-nav,
.mobile-nav,
.quick-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-nav a,
.mobile-nav a,
.quick-links a {
    padding: 10px 15px;
    color: #374151;
    font-weight: 700;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.quick-links a:hover {
    color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
}

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

.hero-slider {
    position: relative;
    height: min(720px, 72vh);
    min-height: 520px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

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

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

.hero-slide > img,
.detail-hero > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48) 45%, rgba(0, 0, 0, 0.12)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.05) 50%);
}

.hero-content,
.detail-hero-content,
.page-hero > div {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    max-width: 760px;
    margin-left: max(16px, calc((100vw - 1180px) / 2));
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 16px;
    padding: 8px 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    background: rgba(74, 124, 84, 0.92);
    border-radius: 999px;
}

.hero-content h1,
.detail-hero h1,
.page-hero h1 {
    max-width: 920px;
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p,
.detail-hero p,
.page-hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

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

.hero-tags span,
.movie-tags span {
    display: inline-flex;
    padding: 6px 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.movie-tags span {
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-color: rgba(74, 124, 84, 0.12);
}

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

.btn,
.quick-search button,
.search-form button,
.category-overview-heading a,
.section-heading > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    font-weight: 900;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.quick-search button,
.search-form button,
.category-overview-heading a,
.section-heading > a {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 14px 30px rgba(74, 124, 84, 0.25);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn:hover,
.quick-search button:hover,
.search-form button:hover,
.category-overview-heading a:hover,
.section-heading > a:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #fff;
    font-size: 40px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

.home-search-panel,
.section-wrap,
.detail-layout,
.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-panel {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-top: -38px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 24px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 8;
}

.quick-search,
.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-search label {
    font-weight: 900;
    color: var(--primary-dark);
    white-space: nowrap;
}

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

.quick-search input:focus,
.search-form input:focus,
.inline-filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 124, 84, 0.12);
}

.section-wrap {
    padding: 76px 0 0;
}

.section-soft {
    margin-top: 70px;
    padding: 56px;
    background: linear-gradient(135deg, #ffffff, var(--primary-soft));
    border: 1px solid rgba(74, 124, 84, 0.1);
    border-radius: 32px;
}

.section-heading,
.category-overview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-heading.compact {
    justify-content: flex-start;
}

.section-heading > span {
    flex: 0 0 auto;
    width: 6px;
    height: 42px;
    background: var(--primary);
    border-radius: 999px;
}

.section-heading h2,
.category-overview-heading h2,
.rank-panel h2,
.info-card h2,
.content-card h2 {
    margin: 0 0 6px;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.category-overview-heading p {
    margin: 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--paper);
    border: 1px solid rgba(229, 231, 235, 0.85);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(74, 124, 84, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.movie-poster {
    position: relative;
    aspect-ratio: 4 / 5.4;
    margin: 0;
    overflow: hidden;
    background: #111827;
}

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

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

.movie-poster figcaption {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.62);
    border-radius: 999px;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: var(--ink);
    font-size: 19px;
    line-height: 1.35;
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-tile,
.category-overview-block,
.rank-panel,
.content-card,
.info-card,
.filter-panel {
    padding: 24px;
    background: var(--paper);
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-size: 22px;
}

.category-tile p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.category-tile div,
.related-card small,
.rank-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #6b7280;
    font-size: 13px;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 96px;
}

.rank-row {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.rank-row img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-title {
    align-self: end;
    color: var(--ink);
    font-weight: 800;
}

.rank-meta {
    grid-column: 2;
    margin-top: -24px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 20% 10%, rgba(232, 143, 26, 0.35), transparent 30%), linear-gradient(135deg, #111827, #233d26);
}

.page-hero {
    min-height: 380px;
    display: flex;
    align-items: center;
    padding: 86px 0;
}

.small-hero {
    min-height: 320px;
}

.category-overview-list {
    display: grid;
    gap: 34px;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 26px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-row strong,
.inline-filter span {
    color: var(--primary-dark);
    font-weight: 900;
}

.filter-row button {
    padding: 8px 14px;
    color: #374151;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
}

.filter-row button.is-active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.inline-filter {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
}

.category-movie-grid .is-hidden,
.player-button.is-hidden {
    display: none;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 58px 82px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.ranking-number {
    color: var(--accent);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.ranking-item img {
    width: 82px;
    height: 110px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-info {
    display: grid;
    gap: 8px;
}

.ranking-info strong {
    font-size: 20px;
}

.ranking-info small {
    color: var(--primary);
    font-weight: 800;
}

.ranking-info em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.7;
}

.search-form {
    max-width: 720px;
}

.search-form input {
    min-height: 54px;
    padding-left: 22px;
    font-size: 17px;
}

.search-form button {
    min-height: 54px;
    padding: 0 28px;
    border: 0;
    cursor: pointer;
}

.detail-hero {
    height: min(620px, 62vh);
    min-height: 460px;
}

.detail-hero-content {
    position: absolute;
    left: 50%;
    bottom: 54px;
    transform: translateX(-50%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

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

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

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
}

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

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

.player-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.38);
    border: 0;
    cursor: pointer;
}

.player-button span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    padding-left: 6px;
    font-size: 44px;
    background: rgba(74, 124, 84, 0.92);
    border-radius: 999px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.content-card p,
.info-card dd {
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

.info-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

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

.info-card dd {
    margin: 0;
}

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

.related-card {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    align-items: center;
}

.related-card img {
    width: 68px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
}

.related-card span {
    color: var(--ink);
    font-weight: 900;
}

.related-card small {
    grid-column: 2;
    margin-top: -20px;
}

.site-footer {
    margin-top: 80px;
    padding: 54px 0;
    color: #d1d5db;
    background: #111827;
}

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

.footer-brand {
    color: #fff;
}

.site-footer p {
    max-width: 520px;
    color: #9ca3af;
    line-height: 1.8;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

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

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

    .home-search-panel,
    .split-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .site-header-inner {
        height: 64px;
    }

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

    .hero-content h1,
    .detail-hero h1,
    .page-hero h1 {
        font-size: clamp(36px, 12vw, 52px);
    }

    .hero-control {
        display: none;
    }

    .home-search-panel,
    .quick-search,
    .quick-links,
    .section-heading,
    .category-overview-heading,
    .inline-filter {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .home-search-panel {
        margin-top: 0;
        border-radius: 0;
        width: 100%;
    }

    .section-wrap {
        padding-top: 54px;
    }

    .section-soft {
        width: 100%;
        padding: 32px 16px;
        border-radius: 0;
    }

    .movie-grid,
    .category-grid,
    .compact-grid,
    .mini-grid,
    .wide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

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

    .movie-card p,
    .movie-tags {
        display: none;
    }

    .page-hero {
        min-height: 360px;
        padding: 58px 0;
    }

    .ranking-item {
        grid-template-columns: 42px 72px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .ranking-info em {
        display: none;
    }

    .detail-hero {
        height: 560px;
    }

    .detail-hero-content {
        bottom: 34px;
    }

    .detail-layout {
        padding-top: 30px;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .category-grid,
    .compact-grid,
    .mini-grid,
    .wide-grid {
        grid-template-columns: 1fr;
    }

    .brand {
        font-size: 19px;
    }

    .player-button span {
        width: 72px;
        height: 72px;
        font-size: 34px;
    }
}
