:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #020617;
    --dark-2: #0f172a;
    --teal: #14b8a6;
    --teal-2: #2dd4bf;
    --gold: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

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", sans-serif;
}

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

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

.site-nav {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #fff;
    background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
}

.nav-inner {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #042f2e;
    background: linear-gradient(135deg, var(--teal-2), var(--teal));
    box-shadow: 0 0 30px rgba(20, 184, 166, 0.35);
    font-size: 18px;
    font-weight: 900;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: -0.02em;
}

.brand-text small {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 12px;
}

.nav-links {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 15px;
}

.nav-links a {
    color: #e2e8f0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: var(--teal-2);
    transform: translateY(-1px);
}

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

.nav-search input,
.home-search-strip input,
.filter-search input,
.filter-search select {
    border: 1px solid rgba(148, 163, 184, 0.25);
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input {
    width: 220px;
    padding: 10px 14px;
    color: #fff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.nav-search input:focus,
.home-search-strip input:focus,
.filter-search input:focus,
.filter-search select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.nav-search button,
.home-search-strip button,
.primary-button,
.ghost-button,
.section-link {
    border: 0;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.home-search-strip button,
.primary-button {
    color: #032f2c;
    background: linear-gradient(135deg, var(--teal-2), var(--teal));
    box-shadow: 0 12px 25px rgba(20, 184, 166, 0.25);
}

.nav-search button {
    padding: 10px 16px;
    border-radius: 999px;
}

.nav-search button:hover,
.home-search-strip button:hover,
.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: #000;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 6s ease;
}

.hero-slide.active > img {
    transform: scale(1);
}

.hero-shade,
.detail-backdrop::after {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(45, 212, 191, 0.28), transparent 34%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.64) 45%, rgba(2, 6, 23, 0.98)),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.25));
}

.hero-content {
    position: absolute;
    left: max(28px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 72px;
    z-index: 2;
    max-width: 760px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal-2);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 18px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-copy .lead-text {
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    padding: 7px 10px;
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 999px;
    color: #0f766e;
    background: rgba(20, 184, 166, 0.1);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ccfbf1;
    border-color: rgba(204, 251, 241, 0.28);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px);
}

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

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
}

.ghost-button,
.section-link {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
}

.section-link {
    color: #0f172a;
    border-color: var(--line);
    background: #fff;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(8px);
    cursor: pointer;
    font-size: 36px;
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

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

.hero-dot.active {
    width: 32px;
    background: var(--teal-2);
}

.home-search-strip {
    max-width: 1180px;
    margin: -42px auto 28px;
    position: relative;
    z-index: 10;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr minmax(260px, 520px);
    gap: 18px;
    align-items: center;
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.home-search-strip h2 {
    margin: 4px 0 0;
    font-size: clamp(22px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.home-search-strip form {
    display: flex;
    gap: 10px;
}

.home-search-strip input {
    flex: 1;
    padding: 14px 16px;
    border-radius: 999px;
    background: #fff;
}

.home-search-strip button {
    padding: 0 22px;
    border-radius: 999px;
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

.dark-band {
    max-width: none;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(20, 184, 166, 0.2), transparent 30%),
        linear-gradient(180deg, #0f172a, #020617);
}

.dark-band > .section-heading,
.dark-band > .ranking-strip {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.dark-band .section-heading p {
    color: #cbd5e1;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.05em;
}

.section-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(20, 184, 166, 0.45);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 25% 18%, rgba(45, 212, 191, 0.42), transparent 36%),
        linear-gradient(135deg, #0f172a, #1e293b 52%, #0f766e);
}

.poster-frame img,
.category-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.25s ease;
}

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

.poster-frame::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.84));
    opacity: 0.78;
}

.play-pulse {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #062a28;
    background: var(--teal-2);
    box-shadow: 0 0 0 8px rgba(45, 212, 191, 0.16);
    font-size: 14px;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    min-width: 34px;
    padding: 7px 9px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-weight: 900;
    text-align: center;
}

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

.card-meta,
.movie-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.card-meta a {
    color: #0f766e;
    font-weight: 800;
}

.card-meta span {
    color: var(--gold);
    font-weight: 900;
}

.movie-card h2 {
    min-height: 48px;
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.movie-card h2 a:hover {
    color: #0f766e;
}

.movie-desc {
    min-height: 64px;
    margin: 12px 0 14px;
    color: #475569;
    line-height: 1.65;
    font-size: 14px;
}

.tag-row span {
    color: #0f766e;
}

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

.category-card,
.category-overview-card,
.story-card,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.category-card {
    min-height: 240px;
    padding: 22px;
    background:
        radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.22), transparent 30%),
        #fff;
}

.category-card span {
    color: #0f766e;
    font-weight: 900;
}

.category-card h2 {
    margin: 12px 0 18px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.6;
}

.category-mini-links {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.category-mini-links a:hover {
    color: #0f766e;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 18% 26%, rgba(20, 184, 166, 0.26), transparent 34%),
        linear-gradient(135deg, #0f172a, #020617);
}

.page-hero {
    min-height: 340px;
    display: grid;
    align-items: center;
    padding: 72px max(24px, calc((100vw - 1280px) / 2 + 24px));
}

.compact-hero h1,
.category-hero h1,
.ranking-hero h1,
.search-hero h1 {
    max-width: 850px;
    font-size: clamp(42px, 6vw, 74px);
}

.page-hero p {
    max-width: 760px;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 22px;
}

.filter-search {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
}

.filter-search input,
.filter-search select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    background: #fff;
}

.filter-chips {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--muted);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
}

.filter-chip.active,
.filter-chip:hover {
    color: #042f2e;
    border-color: transparent;
    background: linear-gradient(135deg, var(--teal-2), var(--teal));
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 20px;
    padding: 18px;
}

.category-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f172a, #134e4a);
}

.category-overview-card h2 {
    margin: 8px 0 12px;
    font-size: 26px;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.category-overview-card ul {
    padding-left: 18px;
    color: #334155;
    line-height: 1.9;
}

.category-overview-card a:hover {
    color: #0f766e;
}

.detail-hero {
    min-height: 680px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.12);
    transform: scale(1.08);
    opacity: 0.72;
}

.detail-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px 72px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--teal-2);
}

.detail-layout {
    margin-top: 36px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    background: linear-gradient(135deg, #0f172a, #134e4a);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
    max-width: 860px;
}

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

.movie-facts div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.54);
    backdrop-filter: blur(10px);
}

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

.movie-facts dd {
    margin: 6px 0 0;
    color: #fff;
    font-weight: 800;
}

.detail-tags span {
    color: #ccfbf1;
    border-color: rgba(204, 251, 241, 0.25);
    background: rgba(15, 23, 42, 0.45);
}

.player-section {
    max-width: 1180px;
    margin: -92px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background: #000;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.32);
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

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

.player-overlay span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #052e2b;
    background: var(--teal-2);
    box-shadow: 0 0 0 16px rgba(45, 212, 191, 0.16);
    font-size: 28px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 8px 0 16px;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.story-card p {
    color: #334155;
    line-height: 1.95;
    font-size: 16px;
}

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

.site-footer {
    margin-top: 64px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 42px;
}

.footer-brand p {
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.8;
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

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

.site-footer a:hover {
    color: var(--teal-2);
}

.footer-bottom {
    padding: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: #64748b;
    text-align: center;
}

.hide-card {
    display: none !important;
}

.poster-frame.no-image img,
.detail-poster.no-image img,
.category-poster.no-image img,
.detail-backdrop.no-image img {
    opacity: 0;
}

@media (max-width: 1180px) {
    .featured-grid,
    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

@media (max-width: 880px) {
    .nav-inner {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        padding: 12px 18px;
    }

    .mobile-menu-button {
        display: block;
    }

    .nav-links,
    .nav-search {
        display: none;
        width: 100%;
    }

    .site-nav.open .nav-links,
    .site-nav.open .nav-search {
        display: flex;
    }

    .site-nav.open .nav-links {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
        border-top: 1px solid rgba(148, 163, 184, 0.18);
    }

    .site-nav.open .nav-search input {
        width: 100%;
    }

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

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 86px;
    }

    .hero-arrow {
        display: none;
    }

    .home-search-strip,
    .filter-search,
    .detail-layout,
    .detail-content,
    .footer-inner,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

    .detail-layout {
        align-items: start;
    }

    .detail-poster {
        width: min(320px, 100%);
    }

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

@media (max-width: 560px) {
    .brand-text strong {
        font-size: 18px;
    }

    .brand-text small {
        display: none;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-content p,
    .page-hero p,
    .detail-copy .lead-text {
        font-size: 15px;
    }

    .content-section,
    .page-hero,
    .detail-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-grid,
    .featured-grid,
    .related-grid,
    .ranking-strip,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .home-search-strip form,
    .hero-actions {
        flex-direction: column;
    }

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

    .player-section {
        margin-top: -46px;
        padding: 0 12px;
    }

    .player-shell {
        border-radius: 20px;
    }
}
