:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --cyan-soft: #a5f3fc;
    --purple: #7c3aed;
    --orange: #f97316;
    --red: #ef4444;
    --slate: #0f172a;
    --ink: #1f2937;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.22);
    --glass: rgba(255, 255, 255, 0.14);
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 52%, #ecfeff 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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: 40;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.96), rgba(124, 58, 237, 0.96));
    box-shadow: 0 12px 34px rgba(37, 99, 235, 0.24);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 22px;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #0ea5e9;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(255, 255, 255, 0.22);
}

.top-search {
    flex: 1;
    max-width: 440px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.top-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select,
.search-hero input {
    border: 0;
    outline: 0;
}

.top-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 18px;
    color: #111827;
    background: transparent;
}

.top-search button {
    border: 0;
    padding: 12px 18px;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 700;
}

.desktop-nav a,
.mobile-panel a {
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    opacity: 1;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-panel.open {
    display: grid;
    gap: 14px;
}

.mobile-panel input {
    width: 100%;
    margin-top: 16px;
    padding: 13px 16px;
    border-radius: 18px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0e7490 0%, #1d4ed8 50%, #6d28d9 100%);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    filter: blur(26px);
    opacity: 0.35;
    background: rgba(255, 255, 255, 0.22);
    animation: floatGlow 9s ease-in-out infinite alternate;
}

.hero::before {
    top: 40px;
    left: 5vw;
}

.hero::after {
    right: 4vw;
    bottom: -90px;
    background: rgba(165, 243, 252, 0.25);
    animation-delay: -2s;
}

@keyframes floatGlow {
    from {
        transform: translate3d(0, 0, 0) scale(0.9);
    }
    to {
        transform: translate3d(22px, -18px, 0) scale(1.08);
    }
}

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

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

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

.hero-slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    filter: saturate(1.1) contrast(1.02);
}

.hero-slide-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(30, 64, 175, 0.58), rgba(15, 23, 42, 0.2));
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
    align-items: center;
    gap: 44px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
    font-weight: 700;
    font-size: 14px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero h1 span {
    color: var(--cyan-soft);
}

.hero p {
    max-width: 660px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1.8;
}

.hero-actions {
    margin-top: 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.btn-primary,
.btn-ghost,
.btn-dark,
.filter-bar button,
.search-hero button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    min-height: 54px;
    padding: 0 28px;
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(255, 255, 255, 0.28);
}

.btn-ghost {
    min-height: 54px;
    padding: 0 26px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
}

.btn-dark {
    min-height: 46px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #2563eb);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-dark:hover,
.filter-bar button:hover,
.search-hero button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow);
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: var(--shadow);
}

.hero-poster-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.hero-poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0));
}

.hero-poster-info h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.hero-poster-info p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
}

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

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

.section-alt {
    margin: 0;
    padding: 70px 0;
    background: linear-gradient(90deg, #f3e8ff 0%, #ffe4e6 50%, #ffedd5 100%);
}

.section-alt .section {
    padding: 0;
}

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

.section-title h2,
.page-title h1 {
    margin: 0;
    color: #1e293b;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.035em;
}

.section-title p,
.page-title p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 100%;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.movie-cover {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #ede9fe);
}

.movie-card-compact .movie-cover {
    height: 168px;
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
}

.pill,
.duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #ffffff;
}

.pill {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
}

.pill-blue {
    background: rgba(37, 99, 235, 0.9);
}

.duration {
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    min-width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #fb7185, #f97316);
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.34);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.movie-card h3 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    flex: 1;
    margin: 10px 0 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.movie-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.feature-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.feature-large,
.feature-small {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: 30px;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.feature-small-list {
    display: grid;
    gap: 24px;
}

.feature-small {
    min-height: 198px;
}

.feature-large img,
.feature-small img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.feature-large:hover img,
.feature-small:hover img {
    transform: scale(1.05);
}

.feature-copy {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0));
}

.feature-copy h3 {
    margin: 0 0 8px;
    font-size: 28px;
}

.feature-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

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

.category-card {
    display: block;
    padding: 24px;
    min-height: 154px;
    overflow: hidden;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 55%, #0891b2);
}

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

.page-title h1 {
    color: #ffffff;
}

.page-title p {
    color: rgba(255, 255, 255, 0.82);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px 130px;
    gap: 12px;
    margin: 0 0 28px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    color: #0f172a;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px var(--line);
}

.filter-bar button,
.search-hero button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 64px 140px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.ranking-num {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #fb7185, #f97316);
}

.ranking-item img {
    width: 140px;
    height: 86px;
    object-fit: cover;
    border-radius: 18px;
}

.ranking-copy h2 {
    margin: 0 0 8px;
    color: #1e293b;
    font-size: 20px;
}

.ranking-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.ranking-side {
    color: #475569;
    text-align: right;
    font-weight: 800;
}

.detail-shell {
    background: linear-gradient(180deg, #0f172a 0%, #172554 64%, #eff6ff 64%, #eff6ff 100%);
}

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 36px;
    color: #ffffff;
}

.detail-heading {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: end;
}

.detail-poster {
    width: 240px;
    height: 330px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: #1e293b;
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-heading h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-lead {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-tags span {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 800;
}

.player-card {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.24), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.player-overlay span {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 999px;
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 20px 52px rgba(255, 255, 255, 0.28);
    font-size: 36px;
}

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

.detail-content {
    width: min(1180px, calc(100% - 32px));
    margin: 42px auto 0;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

.article-card,
.side-card {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.article-card {
    padding: 34px;
}

.article-card h2,
.side-card h2 {
    margin: 0 0 16px;
    color: #1e293b;
    font-size: 24px;
}

.article-card p {
    margin: 0 0 22px;
    color: #475569;
    line-height: 2;
    font-size: 16px;
}

.side-card {
    padding: 22px;
}

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

.side-link {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
}

.side-link img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border-radius: 14px;
}

.side-link h3 {
    margin: 0 0 6px;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.35;
}

.side-link span {
    color: var(--muted);
    font-size: 12px;
}

.search-hero {
    display: flex;
    max-width: 720px;
    margin-top: 26px;
    overflow: hidden;
    border-radius: 999px;
    background: #ffffff;
}

.search-hero input {
    flex: 1;
    min-width: 0;
    padding: 18px 24px;
    color: #0f172a;
}

.search-hero button {
    padding: 0 28px;
}

.no-results {
    display: none;
    padding: 34px;
    border-radius: 28px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.no-results.show {
    display: block;
}

.site-footer {
    margin-top: 70px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #172554 55%, #0e7490);
}

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

.footer-grid p {
    max-width: 420px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 18px;
    color: var(--cyan-soft);
    font-size: 18px;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    color: rgba(255, 255, 255, 0.62);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-inner,
    .feature-layout,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 680px) {
    .nav-wrap {
        height: 66px;
    }

    .brand,
    .footer-brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

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

    .hero-inner {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding: 42px 0 76px;
    }

    .hero-poster-card,
    .hero-poster-card img {
        min-height: 320px;
        height: 320px;
    }

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

    .section-title {
        align-items: start;
        flex-direction: column;
    }

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

    .feature-copy h3 {
        font-size: 22px;
    }

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

    .ranking-item {
        grid-template-columns: 52px 88px 1fr;
    }

    .ranking-item img {
        width: 88px;
        height: 68px;
    }

    .ranking-side {
        grid-column: 2 / -1;
        text-align: left;
    }

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

    .detail-poster {
        width: 190px;
        height: 268px;
    }

    .article-card {
        padding: 24px;
    }

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

    .search-hero {
        border-radius: 24px;
        flex-direction: column;
    }

    .search-hero button {
        min-height: 52px;
        border-radius: 0;
    }
}
