* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #059669;
    --brand-dark: #047857;
    --brand-soft: #d1fae5;
    --teal: #0f766e;
    --cyan: #0891b2;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #064e3b;
    background: linear-gradient(135deg, #a7f3d0, #22d3ee);
    box-shadow: 0 10px 25px rgba(45, 212, 191, 0.35);
}

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

.main-nav a {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.22);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 4px;
}

.hero-carousel {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    background: linear-gradient(135deg, #059669, #0f766e 55%, #0891b2);
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: overlay;
    opacity: 0.82;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 25%, rgba(16, 185, 129, 0.46), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.84), rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.22));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 540px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    color: #ffffff;
    max-width: 720px;
    margin-left: max(16px, calc((100vw - 1180px) / 2));
}

.hero-pill,
.page-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 20px 0 14px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

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

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

.hero-tags span {
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.18);
}

.tag-row span,
.detail-meta span {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-light {
    color: var(--brand-dark);
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.22);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.34);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

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

.soft-bg {
    background: #ffffff;
}

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

.section-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -0.03em;
}

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

.section-heading a {
    flex: 0 0 auto;
    color: var(--brand-dark);
    font-weight: 800;
}

.filter-panel {
    display: flex;
    align-items: end;
    gap: 14px;
    padding: 18px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--soft-shadow);
}

.filter-panel label {
    flex: 1 1 auto;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    color: var(--ink);
    background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

.card-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    height: 230px;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #0f766e);
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 38px;
    opacity: 0;
    background: rgba(2, 6, 23, 0.22);
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
}

.card-body h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

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

.card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    border-radius: var(--radius);
    color: #ffffff;
    background: #064e3b;
    box-shadow: var(--soft-shadow);
}

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

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

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.08));
}

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

.category-tile strong,
.category-tile em {
    display: block;
}

.category-tile strong {
    margin-bottom: 6px;
    font-size: 20px;
}

.category-tile em {
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    font-size: 13px;
}

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

.rank-panel,
.detail-side,
.detail-article,
.player-card,
.category-overview-card {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(226, 232, 240, 0.82);
}

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

.rank-panel h2,
.detail-side h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 64px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.rank-number {
    color: var(--brand-dark);
    font-weight: 900;
    font-size: 18px;
}

.rank-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-text em {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #059669, #0f766e 50%, #0891b2);
    padding: 86px 0;
}

.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

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

.page-actions {
    margin-top: 24px;
}

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

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

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

.category-overview-head strong,
.category-overview-head em {
    display: block;
}

.category-overview-head strong {
    font-size: 24px;
}

.category-overview-head em {
    color: var(--muted);
    font-style: normal;
}

.category-overview-head b {
    color: var(--brand-dark);
}

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

.compact-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: #ecfdf5;
    transform: translateY(-2px);
}

.compact-card img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
}

.compact-card strong,
.compact-card em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-card em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.rank-wide {
    max-width: 980px;
}

.rank-list-large .rank-item {
    grid-template-columns: 54px 86px minmax(0, 1fr);
    padding: 14px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.84);
    box-shadow: var(--soft-shadow);
}

.rank-list-large .rank-item img {
    width: 86px;
    height: 86px;
}

.search-grid .movie-card.is-hidden,
.movie-card.is-hidden,
.rank-item.is-hidden,
.compact-card.is-hidden {
    display: none;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    filter: blur(3px);
    transform: scale(1.04);
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.38));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 36px 0 58px;
}

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

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

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.detail-meta {
    margin-bottom: 14px;
}

.player-block {
    padding: 38px 0 0;
    background: #020617;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.76));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #064e3b;
    background: #ffffff;
    font-size: 32px;
    box-shadow: 0 20px 55px rgba(255, 255, 255, 0.25);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.detail-article {
    padding: 30px;
}

.detail-article h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.detail-article h2:not(:first-child) {
    margin-top: 28px;
}

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

.detail-side {
    padding: 22px;
    position: sticky;
    top: 96px;
}

.side-grid {
    grid-template-columns: 1fr;
}

.site-footer {
    color: #cbd5e1;
    background: #020617;
}

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

.footer-brand p {
    max-width: 520px;
    margin: 16px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 16px;
}

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

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.empty-note {
    display: none;
    padding: 22px;
    text-align: center;
    color: var(--muted);
    border-radius: 16px;
    background: #ffffff;
}

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }

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

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

    .main-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        border-radius: 12px;
    }

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

    .hero-content {
        width: min(100% - 32px, 100%);
        margin-left: 16px;
        padding-right: 16px;
    }

    .hero-control {
        display: none;
    }

    .section-heading,
    .filter-panel,
    .category-overview-head {
        align-items: stretch;
        flex-direction: column;
    }

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

    .poster-link {
        height: 260px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 260px;
    }

    .footer-shell {
        grid-template-columns: 1fr;
    }

    .rank-item,
    .rank-list-large .rank-item {
        grid-template-columns: 44px 72px minmax(0, 1fr);
    }

    .rank-list-large .rank-item img {
        width: 72px;
        height: 72px;
    }
}
