:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --blue-700: #1d4ed8;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 25px 50px rgba(15, 23, 42, 0.16);
    --radius: 1rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--gray-50);
    color: var(--gray-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
}

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: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-900);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-600), var(--blue-700));
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.28);
}

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

.site-nav a {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--gray-700);
    font-size: 0.94rem;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: var(--sky-700);
    background: var(--sky-100);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: var(--gray-700);
    background: var(--gray-100);
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.75s ease;
}

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

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

.hero-shade,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 25%, rgba(14, 165, 233, 0.32), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.55) 52%, rgba(2, 6, 23, 0.14));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
    padding: 72px 0;
    max-width: 1180px;
}

.hero-content > * {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: var(--sky-600);
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.eyebrow.dark {
    background: var(--sky-100);
    color: var(--sky-700);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 22px 0 0;
    color: #e5e7eb;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    line-height: 1.85;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    font-size: 0.92rem;
    font-weight: 650;
    backdrop-filter: blur(8px);
}

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

.primary-btn,
.ghost-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.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: var(--white);
    background: var(--sky-600);
    box-shadow: 0 18px 35px rgba(2, 132, 199, 0.32);
}

.primary-btn:hover {
    background: var(--sky-700);
    transform: translateY(-2px) scale(1.02);
}

.ghost-btn {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.ghost-btn.light {
    color: var(--white);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    font-size: 2rem;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

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

.home-search {
    margin-top: -58px;
    position: relative;
    z-index: 8;
}

.home-search-inner,
.section-wrap,
.footer-grid,
.footer-bottom,
.detail-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 460px);
    gap: 28px;
    align-items: center;
    padding: 28px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
}

.home-search-inner h2,
.section-title h2,
.rank-panel h2,
.text-panel h2,
.player-section h2,
.side-card h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.25;
}

.home-search-inner p {
    margin: 10px 0 0;
    color: var(--gray-600);
}

.home-search-form {
    display: flex;
    gap: 10px;
}

.home-search-form input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--gray-300);
    border-radius: 14px;
    background: var(--white);
    color: var(--gray-900);
    padding: 0 16px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.home-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--sky-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.home-search-form button {
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    color: var(--white);
    background: var(--sky-600);
    font-weight: 800;
    cursor: pointer;
}

.section-wrap {
    padding: 72px 0 0;
}

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

.inner-title {
    margin-top: 44px;
}

.section-link {
    color: var(--sky-700);
    font-weight: 800;
}

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

.category-card,
.category-overview-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card {
    padding: 22px;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.category-card span,
.category-overview-main span {
    color: var(--sky-700);
    font-size: 0.84rem;
    font-weight: 800;
}

.category-card strong,
.category-overview-main h2 {
    display: block;
    margin: 8px 0;
    color: var(--gray-900);
    font-size: 1.25rem;
}

.category-card p,
.category-overview-main p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

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

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

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

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

.movie-card-featured {
    grid-column: span 2;
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--sky-100), var(--gray-200));
}

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent 55%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .movie-poster::after {
    opacity: 1;
}

.poster-year,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-year {
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--white);
    background: var(--sky-600);
    font-size: 0.8rem;
    font-weight: 800;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--sky-700);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-line {
    display: flex;
    gap: 8px;
    color: var(--gray-500);
    font-size: 0.82rem;
    font-weight: 700;
}

.movie-meta-line span + span::before {
    content: "·";
    margin-right: 8px;
    color: var(--gray-300);
}

.movie-card h3 {
    margin: 6px 0 8px;
    color: var(--gray-900);
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info a:hover,
.side-card a:hover,
.category-overview-card a:hover {
    color: var(--sky-700);
}

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

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

.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--sky-700);
    background: var(--sky-100);
    font-size: 0.78rem;
    font-weight: 800;
}

.rank-panel,
.filter-panel,
.text-panel,
.player-section,
.side-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.rank-panel {
    padding: 22px;
}

.rank-panel ol {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.rank-number {
    color: var(--sky-700);
    font-size: 1.15rem;
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 10;
    background: var(--sky-100);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info a {
    display: block;
    overflow: hidden;
    color: var(--gray-900);
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info p {
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--gray-500);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.2), transparent 25%),
        linear-gradient(135deg, var(--sky-600), var(--blue-700));
}

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

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

.page-hero p {
    max-width: 720px;
    margin: 16px 0 0;
    color: var(--sky-50);
    font-size: 1.1rem;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px 180px;
    gap: 16px;
    align-items: end;
}

.filter-grid label span {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 800;
}

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

.category-overview-card {
    padding: 24px;
}

.category-overview-card ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    margin: 20px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--gray-200);
    list-style: none;
}

.category-overview-card li {
    overflow: hidden;
    color: var(--gray-600);
    font-size: 0.94rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
}

.sticky-panel {
    position: sticky;
    top: 96px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    background: var(--gray-900);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.6;
    filter: saturate(1.05);
}

.detail-mask {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.72) 55%, rgba(2, 6, 23, 0.3)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 45%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    min-height: 560px;
    padding: 56px 0;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    aspect-ratio: 3 / 4;
    background: var(--gray-800);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 0.92rem;
}

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

.detail-info {
    color: var(--white);
}

.detail-one-line {
    max-width: 780px;
    margin: 20px 0 0;
    color: #e5e7eb;
    font-size: 1.15rem;
}

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

.player-section,
.text-panel,
.side-card {
    padding: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    border-radius: 20px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    background:
        radial-gradient(circle at 50% 45%, rgba(14, 165, 233, 0.28), transparent 28%),
        rgba(2, 6, 23, 0.35);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
}

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--sky-700);
    background: rgba(255, 255, 255, 0.94);
    font-size: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 14px;
    z-index: 4;
    min-height: 24px;
    color: #dbeafe;
    font-size: 0.9rem;
}

.text-panel {
    margin-top: 24px;
}

.text-panel p {
    margin: 14px 0 0;
    color: var(--gray-700);
    font-size: 1.02rem;
}

.detail-sidebar {
    display: grid;
    gap: 18px;
    align-content: start;
    position: sticky;
    top: 96px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 18px 0 0;
}

.side-card dt {
    color: var(--gray-500);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: var(--gray-800);
}

.side-links {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.side-links a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--sky-700);
    background: var(--sky-50);
    font-weight: 800;
}

.site-footer {
    margin-top: 86px;
    color: var(--gray-300);
    background: var(--gray-900);
}

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

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

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

.site-footer p {
    margin: 14px 0 0;
    color: var(--gray-300);
    font-size: 0.94rem;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: var(--sky-500);
}

.footer-bottom {
    padding: 22px 0;
    border-top: 1px solid var(--gray-800);
    color: var(--gray-500);
    font-size: 0.92rem;
}

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

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

    .sticky-panel,
    .detail-sidebar {
        position: static;
    }

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

@media (max-width: 860px) {
    .nav-wrap {
        height: auto;
        min-height: 66px;
        align-items: flex-start;
        padding: 14px 0;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 8px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero-carousel,
    .hero-content {
        min-height: 560px;
    }

    .hero-control {
        display: none;
    }

    .home-search-inner {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .detail-cover {
        max-width: 340px;
    }

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

@media (max-width: 620px) {
    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.25rem;
    }

    .hero-actions,
    .detail-actions,
    .home-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .category-grid,
    .movie-grid,
    .movie-grid.compact,
    .related-grid,
    .filter-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-featured {
        grid-column: span 1;
    }

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

    .rank-item {
        grid-template-columns: 38px 66px minmax(0, 1fr);
    }

    .player-section,
    .text-panel,
    .side-card,
    .filter-panel,
    .rank-panel {
        padding: 18px;
    }
}
