:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-100: #f1f5f9;
    --sky-700: #0369a1;
    --sky-600: #0284c7;
    --sky-500: #0ea5e9;
    --sky-400: #38bdf8;
    --amber-500: #f59e0b;
    --rose-500: #f43f5e;
    --white: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --card: #ffffff;
    --line: #e5e7eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 30px 70px rgba(15, 23, 42, 0.22);
}

* {
    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);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    line-height: 1.6;
}

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: linear-gradient(90deg, var(--slate-900), var(--slate-700), var(--slate-900));
    color: var(--white);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
    box-shadow: 0 10px 22px rgba(14, 165, 233, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 3px;
    color: #bae6fd;
    font-size: 12px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-link {
    white-space: nowrap;
    padding: 9px 13px;
    border-radius: 9px;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    border: 0;
    color: var(--white);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-track {
    position: relative;
    min-height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    width: 100%;
    height: 600px;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.66) 46%, rgba(15, 23, 42, 0.16) 100%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(28px, calc((100vw - 1240px) / 2));
    transform: translateY(-50%);
    width: min(660px, calc(100% - 56px));
    color: var(--white);
}

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: var(--sky-400);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h2 + p,
.hero-content h1 + h2 + p {
    margin-top: 0;
}

.hero-content p:not(.hero-kicker) {
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
    box-shadow: 0 16px 32px rgba(14, 165, 233, 0.28);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(10px);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 34px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--sky-400);
}

.section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.section-white,
.section-soft {
    width: 100%;
    padding-left: max(16px, calc((100vw - 1240px) / 2));
    padding-right: max(16px, calc((100vw - 1240px) / 2));
}

.section-white {
    background: var(--white);
}

.section-soft {
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

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

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

.section-tools {
    display: flex;
    gap: 10px;
}

.section-tools button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #eef2f7;
    color: var(--slate-800);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

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

.card-strip {
    display: flex;
    gap: 22px;
    padding-bottom: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.card-strip::-webkit-scrollbar {
    display: none;
}

.card-strip .movie-card {
    flex: 0 0 310px;
}

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

.featured-grid,
.recommend-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.rank-and-recommend {
    display: grid;
    grid-template-columns: 0.95fr 1.45fr;
    gap: 28px;
    align-items: start;
}

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-poster {
    position: relative;
    display: block;
    height: 245px;
    overflow: hidden;
    background: var(--slate-800);
}

.movie-card-wide .movie-poster {
    height: 300px;
}

.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(180deg, transparent 42%, rgba(2, 6, 23, 0.74) 100%);
}

.poster-region,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 14px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
}

.poster-region {
    left: 14px;
    padding: 8px 11px;
    background: var(--sky-600);
}

.rank-badge {
    right: 14px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--amber-500);
}

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

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--sky-700);
}

.movie-one-line {
    min-height: 48px;
    margin: 0 0 13px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--sky-700);
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 700;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.category-chips a {
    display: inline-flex;
    padding: 11px 18px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
    font-weight: 800;
    box-shadow: 0 14px 24px rgba(14, 165, 233, 0.20);
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
    align-items: end;
    margin: 0 0 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #f8fafc;
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: var(--white);
    color: var(--text);
    padding: 0 13px;
    outline: none;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px 14px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.rank-item:hover {
    color: var(--sky-700);
}

.rank-item span {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--slate-800);
    font-weight: 900;
}

.rank-item strong,
.rank-item em {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-item em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    position: relative;
    padding: 76px max(16px, calc((100vw - 1240px) / 2));
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.28), transparent 34%), linear-gradient(135deg, var(--slate-900), var(--slate-700));
    overflow: hidden;
}

.compact-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
}

.compact-hero p:not(.section-kicker) {
    max-width: 780px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
}

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

.category-panel {
    display: flex;
    min-height: 310px;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: var(--shadow);
}

.category-panel h2 {
    margin: 0;
    font-size: 24px;
}

.category-panel p {
    margin: 0;
    color: #475569;
}

.category-sample {
    display: grid;
    gap: 7px;
    margin-top: auto;
}

.category-sample a {
    color: var(--sky-700);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.detail-hero {
    position: relative;
    color: var(--white);
    overflow: hidden;
    background: var(--slate-950);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(4px);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.76));
}

.detail-wrap {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow-strong);
}

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

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 800px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.28);
}

.detail-tags span {
    background: rgba(224, 242, 254, 0.16);
    color: #bae6fd;
}

.detail-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: min(1120px, 100%);
    margin: 0 auto;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow-strong);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.30), rgba(2, 6, 23, 0.78));
    cursor: pointer;
    transition: opacity 0.25s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
    box-shadow: 0 20px 45px rgba(14, 165, 233, 0.35);
    font-size: 34px;
}

.player-cover strong {
    max-width: min(700px, 92%);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: clamp(20px, 4vw, 34px);
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: none;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--white);
    background: rgba(244, 63, 94, 0.88);
    text-align: center;
    font-weight: 700;
}

.player-message.is-visible {
    display: block;
}

.article-section {
    display: grid;
    gap: 22px;
}

.text-panel {
    width: min(980px, 100%);
    margin: 0 auto;
    padding: 30px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.text-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.text-panel h2 + p {
    margin-top: 0;
}

.text-panel p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.pager-links {
    width: min(980px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.pager-links a {
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--sky-700);
    background: var(--white);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.empty-state {
    display: none;
    margin: 24px 0 0;
    padding: 18px;
    border-radius: 16px;
    color: var(--muted);
    background: #f8fafc;
    text-align: center;
    font-weight: 700;
}

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

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

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

.footer-inner h2 {
    margin: 0 0 10px;
    color: var(--white);
}

.footer-inner p {
    max-width: 720px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: start;
}

.footer-links a:hover {
    color: var(--sky-400);
}

.footer-copy {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

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

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

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

@media (max-width: 760px) {
    .site-nav {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 11px 0;
    }

    .brand {
        min-width: auto;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

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

    .nav-link {
        padding: 11px 12px;
    }

    .hero-carousel,
    .hero-track,
    .hero-bg {
        min-height: 540px;
        height: 540px;
    }

    .hero-content {
        top: auto;
        bottom: 70px;
        transform: none;
    }

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

    .movie-grid,
    .featured-grid,
    .recommend-list,
    .rank-and-recommend,
    .category-grid,
    .detail-grid,
    .footer-inner,
    .pager-links {
        grid-template-columns: 1fr;
    }

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

    .detail-grid {
        gap: 22px;
    }

    .detail-poster {
        max-width: 260px;
    }

    .detail-wrap {
        padding-top: 24px;
    }

    .movie-poster,
    .movie-card-wide .movie-poster {
        height: 230px;
    }

    .section-white,
    .section-soft,
    .section {
        padding-top: 44px;
        padding-bottom: 44px;
    }
}
