:root {
    --bg: #f7faf9;
    --surface: #ffffff;
    --surface-soft: #eefdf8;
    --text: #111827;
    --muted: #607065;
    --line: #dbe7e2;
    --primary: #10b981;
    --primary-dark: #059669;
    --accent: #06b6d4;
    --danger: #ef4444;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(219, 231, 226, 0.9);
    backdrop-filter: blur(18px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 24px rgba(16, 185, 129, 0.25);
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link,
.mobile-nav-link {
    color: #32443b;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--primary-dark);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-search input {
    width: 230px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    padding: 10px 15px;
    color: var(--text);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.header-search button,
.mobile-search button,
.filter-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #effaf6;
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--primary-dark);
}

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

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

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #06110d;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) brightness(0.72);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 35%, rgba(16, 185, 129, 0.34), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.25));
}

.hero-content {
    position: relative;
    width: min(1220px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 54px;
    color: #ffffff;
}

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

.hero-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(18px, 2.4vw, 24px);
}

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

.hero-tags span,
.card-tags span,
.detail-tags span {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.card-tags span,
.detail-tags span {
    background: #edf7f3;
    color: #25634f;
}

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

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 16px 30px rgba(16, 185, 129, 0.3);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover,
.ranking-card:hover {
    transform: translateY(-3px);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.11);
}

.primary-button.small {
    padding: 10px 16px;
}

.primary-button.full {
    width: 100%;
}

.hero-poster {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-arrow-left {
    left: 20px;
}

.hero-arrow-right {
    right: 20px;
}

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

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

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

.stats-strip {
    width: min(1120px, calc(100% - 32px));
    margin: -46px auto 34px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stats-strip a {
    display: grid;
    gap: 4px;
    border: 1px solid rgba(219, 231, 226, 0.9);
    border-radius: 20px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(18px);
}

.stats-strip strong {
    font-size: 20px;
}

.stats-strip span {
    color: var(--muted);
}

.section-block {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
}

.section-block.soft-bg {
    width: 100%;
    max-width: none;
    padding: 68px max(16px, calc((100% - 1220px) / 2));
    background: linear-gradient(180deg, #ffffff, #effdf8);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

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

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

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

.category-card {
    position: relative;
    min-height: 210px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0b1913;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: transform 0.4s ease;
}

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

.category-card div {
    position: relative;
    padding: 18px;
    color: #ffffff;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.category-card span {
    font-size: 20px;
    font-weight: 950;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(219, 231, 226, 0.9);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.poster-frame {
    position: relative;
    overflow: hidden;
    background: #d8e7e1;
}

.poster-frame img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.9);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    min-height: 48px;
    margin: 8px 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.45;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    min-height: 62px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 54px 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.rank-row strong {
    color: var(--primary-dark);
    font-size: 20px;
}

.rank-row img {
    width: 54px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-row span {
    font-weight: 900;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
}

.page-hero {
    min-height: 280px;
    display: grid;
    place-items: center;
    padding: 70px 16px;
    color: #ffffff;
    text-align: center;
    background:
        radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.2), transparent 26%),
        linear-gradient(135deg, var(--primary-dark), var(--accent));
}

.page-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(36px, 7vw, 64px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 16px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-search {
    flex: 1;
}

.filter-search input {
    width: 100%;
}

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

.filter-buttons button {
    background: #edf7f3;
    color: #25634f;
}

.filter-buttons button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.empty-state {
    display: none;
    margin-top: 26px;
    border: 1px dashed var(--line);
    border-radius: 22px;
    padding: 34px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 18px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.category-overview-media img {
    aspect-ratio: 16 / 10;
    border-radius: 22px;
    object-fit: cover;
}

.category-overview-content h2 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 950;
}

.category-overview-content p {
    margin: 0 0 16px;
    color: var(--muted);
}

.compact-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 7px;
    background: #f8fbfa;
}

.compact-card img {
    width: 42px;
    height: 56px;
    border-radius: 9px;
    object-fit: cover;
}

.compact-card span {
    font-size: 13px;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.ranking-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-card a {
    display: grid;
    grid-template-columns: 72px 92px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

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

.ranking-card img {
    width: 92px;
    height: 128px;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 950;
}

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

.ranking-card span {
    color: #25634f;
    font-weight: 800;
}

.player-shell {
    padding: 26px max(16px, calc((100% - 1220px) / 2)) 42px;
    background: #07110d;
}

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

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

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    aspect-ratio: 16 / 9;
}

.player-frame video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    overflow: hidden;
    background: #000000;
    cursor: pointer;
}

.player-cover img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(16, 185, 129, 0.2), transparent 32%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.78));
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.play-trigger {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 22px 46px rgba(16, 185, 129, 0.32);
}

.movie-detail-layout {
    width: min(1220px, calc(100% - 32px));
    margin: 42px auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    align-items: start;
}

.detail-poster {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 16px;
}

.detail-poster img {
    border-radius: 26px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-content {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.detail-content h1 {
    margin: 12px 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 0 0 26px;
    color: #30483d;
    font-size: 20px;
    font-weight: 700;
}

.detail-content section {
    margin-top: 24px;
}

.detail-content h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 950;
}

.detail-content p {
    margin: 0;
    color: #42554c;
    white-space: pre-line;
}

.related-section {
    padding-top: 18px;
}

.site-footer {
    margin-top: 50px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

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

.footer-brand p {
    max-width: 560px;
    margin: 16px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    align-content: start;
    color: #25634f;
    font-weight: 800;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px 16px;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 110px 0 88px;
    }

    .hero-poster {
        display: none;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        height: 66px;
    }

    .logo-text {
        font-size: 20px;
    }

    .mobile-search {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .mobile-search input {
        width: 100%;
    }

    .hero-carousel,
    .hero-content {
        min-height: 620px;
    }

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

    .hero-arrow {
        display: none;
    }

    .stats-strip {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .section-heading,
    .filter-panel,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

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

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

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

    .detail-poster {
        position: static;
    }

    .ranking-card a {
        grid-template-columns: 50px 74px 1fr;
        gap: 12px;
    }

    .ranking-card img {
        width: 74px;
        height: 104px;
    }
}

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

    .movie-card a {
        display: grid;
        grid-template-columns: 116px 1fr;
    }

    .movie-card .poster-frame img {
        height: 100%;
    }

    .movie-card h3 {
        min-height: auto;
    }

    .movie-card p {
        min-height: auto;
        -webkit-line-clamp: 2;
    }
}
