:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --blue-600: #2563eb;
    --indigo-600: #4f46e5;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --radius-xl: 1rem;
    --radius-2xl: 1.4rem;
    --shadow-soft: 0 20px 50px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50), #ffffff 45%, var(--slate-50));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.96), rgba(37, 99, 235, 0.96), rgba(79, 70, 229, 0.96));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--sky-600);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 10px 24px rgba(14, 165, 233, 0.3);
}

.brand-text {
    white-space: nowrap;
    font-size: 1.08rem;
}

.desktop-nav,
.category-nav,
.mobile-panel nav,
.footer-grid div {
    display: flex;
    align-items: center;
}

.desktop-nav {
    gap: 18px;
    font-weight: 600;
    margin-left: auto;
}

.desktop-nav a,
.category-nav a {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.category-nav a:hover,
.category-nav a.active {
    color: #ffffff;
}

.desktop-category-nav {
    gap: 8px;
}

.desktop-category-nav a,
.mobile-panel nav a {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.header-search,
.mobile-search,
.hero-search,
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
    border: 0;
    outline: 0;
    border-radius: 999px;
}

.header-search input {
    width: 190px;
    padding: 10px 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.74);
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.secondary-button,
.rank-action,
.player-button {
    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 {
    padding: 10px 16px;
    color: var(--sky-700);
    background: #ffffff;
}

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

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

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-search input {
    flex: 1;
    padding: 11px 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-search button {
    padding: 11px 16px;
    color: var(--sky-700);
    background: #ffffff;
}

.mobile-panel nav {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.48), transparent 28%), linear-gradient(135deg, #0f172a 0%, #0ea5e9 45%, #4f46e5 100%);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(52px);
    opacity: 0.35;
}

.hero::before {
    width: 320px;
    height: 320px;
    left: 6%;
    top: 18%;
    background: #38bdf8;
}

.hero::after {
    width: 420px;
    height: 420px;
    right: -80px;
    bottom: -120px;
    background: #818cf8;
}

.hero-slider {
    position: relative;
    z-index: 2;
}

.hero-slide {
    display: none;
    align-items: center;
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.72fr);
    gap: 52px;
    min-height: 650px;
    padding: 58px 0 72px;
}

.hero-slide.active {
    display: grid;
}

.hero-kicker,
.section-kicker,
.page-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.45rem, 7vw, 5.4rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 760px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-meta,
.detail-meta,
.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.page-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
}

.primary-button {
    color: var(--sky-700);
    background: #ffffff;
    box-shadow: 0 18px 30px rgba(255, 255, 255, 0.22);
}

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.primary-button:hover,
.secondary-button:hover,
.rank-action:hover,
.player-button:hover,
.header-search button:hover {
    transform: translateY(-2px);
}

.hero-search {
    max-width: 620px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    color: #ffffff;
    background: transparent;
}

.hero-search button {
    padding: 13px 20px;
    color: var(--sky-700);
    background: #ffffff;
}

.hero-visual {
    position: relative;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.85));
}

.hero-card-float {
    position: absolute;
    left: -28px;
    bottom: 36px;
    width: min(290px, 82%);
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--slate-800);
    box-shadow: var(--shadow-soft);
}

.hero-card-float strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.hero-card-float span {
    color: var(--slate-500);
    font-size: 0.92rem;
}

.hero-dots {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 10px;
    padding-bottom: 32px;
}

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

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

.section {
    padding: 78px 0;
}

.section-muted {
    background: linear-gradient(90deg, var(--slate-100), #ffffff);
}

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

.section-title,
.page-title {
    margin: 12px 0 0;
    color: var(--slate-800);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.12;
}

.section-desc,
.page-desc {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--slate-500);
}

.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--sky-700);
    background: var(--sky-100);
    font-weight: 700;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card-large {
    grid-row: span 2;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sky-100), var(--slate-100));
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.badge-year,
.badge-type {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.badge-year {
    left: 12px;
    top: 12px;
    color: var(--sky-700);
    background: rgba(255, 255, 255, 0.92);
}

.badge-type {
    right: 12px;
    bottom: 12px;
    color: #ffffff;
    background: rgba(14, 165, 233, 0.9);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    overflow: hidden;
    margin-bottom: 8px;
    color: var(--slate-800);
    font-size: 1.04rem;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta,
.card-desc {
    margin: 0;
    color: var(--slate-500);
    font-size: 0.9rem;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin-top: 8px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.card-tags span,
.tag-list span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--sky-700);
    background: var(--sky-100);
    font-size: 0.78rem;
    font-weight: 700;
}

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

.category-card {
    min-height: 170px;
    padding: 24px;
    border-radius: var(--radius-2xl);
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, var(--blue-600), var(--indigo-600));
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 60px rgba(37, 99, 235, 0.24);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.32rem;
}

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

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.22), transparent 24%), linear-gradient(120deg, var(--sky-500), var(--blue-600), var(--indigo-600));
}

.page-hero .container {
    padding: 62px 0 58px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.94rem;
}

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

.filter-panel {
    margin: 34px 0;
    padding: 18px;
    border-radius: var(--radius-2xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.filter-bar {
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    padding: 0 15px;
    color: var(--slate-700);
    background: var(--slate-100);
}

.filter-bar input {
    flex: 1 1 260px;
}

.filter-empty {
    display: none;
    padding: 28px;
    color: var(--slate-500);
    text-align: center;
}

.filter-empty.is-visible {
    display: block;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: var(--radius-2xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-poster {
    display: block;
    overflow: hidden;
    border-radius: 16px;
}

.rank-poster img {
    width: 96px;
    height: 128px;
    object-fit: cover;
    background: var(--slate-100);
}

.rank-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rank-heading a {
    color: var(--slate-800);
    font-size: 1.08rem;
    font-weight: 800;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 32px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
    font-weight: 800;
}

.rank-content p {
    margin: 0 0 6px;
    color: var(--slate-500);
}

.rank-action {
    padding: 10px 16px;
    color: #ffffff;
    background: var(--sky-500);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 44px 0 0;
}

.detail-card,
.side-card,
.content-card {
    border-radius: var(--radius-2xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.detail-card {
    overflow: hidden;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    color: var(--sky-700);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.32);
}

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--sky-500);
}

.detail-body {
    padding: 26px;
}

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
}

.content-card {
    margin-top: 24px;
    padding: 26px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 16px;
    color: var(--slate-800);
    font-size: 1.35rem;
}

.content-card p {
    margin: 0 0 16px;
    color: var(--slate-600);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.side-card {
    padding: 18px;
}

.side-card + .side-card {
    margin-top: 18px;
}

.side-poster {
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 16px;
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--slate-100);
}

.info-table {
    display: grid;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--slate-100);
}

.info-row span:first-child {
    color: var(--slate-500);
}

.info-row span:last-child {
    color: var(--slate-800);
    font-weight: 700;
    text-align: right;
}

.related-list {
    display: grid;
    gap: 12px;
}

.related-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 70px;
    height: 94px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--slate-100);
}

.related-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--slate-800);
}

.related-item span {
    color: var(--slate-500);
    font-size: 0.9rem;
}

.site-footer {
    margin-top: 86px;
    color: #ffffff;
    background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-grid div {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
}

.footer-grid p,
.footer-grid a {
    color: var(--slate-300);
}

.footer-grid h3 {
    margin: 0 0 10px;
    color: var(--sky-400);
}

.footer-bottom {
    padding: 18px;
    color: var(--slate-400);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1180px) {
    .desktop-category-nav,
    .header-search {
        display: none;
    }

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

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

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

    .header-inner {
        min-height: 64px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 30px;
        min-height: auto;
        padding: 42px 0 58px;
    }

    .hero-poster {
        max-width: 420px;
        margin: 0 auto;
        transform: none;
    }

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

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

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

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

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

    .brand-text {
        font-size: 0.98rem;
    }

    .hero {
        min-height: auto;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

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

    .hero-search button {
        width: 100%;
    }

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

    .rank-item {
        grid-template-columns: 76px 1fr;
    }

    .rank-poster img {
        width: 76px;
        height: 102px;
    }

    .rank-action {
        grid-column: 1 / -1;
        text-align: center;
    }

    .detail-body,
    .content-card {
        padding: 20px;
    }
}

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

.category-overview-card {
    margin-top: 0;
}

.category-overview-card .section-link {
    margin-top: 16px;
}

.category-sample-links {
    display: grid;
    gap: 8px;
    margin: 16px 0;
}

.category-sample-links a {
    color: var(--sky-700);
    font-weight: 700;
}

@media (max-width: 760px) {
    .category-overview-grid {
        grid-template-columns: 1fr;
    }
}
