:root {
    --primary-50: #f0f7ff;
    --primary-100: #dceeff;
    --primary-500: #0c8ce8;
    --primary-600: #006fc6;
    --primary-700: #0158a0;
    --primary-900: #0b3f6e;
    --accent-300: #5feacf;
    --accent-500: #14b8a6;
    --accent-600: #0d9485;
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 16px 38px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 28px 65px rgba(15, 23, 42, 0.20);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--neutral-900);
    background: var(--neutral-50);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--primary-900), var(--primary-600));
    box-shadow: var(--shadow-sm);
}

.site-header-inner {
    width: min(1280px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.site-logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--primary-900);
    background: linear-gradient(135deg, var(--accent-300), var(--white));
    box-shadow: 0 12px 24px rgba(13, 148, 133, 0.25);
}

.site-logo-text {
    font-size: 1.2rem;
}

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

.nav-link,
.mobile-nav-link {
    padding: 9px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
}

.nav-link:hover {
    transform: translateY(-1px);
}

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

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--white);
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.main-shell,
.detail-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.main-shell {
    padding: 32px 0 72px;
}

.detail-shell {
    padding: 28px 0 72px;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--neutral-900);
    box-shadow: var(--shadow-lg);
}

.hero-track,
.hero-slide {
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.38) 48%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: clamp(24px, 7vw, 76px);
    right: clamp(24px, 8vw, 90px);
    bottom: clamp(30px, 7vw, 80px);
    max-width: 820px;
    color: var(--white);
}

.hero-kicker {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--accent-300);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2.2vw, 1.25rem);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button-primary {
    color: var(--white);
    background: var(--primary-600);
    box-shadow: 0 14px 28px rgba(0, 111, 198, 0.34);
}

.button-primary:hover {
    background: var(--primary-700);
}

.button-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.48);
    font-size: 2rem;
    line-height: 1;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-carousel:hover .hero-arrow {
    opacity: 1;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-arrow-left {
    left: 18px;
}

.hero-arrow-right {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 28px;
    background: var(--white);
}

.search-panel,
.toolbar-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
    padding: 24px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
    margin: 0;
    color: var(--neutral-900);
}

.search-panel p,
.section-heading p,
.page-hero p {
    margin: 6px 0 0;
    color: var(--neutral-600);
}

.search-box {
    min-width: min(420px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--neutral-200);
    border-radius: 14px;
    background: var(--neutral-50);
}

.search-box.wide {
    flex: 1;
    width: 100%;
}

.search-box span {
    color: var(--primary-600);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--neutral-900);
    background: transparent;
}

.content-section,
.category-entry-section {
    margin-top: 56px;
}

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

.section-heading h2 {
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-more {
    color: var(--primary-600);
    font-weight: 800;
    white-space: nowrap;
}

.section-more:hover {
    color: var(--primary-700);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-900), var(--accent-600));
}

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

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 38px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.28);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--neutral-500);
    font-size: 0.84rem;
}

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

.movie-card h2 {
    margin: 8px 0 8px;
    font-size: 1.06rem;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card h2 a:hover {
    color: var(--primary-600);
}

.movie-card p {
    min-height: 3.05em;
    margin: 0;
    color: var(--neutral-600);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-tag-row span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 0.78rem;
    font-weight: 700;
}

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

.category-entry-grid a,
.category-overview-card {
    padding: 20px;
    border-radius: 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    box-shadow: var(--shadow-sm);
}

.category-entry-grid strong {
    display: block;
    font-size: 1.12rem;
    margin-bottom: 8px;
}

.category-entry-grid span {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
}

.category-preview:nth-of-type(even) {
    padding: 30px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 42% 1fr;
}

.rank-card .movie-poster {
    height: 100%;
    aspect-ratio: auto;
}

.rank-card .movie-card-body {
    min-width: 0;
}

.movie-scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 300px);
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: thin;
}

.large-card .movie-poster,
.wide-card .movie-poster {
    aspect-ratio: 16 / 9;
}

.page-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-900), var(--primary-600) 55%, var(--accent-600));
    padding: clamp(64px, 10vw, 108px) max(16px, calc((100% - 1280px) / 2));
}

.page-hero > * {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.page-hero span {
    display: block;
    color: var(--accent-300);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin-top: 12px;
    color: var(--white);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
}

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

.category-overview-card {
    color: var(--neutral-900);
    background: var(--white);
}

.category-overview-main span {
    color: var(--primary-600);
    font-size: 1.35rem;
    font-weight: 900;
}

.category-overview-main strong {
    display: block;
    margin-top: 8px;
    color: var(--neutral-600);
    font-weight: 500;
}

.category-overview-links {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.category-overview-links a {
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--neutral-50);
}

.category-overview-links a:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.toolbar-section {
    flex-wrap: wrap;
}

.quick-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.quick-filter-row button {
    border: 0;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--neutral-700);
    background: var(--neutral-100);
}

.quick-filter-row button:hover,
.quick-filter-row button.is-active {
    color: var(--white);
    background: var(--primary-600);
}

.secondary-row {
    margin-top: -8px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--neutral-600);
}

.breadcrumb a:hover {
    color: var(--primary-600);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: clamp(24px, 4vw, 48px);
    padding: clamp(22px, 4vw, 38px);
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary-900), var(--accent-600));
    box-shadow: var(--shadow-sm);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 4;
}

.detail-kicker {
    color: var(--primary-600);
    font-weight: 900;
}

.detail-info h1 {
    margin-top: 10px;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 18px 0 0;
    color: var(--neutral-700);
    font-size: 1.12rem;
}

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

.detail-meta-grid span {
    padding: 14px;
    border-radius: 14px;
    color: var(--neutral-700);
    background: var(--neutral-50);
}

.detail-meta-grid strong {
    display: block;
    color: var(--neutral-900);
    font-size: 0.82rem;
}

.player-section {
    margin-top: 34px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--neutral-900);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(0, 111, 198, 0.28), rgba(0, 0, 0, 0.72));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-started .player-cover {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-circle {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--white);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    font-size: 1.8rem;
}

.player-cover strong {
    max-width: min(760px, calc(100% - 40px));
    font-size: clamp(1.35rem, 4vw, 2.5rem);
    line-height: 1.2;
}

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

.detail-content article {
    padding: 28px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.detail-content h2 {
    font-size: 1.45rem;
    font-weight: 900;
}

.detail-content p {
    margin: 12px 0 0;
    color: var(--neutral-700);
}

.related-section {
    margin-top: 42px;
}

.site-footer {
    color: var(--neutral-300);
    background: var(--neutral-900);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 1.4fr;
    gap: 42px;
}

.footer-logo {
    color: var(--white);
    font-size: 1.2rem;
}

.footer-brand p {
    max-width: 520px;
    margin: 12px 0 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.footer-links h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 1rem;
}

.footer-links a {
    display: block;
    margin: 8px 0;
}

.footer-links a:hover {
    color: var(--accent-300);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: var(--neutral-500);
}

.searchable-card.is-hidden {
    display: none;
}

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

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

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-carousel {
        height: 500px;
        border-radius: 18px;
    }

    .search-panel,
    .toolbar-section,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .compact-grid,
    .two-column-grid,
    .rank-grid,
    .category-entry-grid,
    .category-overview-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 560px) {
    .main-shell,
    .detail-shell,
    .site-header-inner,
    .mobile-nav,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1280px);
    }

    .hero-carousel {
        height: 430px;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 44px;
    }

    .hero-actions {
        gap: 10px;
    }

    .button {
        width: 100%;
    }

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

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

    .rank-card .movie-poster {
        aspect-ratio: 16 / 10;
    }

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