:root {
    --page: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --line: rgba(15, 23, 42, 0.08);
    --brand: #059669;
    --brand-dark: #047857;
    --brand-soft: rgba(5, 150, 105, 0.12);
    --accent: #f59e0b;
    --white: #ffffff;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    --radius: 24px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #ecfdf5 0, #f8fafc 340px, #ffffff 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(4, 120, 87, 0.92);
    color: #ffffff;
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(4, 120, 87, 0.18);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #064e3b;
    background: linear-gradient(135deg, #d9f99d, #6ee7b7);
    box-shadow: inset 0 -8px 18px rgba(5, 150, 105, 0.2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a,
.mobile-panel a,
.footer-links a {
    border-radius: 999px;
    transition: 0.2s ease;
}

.nav-links a {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.86);
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-panel a {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-panel.open {
    display: grid;
}

main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #064e3b;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    filter: saturate(1.08) contrast(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 34%, rgba(16, 185, 129, 0.35), transparent 34%),
        linear-gradient(90deg, rgba(2, 44, 34, 0.92) 0%, rgba(2, 44, 34, 0.72) 44%, rgba(2, 44, 34, 0.22) 100%),
        linear-gradient(180deg, rgba(2, 44, 34, 0.15), rgba(2, 44, 34, 0.78));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    padding: 112px 0 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.hero-eyebrow,
.section-head span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #047857;
    background: rgba(5, 150, 105, 0.12);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-content .hero-eyebrow {
    color: #bbf7d0;
    border-color: rgba(187, 247, 208, 0.32);
    background: rgba(6, 78, 59, 0.65);
}

.hero-content h1 {
    max-width: 780px;
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
    text-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.hero-content p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.chip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 26px;
}

.hero-tags span,
.chip-link {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 13px;
    font-weight: 700;
    font-size: 13px;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.detail-tags span {
    color: #064e3b;
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.18);
}

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

.hero-actions.centered {
    justify-content: center;
}

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

.primary-button {
    min-height: 50px;
    padding: 0 24px;
    color: #064e3b;
    background: linear-gradient(135deg, #d9f99d, #6ee7b7);
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.32);
}

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

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

.ghost-button.dark {
    color: var(--ink);
    border-color: var(--line);
    background: #ffffff;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 90px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-controls button {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.62;
}

.hero-dots button.active {
    width: 32px;
    opacity: 1;
    background: #bbf7d0;
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 0;
    width: min(1180px, calc(100% - 32px));
    transform: translate(-50%, 50%);
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    align-items: center;
    padding: 22px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search label {
    color: var(--ink);
    font-weight: 900;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: 54px;
    padding: 0 16px 0 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.search-box span {
    color: var(--brand);
    font-size: 24px;
    font-weight: 900;
}

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

.section-wrap.tight {
    padding-top: 26px;
}

.section-head {
    max-width: 760px;
    margin-bottom: 28px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.story-card h2 {
    margin: 12px 0 12px;
    color: var(--ink);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-head h2 {
    font-size: clamp(30px, 4vw, 46px);
}

.section-head p,
.page-hero p,
.card-text,
.category-panel p,
.story-card p,
.detail-line {
    color: var(--muted);
    line-height: 1.8;
}

.section-head.with-link > a,
.text-link {
    color: var(--brand-dark);
    font-weight: 900;
}

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

.category-tile {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 45%),
        #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-panel:hover,
.rank-item:hover,
.story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span {
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 950;
}

.category-tile strong {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

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

.movie-card,
.category-panel,
.rank-item,
.story-card {
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.07);
    transition: 0.2s ease;
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
}

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

.poster-link img,
.category-visual img,
.rank-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.category-panel:hover .category-visual img,
.rank-item:hover .rank-cover img,
.detail-poster:hover img {
    transform: scale(1.06);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(2, 44, 34, 0.75));
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #064e3b;
    background: linear-gradient(135deg, #fde68a, #6ee7b7);
    font-weight: 950;
}

.card-body {
    padding: 18px;
}

.card-category {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 900;
}

.movie-card h3,
.rank-content h3,
.category-panel h2 {
    margin: 0;
    color: var(--ink);
    font-weight: 900;
    line-height: 1.35;
}

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

.card-meta {
    margin: 8px 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
}

.card-text {
    margin: 0;
    font-size: 14px;
}

.page-hero,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 42px auto 0;
    border: 1px solid rgba(5, 150, 105, 0.16);
    border-radius: 34px;
    background:
        radial-gradient(circle at 90% 20%, rgba(16, 185, 129, 0.22), transparent 36%),
        linear-gradient(135deg, #ffffff, #ecfdf5);
    box-shadow: var(--shadow);
}

.page-hero {
    min-height: 280px;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 28px;
    align-items: center;
    padding: 42px;
}

.page-hero.slim {
    min-height: 230px;
}

.page-hero.center {
    display: flex;
    justify-content: center;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(38px, 5vw, 64px);
}

.page-search {
    width: 100%;
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--brand-dark);
}

.chip-link {
    color: #064e3b;
    background: var(--brand-soft);
    border: 1px solid rgba(5, 150, 105, 0.16);
}

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

.category-panel {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    align-items: center;
    border-radius: 26px;
    padding: 18px;
}

.category-visual {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 20px;
    background: #d1fae5;
}

.category-visual span {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: #064e3b;
    background: #d9f99d;
    border-radius: 14px;
    font-weight: 950;
}

.category-panel h2 {
    font-size: 26px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 92px 1fr auto;
    gap: 18px;
    align-items: center;
    border-radius: 22px;
    padding: 14px;
}

.rank-number {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #064e3b;
    background: linear-gradient(135deg, #d9f99d, #a7f3d0);
    font-weight: 950;
    font-size: 18px;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #d1fae5;
}

.rank-content p,
.rank-content span {
    display: block;
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.rank-content p {
    font-size: 13px;
    font-weight: 800;
    color: #94a3b8;
}

.small-button {
    min-height: 40px;
    padding: 0 16px;
    color: #ffffff;
    background: var(--brand);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 36px;
    padding: 32px;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 28px;
    background: #d1fae5;
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.16);
}

.detail-info {
    align-self: center;
}

.detail-info h1 {
    font-size: clamp(38px, 5vw, 68px);
}

.detail-line {
    max-width: 820px;
    margin: 0 0 22px;
    font-size: 18px;
}

.movie-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
}

.movie-facts div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.movie-facts dt {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
}

.movie-facts dd {
    margin: 6px 0 0;
    color: var(--ink);
    font-weight: 900;
}

.player-section {
    scroll-margin-top: 92px;
}

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

.movie-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle, rgba(16, 185, 129, 0.32), transparent 35%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #064e3b;
    background: linear-gradient(135deg, #d9f99d, #6ee7b7);
    font-size: 32px;
    text-indent: 4px;
    box-shadow: 0 24px 52px rgba(16, 185, 129, 0.34);
}

.player-overlay strong {
    font-size: 20px;
}

.content-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
}

.story-card {
    padding: 30px;
    border-radius: 28px;
}

.story-card.accent {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 40%),
        #ffffff;
}

.story-card h2 {
    font-size: 30px;
}

.story-card p {
    margin: 0;
    white-space: pre-line;
}

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

.empty-state {
    margin: 26px 0 0;
    padding: 24px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(5, 150, 105, 0.24);
    border-radius: 20px;
    background: rgba(5, 150, 105, 0.05);
}

.site-footer {
    margin-top: 92px;
    color: #d1fae5;
    background: #064e3b;
}

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

.footer-logo {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    margin: 12px 0 0;
    color: rgba(209, 250, 229, 0.78);
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 9px 13px;
    background: rgba(255, 255, 255, 0.1);
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 45;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #064e3b;
    background: linear-gradient(135deg, #d9f99d, #6ee7b7);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

[hidden] {
    display: none !important;
}

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

    .rank-list.compact,
    .content-section,
    .category-panels {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        padding-top: 96px;
        padding-bottom: 210px;
    }

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

    .hero-search {
        transform: translate(-50%, 42%);
    }

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

    .section-head.with-link,
    .rank-item {
        align-items: stretch;
    }

    .section-head.with-link,
    .rank-item {
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 52px 74px 1fr;
    }

    .rank-item .small-button {
        grid-column: 1 / -1;
    }

    .movie-facts {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .site-nav,
    .mobile-panel,
    .section-wrap,
    .page-hero,
    .detail-hero,
    .breadcrumb,
    .hero-controls,
    .hero-content,
    .hero-search,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .hero-content h1 {
        font-size: 44px;
    }

    .hero-search,
    .page-hero,
    .detail-hero {
        padding: 22px;
        border-radius: 24px;
    }

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

    .category-panel {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 46px 64px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

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