:root {
    --page-bg: #f7fbff;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.12);
    --cyan: #0891b2;
    --cyan-bright: #22d3ee;
    --blue: #2563eb;
    --dark: #06111f;
    --card: #ffffff;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--page-bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 76px;
}

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

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.28);
}

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

.main-nav a {
    padding: 10px 14px;
    color: #334155;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: #0e7490;
    background: #cffafe;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(340px, 32vw);
    padding: 6px;
    border: 1px solid rgba(8, 145, 178, 0.18);
    background: #f8fafc;
    border-radius: 999px;
}

.nav-search input {
    min-width: 0;
    flex: 1;
    padding: 8px 10px;
    border: 0;
    outline: 0;
    background: transparent;
}

.nav-search button,
.home-search button,
.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(8, 145, 178, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
    padding: 8px 14px;
}

.primary-link {
    padding: 13px 22px;
}

.nav-search button:hover,
.home-search button:hover,
.primary-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(8, 145, 178, 0.32);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--line);
    background: white;
    border-radius: 14px;
    cursor: pointer;
}

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: white;
    background: linear-gradient(120deg, #06b6d4, #2563eb 48%, #0891b2);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: center;
    gap: 56px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 110px;
    opacity: 0;
    transform: translateX(28px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -2;
    opacity: 0.18;
    filter: blur(10px) saturate(1.2);
}

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

.hero-section::before {
    position: absolute;
    inset: 0;
    content: "";
    background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.32), transparent 28%), linear-gradient(90deg, rgba(3, 7, 18, 0.25), rgba(3, 7, 18, 0.08));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 740px;
}

.eyebrow,
.section-heading p,
.detail-copy .breadcrumb {
    margin: 0 0 12px;
    color: #0e7490;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content .eyebrow {
    color: #ecfeff;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p:not(.eyebrow) {
    max-width: 620px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-weight: 800;
    backdrop-filter: blur(10px);
    transition: 0.2s ease;
}

.ghost-link:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 10px solid rgba(255, 255, 255, 0.22);
    border-radius: 32px;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.34);
    transform: rotate(2deg);
}

.hero-poster img,
.movie-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #0891b2);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 38px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

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

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

.hero-dots button.is-active {
    width: 30px;
    background: white;
}

.home-search {
    position: relative;
    z-index: 4;
    margin-top: -38px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    align-items: center;
    gap: 24px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(8, 145, 178, 0.16);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.search-panel form {
    display: flex;
    gap: 12px;
}

.search-panel input {
    min-width: 0;
    flex: 1;
    padding: 16px 18px;
    border: 1px solid rgba(8, 145, 178, 0.18);
    border-radius: 18px;
    outline: 0;
    background: #f8fafc;
}

.search-panel button {
    padding: 0 24px;
}

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

.soft-block {
    background: #eefcff;
}

.dark-block {
    color: white;
    background: #06111f;
}

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

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.section-heading a {
    color: #0e7490;
    font-weight: 900;
}

.dark-block .section-heading p,
.dark-block .section-heading a {
    color: #67e8f9;
}

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

.category-card,
.category-overview-card a {
    display: block;
    min-height: 148px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.12), rgba(37, 99, 235, 0.08)), white;
    border: 1px solid rgba(8, 145, 178, 0.14);
    border-radius: var(--radius);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card a:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.category-card span,
.category-overview-card span {
    display: block;
    margin-bottom: 12px;
    color: #0e7490;
    font-size: 22px;
    font-weight: 900;
}

.category-card p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dark-block .movie-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.15);
}

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

.movie-poster::after {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    content: "";
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
}

.movie-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 50%;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    color: white;
    background: rgba(8, 145, 178, 0.92);
    border-radius: 999px;
    font-weight: 900;
}

.movie-info {
    padding: 18px;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.movie-meta span,
.detail-meta span {
    color: #0e7490;
    background: #cffafe;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.dark-block .movie-meta span {
    color: #cffafe;
    background: rgba(34, 211, 238, 0.14);
}

.movie-info h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.movie-info p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.dark-block .movie-info p {
    color: #cbd5e1;
}

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.movie-tags span,
.detail-tags span {
    padding: 6px 9px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.page-hero {
    color: white;
    background: linear-gradient(120deg, #06b6d4, #2563eb 50%, #0891b2);
}

.slim-hero {
    padding: 86px 0 72px;
}

.page-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(38px, 7vw, 70px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.page-hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.8;
}

.page-hero .eyebrow {
    color: #ecfeff;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px 220px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    background: white;
    border: 1px solid rgba(8, 145, 178, 0.14);
    border-radius: var(--radius);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #0e7490;
    font-size: 13px;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 13px 14px;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    outline: 0;
    background: #f8fafc;
}

.empty-state {
    margin: 0 0 22px;
    padding: 18px;
    color: #0e7490;
    background: #ecfeff;
    border-radius: 18px;
    font-weight: 800;
}

.detail-hero {
    padding: 72px 0;
    color: white;
    background: radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.28), transparent 30%), linear-gradient(135deg, #06111f, #0f172a 55%, #0e7490);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 8px solid rgba(255, 255, 255, 0.16);
    border-radius: 32px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #a5f3fc;
}

.breadcrumb a:hover {
    color: white;
}

.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 780px;
    margin: 20px 0;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.8;
}

.detail-copy .primary-link {
    margin-top: 24px;
}

.player-section {
    padding: 64px 0;
    background: #030712;
    color: white;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    border-radius: 28px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
}

.player-frame video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    color: white;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 50%;
    box-shadow: 0 24px 54px rgba(8, 145, 178, 0.38);
    font-size: 34px;
}

.player-start strong {
    font-size: 22px;
}

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

.detail-content {
    padding: 72px 0;
}

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

.story-panel,
.side-panel {
    padding: 28px;
    background: white;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.story-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.story-panel p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 17px;
    line-height: 2;
}

.story-panel p:last-child {
    margin-bottom: 0;
}

.side-panel dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.side-panel dl div {
    display: grid;
    gap: 6px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.side-panel dt {
    color: #0e7490;
    font-size: 13px;
    font-weight: 900;
}

.side-panel dd {
    margin: 0;
    color: #334155;
    line-height: 1.7;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 0.8fr 1fr;
    gap: 28px;
    padding: 48px 0;
}

.footer-logo {
    color: #67e8f9;
}

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

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 12px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.footer-links a:hover {
    color: white;
    background: rgba(34, 211, 238, 0.18);
}

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

[hidden] {
    display: none !important;
}

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

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

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

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

    .main-nav {
        display: none;
        order: 10;
        width: 100%;
        margin-left: 0;
        padding: 10px;
        background: #f8fafc;
        border-radius: 18px;
    }

    .main-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 72px;
    }

    .hero-poster {
        max-width: 260px;
        margin: 0 auto;
        order: -1;
    }

    .search-panel,
    .detail-grid,
    .content-grid,
    .footer-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .search-panel form {
        flex-direction: column;
    }

    .search-panel button {
        min-height: 52px;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

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

    .section-block,
    .detail-content,
    .player-section {
        padding: 48px 0;
    }

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

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

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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