* {
    box-sizing: border-box;
}

:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0f766e;
    --stone: #f8f7f4;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e7e5e4;
    --card: #ffffff;
    --shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
    --soft-shadow: 0 10px 24px rgba(15, 118, 110, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--stone);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    box-shadow: 0 8px 28px rgba(4, 120, 87, 0.25);
}

.nav-shell {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease;
}

.site-logo:hover .logo-mark {
    transform: scale(1.08) rotate(-3deg);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 650;
}

.desktop-nav a,
.mobile-panel a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: #d1fae5;
}

.header-search {
    margin-left: auto;
    position: relative;
    width: min(300px, 28vw);
}

.header-search span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #d1fae5;
}

.header-search input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 10px 18px 10px 42px;
    background: rgba(255, 255, 255, 0.17);
    color: #ffffff;
    outline: none;
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.header-search input::placeholder {
    color: rgba(209, 250, 229, 0.9);
}

.header-search input:focus {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(209, 250, 229, 0.25);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 26px;
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    color: #ffffff;
    font-weight: 650;
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding-top: 16px;
}

.mobile-search input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    outline: none;
}

.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: #ffffff;
    color: var(--emerald-dark);
    font-weight: 700;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000000;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 20%, rgba(16, 185, 129, 0.18), transparent 28%), linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.92)), linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(1280px, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 60px 0 72px;
    color: #ffffff;
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.hero-kicker span {
    border-radius: 999px;
    padding: 6px 13px;
    background: rgba(5, 150, 105, 0.9);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    max-width: 900px;
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.08;
    font-weight: 900;
    text-shadow: 0 12px 32px rgba(0, 0, 0, 0.52);
}

.hero-content h2 a:hover {
    color: #a7f3d0;
}

.hero-intro {
    max-width: 760px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    min-height: 46px;
    padding: 12px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: var(--emerald);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(5, 150, 105, 0.34);
}

.primary-button svg {
    fill: currentColor;
    stroke: currentColor;
}

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

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.text-button {
    color: #d1fae5;
    padding-inline: 6px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading p,
.page-hero p,
.ranking-copy p,
.category-overview-head p,
.watch-head p {
    margin: 0 0 6px;
    color: var(--emerald-dark);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.ranking-copy h2,
.category-overview-head h2,
.watch-head h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.18;
    font-weight: 900;
}

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

.section-heading.with-link > a,
.category-overview-head > a {
    flex: 0 0 auto;
    color: var(--emerald-dark);
    font-weight: 800;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip-row a {
    border-radius: 999px;
    padding: 10px 16px;
    background: #ffffff;
    color: #374151;
    font-weight: 750;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.chip-row a:hover,
.chip-row a.is-active {
    background: var(--emerald);
    color: #ffffff;
    transform: translateY(-2px);
}

.scroll-row {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 6px 0 22px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
}

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.scroll-row .poster-link {
    aspect-ratio: 16 / 9;
}

.poster-link img,
.category-tile img,
.rank-item img,
.detail-card > img,
.watch-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-link img {
    transition: transform 0.5s ease;
}

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 58px;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.poster-mask svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    stroke: currentColor;
}

.movie-card:hover .poster-mask {
    opacity: 1;
    background: rgba(0, 0, 0, 0.32);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: rgba(5, 150, 105, 0.94);
    color: #ffffff;
    font-style: normal;
    font-weight: 900;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 20px;
    line-height: 1.28;
    font-weight: 850;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.card-body h3 a:hover {
    color: var(--emerald-dark);
}

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

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 13px;
}

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

.tag-row span {
    border-radius: 999px;
    padding: 5px 10px;
    background: #d1fae5;
    color: #047857;
    font-size: 12px;
    font-weight: 750;
}

.ranking-band {
    background: linear-gradient(135deg, #ecfdf5, #f5f5f4 60%, #ccfbf1);
}

.ranking-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 36px;
    align-items: start;
}

.ranking-copy span,
.page-hero span,
.category-overview-head span,
.watch-head span {
    display: block;
    max-width: 760px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 17px;
}

.ranking-copy .primary-button {
    margin-top: 24px;
}

.rank-list,
.rank-column > div {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 48px 72px 1fr;
    gap: 14px;
    align-items: center;
    border-radius: 20px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.rank-number {
    color: var(--emerald-dark);
    font-size: 24px;
    font-weight: 950;
    text-align: center;
}

.rank-item img {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.rank-info strong {
    display: block;
    color: #111827;
    font-size: 17px;
    line-height: 1.28;
}

.rank-info small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

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

.category-tile {
    overflow: hidden;
    border-radius: 26px;
    padding: 20px;
    background: linear-gradient(140deg, #ffffff, #ecfdf5);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile span {
    display: block;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    min-height: 48px;
    margin: 8px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.category-tile div {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-tile img {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    min-height: 300px;
    display: grid;
    place-items: end start;
    padding: 70px max(16px, calc((100vw - 1280px) / 2)) 52px;
    background: radial-gradient(circle at 78% 18%, rgba(16, 185, 129, 0.36), transparent 28%), linear-gradient(135deg, #022c22, #064e3b 48%, #0f766e);
    color: #ffffff;
}

.page-hero h1,
.page-hero p,
.page-hero span {
    color: #ffffff;
}

.page-hero span {
    color: rgba(255, 255, 255, 0.82);
}

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

.category-overview-card,
.filter-panel,
.detail-content article,
.detail-card {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.category-overview-card {
    padding: 28px;
}

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

.filter-panel {
    margin-top: 34px;
    padding: 24px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 1.4fr;
    gap: 16px;
    margin-top: 22px;
}

.filter-row label {
    position: relative;
    display: block;
}

.filter-row label span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--emerald-dark);
}

.filter-row input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 13px 16px 13px 44px;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.filter-row input:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.year-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.year-filters button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 750;
    transition: background 0.2s ease, color 0.2s ease;
}

.year-filters button:hover,
.year-filters button.is-active {
    background: var(--emerald);
    color: #ffffff;
}

.empty-state {
    display: none;
    margin: 20px 0 0;
    color: var(--muted);
    font-weight: 700;
}

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

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

.rank-column {
    border-radius: 28px;
    padding: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.rank-column h2 {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 900;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--emerald-dark);
    font-weight: 800;
}

.watch-section {
    padding-top: 30px;
}

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

.watch-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    background: #030712;
    box-shadow: var(--shadow);
}

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

.watch-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: #000000;
    color: #ffffff;
}

.watch-cover img {
    opacity: 0.64;
    filter: saturate(0.92);
}

.watch-cover > span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    margin: auto;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.92);
    color: #ffffff;
    font-size: 46px;
    box-shadow: 0 18px 42px rgba(5, 150, 105, 0.34);
    transition: transform 0.2s ease, background 0.2s ease;
}

.watch-cover > span svg {
    fill: currentColor;
    stroke: currentColor;
}

.watch-cover:hover > span {
    transform: scale(1.08);
    background: var(--emerald-dark);
}

.watch-box.is-playing .watch-cover {
    display: none;
}

.detail-card {
    overflow: hidden;
}

.detail-card > img {
    aspect-ratio: 2 / 3;
}

.detail-card h2 {
    margin: 18px 20px 12px;
    font-size: 26px;
    line-height: 1.22;
    font-weight: 900;
}

.detail-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0 20px 18px;
}

.detail-card dl div {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    color: var(--muted);
}

.detail-card dt {
    color: #111827;
    font-weight: 850;
}

.detail-card dd {
    margin: 0;
}

.detail-card .tag-row {
    padding: 0 20px 22px;
}

.detail-content {
    display: grid;
    gap: 22px;
}

.detail-content article {
    padding: 28px;
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 900;
}

.detail-content p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

.site-footer {
    margin-top: 42px;
    background: #022c22;
    color: rgba(255, 255, 255, 0.76);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 30px;
}

.footer-logo {
    color: #ffffff;
}

.footer-inner p {
    max-width: 520px;
    margin: 12px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 20px;
}

.footer-links a:hover {
    color: #a7f3d0;
}

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

    .watch-layout,
    .ranking-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-card {
        max-width: 520px;
    }
}

@media (max-width: 860px) {
    .nav-shell {
        height: 66px;
        gap: 16px;
    }

    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 64px;
    }

    .section-shell {
        padding: 38px 0;
    }

    .section-heading.with-link,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-row,
    .rank-columns {
        grid-template-columns: 1fr;
    }

    .year-filters {
        justify-content: flex-start;
    }

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

    .rank-item {
        grid-template-columns: 38px 60px 1fr;
    }

    .card-body {
        padding: 14px;
    }

    .card-body h3 {
        font-size: 17px;
    }

    .watch-box {
        border-radius: 20px;
    }
}

@media (max-width: 560px) {
    .site-logo {
        font-size: 19px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .hero-slider {
        height: 520px;
    }

    .hero-kicker {
        gap: 8px;
    }

    .hero-kicker span {
        font-size: 12px;
        padding: 5px 10px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        max-width: 260px;
    }

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

    .movie-grid,
    .catalog-grid,
    .wide-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .scroll-row .movie-card {
        flex-basis: 280px;
    }

    .page-hero {
        min-height: 250px;
    }

    .watch-cover > span {
        width: 68px;
        height: 68px;
        font-size: 38px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
