:root {
    --blue: #2563eb;
    --cyan: #0891b2;
    --teal: #0d9488;
    --pink: #ec4899;
    --purple: #6d28d9;
    --orange: #f97316;
    --red: #ef4444;
    --dark: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --white: #ffffff;
    --radius: 22px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
    box-shadow: 0 12px 30px rgba(14, 116, 144, 0.25);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--blue);
    background: var(--white);
    box-shadow: 0 10px 24px rgba(255, 255, 255, 0.22);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fef3c7;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    color: var(--white);
    background: linear-gradient(135deg, #1e3a8a, #581c87 52%, #831843);
}

.hero-glow {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.42;
}

.hero-glow-one {
    width: 300px;
    height: 300px;
    top: 90px;
    left: 8%;
    background: #3b82f6;
}

.hero-glow-two {
    width: 420px;
    height: 420px;
    right: 8%;
    bottom: 20px;
    background: #ec4899;
}

.hero-slider {
    position: relative;
    z-index: 1;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(32px, 1fr) minmax(0, 1180px) minmax(32px, 1fr);
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.2));
}

.hero-content {
    position: relative;
    z-index: 2;
    grid-column: 2;
    max-width: 760px;
    padding: 92px 0 120px;
}

.eyebrow {
    margin: 0 0 14px;
    color: #fde68a;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p:not(.eyebrow) {
    max-width: 680px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 24px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--blue);
    background: var(--white);
    box-shadow: 0 16px 35px rgba(255, 255, 255, 0.2);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.active {
    width: 30px;
    background: var(--white);
}

.feature-strip {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: -72px;
    margin-bottom: 64px;
}

.section-block {
    margin: 72px auto;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: var(--blue);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-card-large {
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #dbeafe;
}

.movie-card-large .card-cover {
    aspect-ratio: 16 / 10;
}

.card-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover img,
.category-card:hover img,
.rank-card:hover img {
    transform: scale(1.06);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.68));
}

.card-year {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(37, 99, 235, 0.9);
    font-size: 12px;
    font-weight: 800;
}

.card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--blue);
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.card-body {
    padding: 15px;
}

.card-title {
    display: block;
    overflow: hidden;
    color: #0f172a;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.card-meta {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.card-summary {
    display: -webkit-box;
    min-height: 44px;
    margin: 9px 0 0;
    overflow: hidden;
    color: #4b5563;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 750;
}

.category-zone {
    padding: 56px 0;
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: var(--radius);
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.2);
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    transition: transform 0.35s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(15, 23, 42, 0.72));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.rank-num {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
    font-size: 13px;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
    background: #e0f2fe;
}

.rank-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.rank-title {
    display: block;
    font-weight: 900;
    line-height: 1.35;
}

.rank-card p {
    display: -webkit-box;
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    padding: 74px 0;
    color: var(--white);
    background: linear-gradient(135deg, #1e3a8a, #581c87 60%, #be185d);
}

.page-hero h1 {
    max-width: 920px;
}

.page-hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.small-hero,
.category-hero,
.ranking-hero {
    position: relative;
    overflow: hidden;
}

.small-hero::after,
.category-hero::after,
.ranking-hero::after {
    content: "";
    position: absolute;
    right: -100px;
    bottom: -160px;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(236, 72, 153, 0.3);
    filter: blur(50px);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 56px auto;
}

.overview-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 210px 1fr;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 10px;
    background: #dbeafe;
}

.overview-thumbs img {
    height: 138px;
    border-radius: 12px;
    object-fit: cover;
}

.overview-body {
    padding: 24px;
}

.overview-body h2 {
    margin: 0;
    font-size: 25px;
}

.overview-body p {
    margin: 12px 0 18px;
    color: var(--muted);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 52px;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    color: #0f172a;
    background: var(--white);
    outline: none;
    padding: 0 16px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.06);
}

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

.empty-state {
    display: none;
    padding: 30px;
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    background: var(--white);
}

.empty-state.show {
    display: block;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 28px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--blue);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.player-panel,
.detail-info,
.prose-section {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.player-panel {
    overflow: hidden;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
}

.player-start span {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 999px;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
    font-size: 38px;
}

.player-frame.playing .player-start {
    display: none;
}

.detail-info {
    padding: 28px;
}

.detail-info h1 {
    color: #0f172a;
    font-size: clamp(30px, 4vw, 48px);
}

.lead {
    margin: 18px 0 0;
    color: #374151;
    font-size: 18px;
}

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

.detail-meta-grid div {
    padding: 14px;
    border-radius: 16px;
    background: #eff6ff;
}

.detail-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.detail-meta-grid strong {
    display: block;
    margin-top: 3px;
    color: #1e3a8a;
}

.prose-section {
    margin-top: 28px;
    padding: 34px;
}

.prose-section h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.prose-section h2:not(:first-child) {
    margin-top: 30px;
}

.prose-section p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

.site-footer {
    margin-top: 80px;
    color: #d1d5db;
    background: #111827;
}

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

.footer-brand {
    color: var(--white);
}

.site-footer p {
    max-width: 440px;
    margin: 14px 0 0;
    color: #cbd5e1;
}

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

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

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid #1f2937;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

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

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

    .feature-strip,
    .rank-grid,
    .wide-rank {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 68px;
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .nav-link {
        text-align: center;
    }

    .hero,
    .hero-slider,
    .hero-slide {
        min-height: 560px;
    }

    .hero-slide {
        grid-template-columns: 16px 1fr 16px;
    }

    .hero-content {
        padding: 72px 0 100px;
    }

    .hero-control {
        top: auto;
        bottom: 28px;
        transform: none;
    }

    .hero-prev {
        left: 18px;
    }

    .hero-next {
        right: 18px;
    }

    .feature-strip,
    .movie-grid,
    .category-grid,
    .rank-grid,
    .wide-rank,
    .overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid {
        gap: 16px;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 124px 1fr;
    }

    .movie-card-large {
        display: block;
    }

    .card-cover,
    .movie-card-large .card-cover {
        aspect-ratio: 2 / 3;
    }

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

    .overview-card {
        grid-template-columns: 1fr;
    }

    .overview-thumbs img {
        height: 120px;
    }

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

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