:root {
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #e5e7eb;
    --blue: #2563eb;
    --blue-strong: #1d4ed8;
    --blue-soft: #dbeafe;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "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;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 20px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 14px;
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.26);
}

.brand-title {
    display: block;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
}

.brand-subtitle {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    color: #334155;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--blue-strong);
    background: var(--blue-soft);
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: #334155;
    background: #f1f5f9;
    border: 0;
    border-radius: 12px;
}

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

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

.mobile-panel .nav-link {
    display: flex;
    margin: 6px 0;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.hero-track {
    position: absolute;
    inset: 0;
}

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

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

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

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.14)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.10));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    align-items: center;
    min-height: 72vh;
    padding: 76px 0 42px;
}

.hero-panel {
    position: relative;
    max-width: 720px;
    min-height: 440px;
}

.hero-copy {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.20);
    border: 1px solid rgba(191, 219, 254, 0.34);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(14px);
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 900;
    text-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.hero-desc {
    max-width: 650px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.4);
}

.btn-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(16px);
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.22);
}

.btn-ghost {
    color: #1d4ed8;
    background: #eff6ff;
}

.btn-ghost:hover {
    background: #dbeafe;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.meta-pill,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    color: #475569;
    background: #f1f5f9;
}

.hero .meta-pill,
.hero .tag {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(14px);
}

.hero-strip {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 24px;
    padding: 0 0 34px;
}

.hero-thumbs {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 58px minmax(140px, 1fr);
    align-items: center;
    gap: 10px;
    width: 238px;
    padding: 8px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    backdrop-filter: blur(18px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
    background: rgba(37, 99, 235, 0.50);
    transform: translateY(-2px);
}

.hero-thumb img {
    width: 58px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-thumb-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
}

.hero-thumb-meta {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
}

.hero-dots {
    display: inline-flex;
    gap: 8px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.32);
    border-radius: 999px;
    backdrop-filter: blur(16px);
}

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

.hero-dot.is-active {
    width: 30px;
    background: #ffffff;
}

.section {
    padding: 54px 0;
}

.section-tight {
    padding: 34px 0;
}

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

.section-title {
    margin: 0 0 6px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 900;
    color: #0f172a;
}

.section-desc {
    max-width: 720px;
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.grid {
    display: grid;
    gap: 20px;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.poster-wrap.wide {
    aspect-ratio: 16 / 9;
}

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

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

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.poster-year {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.86);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
}

.movie-body {
    padding: 15px;
}

.movie-title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    margin: 0 0 8px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 850;
    color: #0f172a;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 12px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #64748b;
    font-size: 13px;
}

.category-card {
    min-height: 210px;
    padding: 22px;
    background:
        radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.16), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.category-card p {
    margin: 0 0 20px;
    color: #64748b;
}

.filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 150px 150px;
    gap: 12px;
    margin: 0 0 24px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.search-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-input:focus,
.filter-select:focus {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.60);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 70px 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 18px;
    font-size: 20px;
    font-weight: 900;
}

.ranking-cover {
    overflow: hidden;
    width: 96px;
    height: 124px;
    border-radius: 14px;
    background: #e2e8f0;
}

.ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ranking-main h2,
.ranking-main h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 900;
}

.ranking-main p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 10px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #64748b;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--blue);
    font-weight: 700;
}

.detail-hero {
    padding: 34px 0 54px;
    background:
        radial-gradient(circle at 76% 20%, rgba(37, 99, 235, 0.18), transparent 30%),
        linear-gradient(180deg, #ffffff, #f8fafc);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    align-items: start;
    gap: 26px;
}

.player-shell {
    overflow: hidden;
    background: #020617;
    border-radius: 26px;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.24);
}

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

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.70));
    border: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-core {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 999px;
    box-shadow: 0 20px 34px rgba(37, 99, 235, 0.42);
}

.play-title {
    display: block;
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.detail-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.05em;
    font-weight: 950;
}

.detail-poster {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 20px;
    background: #e2e8f0;
}

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

.content-card {
    padding: 26px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.content-card p {
    margin: 0 0 16px;
    color: #334155;
    font-size: 16px;
}

.content-stack {
    display: grid;
    gap: 22px;
    margin-top: 26px;
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: #64748b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
}

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

.site-footer {
    margin-top: 40px;
    padding: 34px 0;
    color: #64748b;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

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

.footer-links a {
    color: #334155;
    font-weight: 700;
}

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

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

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

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

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

    .detail-card {
        order: -1;
    }

    .detail-poster img {
        max-height: 420px;
    }

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

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

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

    .brand-title {
        font-size: 18px;
    }

    .brand-subtitle {
        display: none;
    }

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

    .hero h1,
    .hero h2 {
        font-size: 38px;
    }

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

    .hero-dots {
        justify-self: start;
    }

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

    .section {
        padding: 40px 0;
    }

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

    .movie-body {
        padding: 12px;
    }

    .ranking-card {
        grid-template-columns: 48px 76px minmax(0, 1fr);
    }

    .rank-num {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 16px;
    }

    .ranking-cover {
        width: 76px;
        height: 98px;
    }

    .ranking-card .btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 440px) {
    .card-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }
}
