:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-dark: #1e40af;
    --cyan: #0891b2;
    --cyan-soft: #ecfeff;
    --gold: #facc15;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    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;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-logo-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: var(--blue-dark);
    background: #ffffff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: #eff6ff;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 10px;
    background: #ffffff;
}

.hero-section {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    background: #0f172a;
}

.hero-track {
    position: relative;
    min-height: 540px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    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-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
    max-width: 720px;
}

.hero-kicker,
.section-heading p,
.category-overview-head p,
.page-hero p:first-child {
    margin: 0 0 10px;
    color: #bae6fd;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy h2 + p,
.hero-copy h1 + h2 + p {
    max-width: 680px;
}

.hero-copy p {
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(18px, 2vw, 24px);
}

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

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

.primary-button {
    color: var(--blue-dark);
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(255, 255, 255, 0.18);
}

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

.ghost-button.dark {
    color: var(--blue-dark);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero-tags span,
.detail-tags span,
.movie-badges span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: 13px;
    font-weight: 800;
}

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

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

.hero-dot {
    width: 34px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

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

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

.soft-section {
    width: 100%;
    max-width: none;
    padding: 64px max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(180deg, #ffffff, #eff6ff);
}

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

.center-heading {
    justify-content: center;
    text-align: center;
    display: block;
}

.section-heading h2,
.category-overview-head h2,
.detail-content h2,
.player-section h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading a,
.category-overview-head a {
    color: var(--blue);
    font-weight: 800;
}

.home-search {
    margin-top: -48px;
    padding: 34px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 190px));
    gap: 14px;
    align-items: end;
    margin-bottom: 28px;
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.search-box input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: #ffffff;
    padding: 0 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.home-search-actions {
    justify-content: center;
}

.home-filter-grid {
    margin: 26px 0;
}

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

.category-tile,
.category-overview-block {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-block:hover,
.movie-card:hover,
.compact-card:hover,
.ranking-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile h3,
.movie-card-title,
.ranking-main h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 22px;
    line-height: 1.3;
    font-weight: 900;
}

.category-tile p,
.category-overview-desc,
.movie-card-body p,
.ranking-main p,
.detail-content p,
.footer-brand p,
.footer-links p {
    color: var(--muted);
}

.category-mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-mini-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--blue-dark);
    background: #eff6ff;
    font-size: 13px;
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.movie-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 42px;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .movie-play {
    opacity: 1;
}

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

.movie-badges,
.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.movie-badges {
    margin-bottom: 12px;
}

.movie-card-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 19px;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 14px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #cbd5e1;
}

.page-main {
    background: var(--bg);
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background: linear-gradient(100deg, #0f172a, #1d4ed8, #0891b2);
    background-size: cover;
    background-position: center;
}

.page-hero > div,
.detail-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0;
}

.small-hero > div {
    max-width: 760px;
}

.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 820px;
    color: #dbeafe;
    font-size: 19px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    color: #dbeafe;
    font-weight: 700;
}

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

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

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

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

.compact-card {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 90px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fafc;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card img {
    width: 74px;
    height: 74px;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.compact-card span {
    color: var(--ink);
    font-weight: 800;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 58px 118px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-number {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 20px;
    font-weight: 900;
}

.ranking-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-main h2 {
    font-size: 20px;
}

.ranking-main p {
    margin: 0 0 10px;
}

.detail-hero-inner {
    padding: 54px 0 74px;
}

.detail-intro {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    border: 6px solid rgba(255, 255, 255, 0.28);
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.detail-copy h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-copy p {
    max-width: 820px;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: 19px;
}

.player-section {
    padding-bottom: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    margin-top: 22px;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.24), rgba(15, 23, 42, 0.74));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-icon {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    color: var(--blue-dark);
    background: #ffffff;
    font-size: 36px;
    box-shadow: 0 18px 42px rgba(255, 255, 255, 0.25);
}

.player-start span:last-child {
    font-size: 20px;
    font-weight: 900;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 24px;
}

.detail-content article {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.detail-content p {
    margin: 18px 0 0;
    font-size: 17px;
}

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

.empty-state {
    display: none;
    margin: 34px 0 0;
    padding: 22px;
    border: 1px dashed #93c5fd;
    border-radius: 16px;
    color: var(--blue-dark);
    background: #eff6ff;
    text-align: center;
    font-weight: 800;
}

.filter-scope.is-empty + .empty-state,
.ranking-list.filter-scope.is-empty + .empty-state {
    display: block;
}

.movie-card.is-hidden,
.ranking-item.is-hidden {
    display: none;
}

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

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

.footer-logo {
    color: #ffffff;
    margin-bottom: 14px;
}

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

.footer-links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li + li {
    margin-top: 8px;
}

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

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

@media (max-width: 980px) {
    .site-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border-radius: 18px;
        background: #1d4ed8;
        box-shadow: var(--shadow);
    }

    .site-header.menu-open .site-nav {
        display: flex;
    }

    .nav-link {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 255, 255, 0.12);
    }

    .menu-toggle {
        display: block;
    }

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

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

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

    .detail-intro {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .detail-content,
    .site-footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .site-header-inner {
        width: min(100% - 24px, 1180px);
    }

    .site-logo {
        font-size: 18px;
    }

    .hero-section,
    .hero-track {
        min-height: 620px;
    }

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

    .section-wrap,
    .page-hero > div,
    .detail-hero-inner {
        width: min(100% - 24px, 1180px);
    }

    .home-search {
        padding: 24px 16px;
    }

    .filter-panel,
    .category-grid,
    .movie-grid,
    .related-grid,
    .detail-content,
    .site-footer-inner {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .category-overview-head {
        display: block;
    }

    .section-heading a,
    .category-overview-head a {
        display: inline-flex;
        margin-top: 12px;
    }

    .ranking-item {
        grid-template-columns: 44px 86px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .ranking-number {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 16px;
    }

    .ranking-main h2 {
        font-size: 17px;
    }

    .ranking-main p {
        display: none;
    }

    .detail-intro {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .detail-cover {
        max-width: 240px;
    }

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

    .player-icon {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }
}
