:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-100: #dbeafe;
    --amber-400: #fbbf24;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow-soft: 0 20px 60px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, var(--slate-950), var(--slate-900));
    color: var(--white);
    box-shadow: 0 12px 35px rgba(2, 6, 23, 0.25);
}

.nav-shell {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-600);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

.site-logo strong,
.site-logo em {
    display: block;
}

.site-logo strong {
    font-size: 22px;
    line-height: 1.1;
}

.site-logo em {
    margin-top: 3px;
    font-size: 12px;
    color: #94a3b8;
    font-style: normal;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #cbd5e1;
    font-weight: 600;
}

.site-nav a {
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 660px;
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.35), transparent 34%), linear-gradient(135deg, var(--slate-950), #172554 48%, var(--slate-900));
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.55fr);
    align-items: center;
    gap: 46px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 86px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hero-backdrop,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    filter: blur(4px) saturate(1.15);
}

.hero-content,
.hero-poster,
.detail-hero-content {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #bfdbfe;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.hero-content h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(24px, 3vw, 42px);
    color: #dbeafe;
}

.hero-content p:not(.eyebrow) {
    max-width: 720px;
    margin: 0 0 22px;
    color: #dbe4f0;
    font-size: 18px;
}

.hero-tags,
.tag-cloud,
.movie-mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-cloud span,
.movie-mini-tags {
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.13);
    color: #e2e8f0;
    font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.section-link,
.home-search-form button,
.search-clear,
.filter-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
    min-height: 52px;
    padding: 0 24px;
    color: var(--white);
    background: var(--blue-600);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover,
.home-search-form button:hover {
    transform: translateY(-2px);
    background: var(--blue-700);
}

.btn-ghost {
    min-height: 52px;
    padding: 0 22px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.hero-poster {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    transform: rotate(2deg);
}

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

.hero-poster span {
    display: block;
    padding: 18px 22px;
    background: rgba(15, 23, 42, 0.82);
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px !important;
    height: 12px !important;
    padding: 0;
    background: rgba(255, 255, 255, 0.34) !important;
}

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

.home-search {
    margin-top: -36px;
    position: relative;
    z-index: 10;
}

.home-search-form,
.search-panel,
.feature-grid article,
.movie-card,
.category-card,
.rank-panel,
.player-card,
.detail-article,
.info-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-card);
}

.home-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: 24px;
    border-radius: var(--radius-xl);
}

.home-search-form label,
.search-label {
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 700;
}

.home-search-form input,
.search-label input {
    width: 100%;
    min-height: 52px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 16px;
    outline: none;
    color: var(--text-main);
    background: var(--white);
}

.search-label {
    position: relative;
    display: block;
    flex: 1;
}

.search-label span {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
}

.search-label input {
    padding-left: 46px;
}

.home-search-form button {
    min-height: 52px;
    padding: 0 24px;
    color: var(--white);
    background: var(--blue-600);
}

.feature-strip,
.section-block {
    padding: 72px 0;
}

.bg-soft {
    background: var(--slate-100);
}

.feature-grid,
.category-grid,
.movie-grid {
    display: grid;
    gap: 20px;
}

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

.feature-grid article {
    border-radius: var(--radius-lg);
    padding: 26px;
}

.feature-grid span {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--blue-700);
    background: var(--blue-100);
    font-size: 24px;
    font-weight: 900;
}

.feature-grid h2,
.feature-grid p,
.section-heading h2,
.section-heading p {
    margin: 0;
}

.feature-grid h2 {
    margin-top: 18px;
    font-size: 20px;
}

.feature-grid p {
    margin-top: 8px;
    color: var(--text-muted);
}

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

.section-heading h2 {
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.section-heading p {
    margin-top: 8px;
    color: var(--text-muted);
}

.section-heading.compact h2 {
    font-size: 26px;
}

.section-link {
    color: var(--blue-700);
    white-space: nowrap;
}

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

.category-card {
    display: grid;
    gap: 10px;
    border-radius: var(--radius-lg);
    padding: 24px;
    min-height: 160px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--blue-700));
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
    color: #bfdbfe;
    font-weight: 800;
}

.category-card strong {
    font-size: 15px;
    color: #e2e8f0;
    font-weight: 600;
}

.category-card.large {
    min-height: 210px;
}

.category-card em {
    align-self: end;
    color: var(--white);
    font-style: normal;
    font-weight: 800;
}

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

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

.poster-wrap {
    position: relative;
    overflow: hidden;
    display: block;
    background: #dbe4f0;
    aspect-ratio: 3 / 4;
}

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

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

.poster-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: rgba(2, 6, 23, 0.46);
    transition: opacity 0.2s ease;
}

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

.play-mark {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue-600);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.35);
}

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(37, 99, 235, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    display: grid;
    gap: 8px;
    padding: 14px;
    flex: 1;
}

.movie-card-top,
.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-muted);
    font-size: 12px;
}

.movie-card strong {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-mini-tags {
    gap: 5px;
    padding: 0;
    color: var(--blue-700);
    background: transparent;
    font-size: 12px;
}

.split-section,
.ranking-layout,
.detail-layout {
    display: grid;
    align-items: start;
    gap: 28px;
}

.split-section {
    grid-template-columns: minmax(0, 1fr) 340px;
}

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

.rank-panel {
    border-radius: var(--radius-xl);
    padding: 22px;
}

.sticky-rank {
    position: sticky;
    top: 94px;
}

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

.rank-list.long {
    max-height: 760px;
    overflow: auto;
    padding-right: 4px;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: var(--slate-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: var(--blue-100);
    transform: translateX(3px);
}

.rank-number {
    color: var(--blue-700);
    font-weight: 900;
}

.rank-item img {
    width: 54px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-item strong,
.rank-item em {
    display: block;
}

.rank-item strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-item em {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-950), #1e3a8a, var(--slate-900));
}

.page-hero {
    padding: 76px 0;
}

.page-hero h1,
.detail-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.15;
}

.page-hero p:not(.eyebrow),
.detail-hero p:not(.eyebrow) {
    max-width: 820px;
    margin: 16px 0 0;
    color: #dbe4f0;
    font-size: 18px;
}

.search-panel {
    margin-bottom: 28px;
    padding: 22px;
    border-radius: var(--radius-lg);
}

.search-panel-compact {
    box-shadow: none;
}

.search-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-clear,
.filter-buttons button {
    min-height: 48px;
    padding: 0 18px;
    color: var(--text-main);
    background: var(--slate-100);
}

.search-clear:hover,
.filter-buttons button:hover,
.filter-buttons button.is-active {
    color: var(--white);
    background: var(--blue-600);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.search-empty {
    margin: 16px 0 0;
    color: var(--text-muted);
}

.detail-hero {
    min-height: 430px;
}

.detail-hero::after,
.hero-slider::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.42));
    pointer-events: none;
}

.detail-hero-content {
    padding: 76px 0 80px;
}

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

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

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

.player-card,
.detail-article,
.info-card {
    border-radius: var(--radius-xl);
}

.player-card {
    overflow: hidden;
}

.movie-player {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.75));
    cursor: pointer;
}

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

.big-play {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--blue-600);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.38);
    font-size: 30px;
}

.detail-article {
    margin-top: 24px;
    padding: 30px;
}

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

.detail-article h2:first-child {
    margin-top: 0;
}

.detail-article p {
    margin: 0 0 14px;
    color: #334155;
    font-size: 17px;
}

.detail-side {
    display: grid;
    gap: 18px;
}

.detail-poster {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.info-card {
    padding: 22px;
}

.info-card h2 {
    margin: 0 0 16px;
}

.info-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

.info-card dt {
    color: var(--text-muted);
    font-weight: 700;
}

.info-card dd {
    margin: 0;
}

.tag-cloud span {
    color: var(--blue-700);
    background: var(--blue-100);
    font-weight: 700;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0;
}

.footer-grid h2,
.footer-grid h3,
.footer-grid p,
.footer-grid ul {
    margin: 0;
}

.footer-grid h2,
.footer-grid h3 {
    color: var(--white);
}

.footer-grid p {
    margin-top: 12px;
    color: #94a3b8;
}

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

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

.footer-tags {
    line-height: 1.9;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
}

.footer-bottom button {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    color: var(--white);
    background: var(--slate-800);
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

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

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

@media (max-width: 960px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border-radius: 18px;
        background: var(--slate-900);
        box-shadow: var(--shadow-soft);
    }

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

    .site-nav a {
        padding: 14px 12px;
        border-radius: 12px;
    }

    .site-nav a:hover {
        background: var(--slate-800);
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 720px;
        gap: 30px;
        padding-top: 70px;
    }

    .hero-poster {
        width: min(300px, 74vw);
        margin: 0 auto;
    }

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

    .split-section,
    .ranking-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .sticky-rank {
        position: static;
    }

    .detail-side {
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

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

    .site-logo strong {
        font-size: 18px;
    }

    .site-logo em {
        display: none;
    }

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

    .hero-content p:not(.eyebrow),
    .page-hero p:not(.eyebrow),
    .detail-hero p:not(.eyebrow) {
        font-size: 16px;
    }

    .hero-actions,
    .home-search-form,
    .search-row,
    .section-heading,
    .footer-bottom {
        flex-direction: column;
        align-items: stretch;
    }

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

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

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

    .section-block,
    .feature-strip {
        padding: 48px 0;
    }

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

    .detail-article {
        padding: 22px;
    }

    .info-card dl {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
