:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-cyan: #06b6d4;
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-text: #111827;
    --color-muted: #64748b;
    --color-line: #e5e7eb;
    --color-dark: #0f172a;
    --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.10);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 20px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--color-primary);
    background: #eff6ff;
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 9px 4px 9px 12px;
    background: transparent;
}

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

.header-search button,
.primary-button {
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.header-search button {
    padding: 9px 16px;
}

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

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

.section-link {
    color: var(--color-primary);
    background: #eff6ff;
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.header-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.30);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #0f172a;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    background-image:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(14, 165, 233, 0.24) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 54px;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #bae6fd;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 20px;
}

.hero-meta,
.movie-meta-line,
.detail-meta,
.card-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-cover {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.40);
    transform: rotate(2deg);
}

.hero-cover::before {
    content: "";
    position: absolute;
    inset: 12px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    filter: blur(28px);
}

.hero-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

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

.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -46px;
    position: relative;
    z-index: 2;
}

.home-stats a {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
}

.home-stats strong {
    display: block;
    color: var(--color-primary);
    font-size: 34px;
    line-height: 1;
}

.home-stats span {
    color: var(--color-muted);
    font-weight: 700;
}

.content-section {
    padding: 62px 0;
}

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

.section-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.section-kicker {
    color: var(--color-primary);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.80), rgba(15, 23, 42, 0));
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    color: #ffffff;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.94);
}

.rank-badge {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.96);
}

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

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

.movie-meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 10px;
    color: #cbd5e1;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--color-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
}

.card-bottom {
    justify-content: space-between;
    margin-top: 16px;
    font-size: 13px;
}

.text-link {
    color: var(--color-primary);
    font-weight: 800;
}

.hot-score {
    color: #f97316;
    font-weight: 800;
}

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

.category-tile,
.category-overview-card a {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
    transform: translateY(-5px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow-card);
}

.category-tile strong,
.category-overview-card h2 {
    margin: 0;
    font-size: 22px;
}

.category-tile em,
.category-count {
    color: var(--color-primary);
    font-style: normal;
    font-weight: 800;
}

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

.category-tile div,
.mini-title-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.category-tile span,
.mini-title-list span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
}

.hot-strip,
.page-hero,
.detail-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.35), transparent 35%),
        linear-gradient(135deg, #1d4ed8 0%, #0891b2 52%, #0f172a 100%);
}

.hot-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 52px 0;
}

.hot-strip h2,
.page-hero h1 {
    margin: 0 0 10px;
}

.hot-strip p,
.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
}

.page-hero {
    padding: 78px 0 72px;
}

.ranking-hero {
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.32), transparent 32%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #0891b2 100%);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.filter-bar label {
    display: grid;
    gap: 6px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 12px;
    outline: 0;
    background: #ffffff;
    color: var(--color-text);
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-result {
    margin: 0;
    color: var(--color-primary);
    font-weight: 800;
}

.detail-hero {
    padding: 38px 0 72px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
    color: #dbeafe;
    font-size: 14px;
}

.breadcrumbs a {
    color: #ffffff;
    font-weight: 800;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #0f172a;
}

.detail-one-line {
    max-width: 820px;
    color: #dbeafe;
    font-size: 20px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-meta div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-meta dt {
    color: #bae6fd;
    font-size: 12px;
    font-weight: 800;
}

.detail-meta dd {
    margin: 5px 0 0;
    font-weight: 800;
}

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

.player-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #020617;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.player-video-wrap {
    position: relative;
    background: #000000;
}

.player-video-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.big-play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    gap: 8px;
    width: 132px;
    height: 132px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 18px 44px rgba(37, 99, 235, 0.36);
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.big-play-button span {
    font-size: 34px;
}

.big-play-button.is-hidden {
    display: none;
}

.player-status {
    margin: 0;
    padding: 14px 18px;
    color: #cbd5e1;
    font-weight: 700;
}

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

.detail-text article {
    padding: 28px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

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

.detail-text p {
    margin: 0;
    color: #334155;
}

.site-footer {
    margin-top: 30px;
    background: #0f172a;
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 46px 0;
}

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

.footer-grid p {
    margin: 10px 0 0;
    color: #94a3b8;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 7px 0;
    color: #cbd5e1;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
}

.footer-bottom button {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 8px 14px;
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
}

[data-movie-card].is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .menu-toggle {
        display: inline-block;
        justify-self: end;
    }

    .site-nav,
    .header-search {
        display: none;
    }

    .site-nav.is-open {
        grid-column: 1 / -1;
        display: grid;
        justify-content: stretch;
        padding-bottom: 14px;
    }

    .nav-link {
        border-radius: 12px;
        background: #f8fafc;
    }

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

    .hero-cover {
        max-width: 320px;
        transform: none;
    }

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

    .home-stats,
    .detail-meta {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 680px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .hero-slider {
        min-height: 740px;
    }

    .hero-content {
        gap: 28px;
        padding-top: 36px;
    }

    .hero-copy p,
    .detail-one-line {
        font-size: 17px;
    }

    .hero-actions,
    .hot-strip-inner,
    .section-heading,
    .footer-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .home-stats,
    .movie-grid,
    .featured-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 42px 0;
    }

    .big-play-button {
        width: 96px;
        height: 96px;
    }
}
