* {
    box-sizing: border-box;
}

:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --yellow-400: #facc15;
    --orange-500: #f97316;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.13);
    --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.22);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--slate-50);
    color: var(--slate-900);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78));
    backdrop-filter: blur(14px);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled,
.site-header.nav-open {
    color: var(--slate-900);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--blue-600);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

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

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

.brand-text small {
    margin-top: 3px;
    color: currentColor;
    opacity: 0.72;
    font-size: 13px;
    font-weight: 600;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 4px;
    color: currentColor;
    opacity: 0.86;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--blue-500);
    opacity: 1;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    color: currentColor;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 999px;
}

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.3));
    z-index: 1;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 180px;
    background: linear-gradient(180deg, transparent, var(--slate-50));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 70px;
}

.hero-copy {
    width: min(680px, 100%);
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--yellow-400);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    font-size: clamp(30px, 5vw, 56px);
}

.hero-copy p {
    margin: 0 0 24px;
    color: var(--slate-200);
    font-size: 18px;
    max-width: 640px;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(37, 99, 235, 0.92);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
}

.pill.is-muted {
    background: rgba(51, 65, 85, 0.88);
}

.hero-actions,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    padding: 0 20px;
    background: var(--blue-600);
    color: var(--white);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--blue-700);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.32);
}

.btn.is-ghost {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 28px;
    line-height: 1;
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
    transform: translateY(-50%);
}

.hero-next {
    right: 24px;
    transform: translateY(-50%);
}

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

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

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

main.subpage-main {
    padding-top: 102px;
}

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

.section {
    padding: 58px 0;
}

.section.is-tight {
    padding-top: 30px;
}

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

.section-heading h2,
.page-heading h1,
.detail-copy h1 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
    margin: 10px 0 0;
    color: var(--slate-600);
    max-width: 760px;
}

.section-more {
    flex: 0 0 auto;
    color: var(--blue-600);
    font-weight: 800;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--slate-200);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.66));
}

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

.movie-body {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 16px;
}

.movie-body strong {
    color: var(--slate-900);
    font-size: 17px;
    line-height: 1.35;
}

.movie-body small {
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 700;
}

.movie-body em {
    min-height: 43px;
    color: var(--slate-600);
    font-size: 13px;
    font-style: normal;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tag-row span {
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--slate-100);
    color: var(--slate-600);
    font-size: 12px;
    font-weight: 700;
}

.search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.search-box input,
.search-box select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--slate-800);
    background: var(--white);
    outline: none;
}

.search-box input:focus,
.search-box select:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

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

.category-card {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--blue-600));
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -54px;
    bottom: -60px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 18px;
    font-weight: 800;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 50px;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.35), transparent 32%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
    color: var(--white);
}

.page-heading h1,
.page-heading p {
    color: var(--white);
}

.page-heading p {
    color: var(--slate-300);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--slate-300);
    font-size: 14px;
    font-weight: 700;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 86px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.rank-no {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: var(--blue-600);
    font-weight: 900;
}

.rank-cover {
    width: 86px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: var(--slate-200);
}

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

.rank-info strong {
    display: block;
    margin-bottom: 6px;
    color: var(--slate-900);
    font-size: 17px;
}

.rank-info small,
.rank-info p {
    display: block;
    margin: 0;
    color: var(--slate-500);
    font-size: 13px;
}

.detail-hero {
    padding: 92px 0 58px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    background: var(--slate-800);
}

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

.detail-copy h1 {
    color: var(--white);
    font-size: clamp(34px, 5vw, 58px);
}

.detail-copy p {
    color: var(--slate-200);
    font-size: 17px;
}

.detail-meta {
    margin: 18px 0 20px;
}

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

.panel {
    border-radius: var(--radius-xl);
    background: var(--white);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.panel h2,
.panel h3 {
    margin: 0 0 14px;
    color: var(--slate-900);
}

.panel p {
    margin: 0 0 16px;
    color: var(--slate-700);
}

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

.info-list div {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--slate-100);
}

.info-list dt {
    color: var(--slate-500);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
    color: var(--slate-800);
}

.player-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--slate-950);
    box-shadow: var(--shadow-lg);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--slate-950);
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.player-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

.player-overlay[hidden] {
    display: none;
}

.play-button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 148px;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    background: var(--blue-600);
    color: var(--white);
    font-weight: 900;
    box-shadow: 0 18px 46px rgba(37, 99, 235, 0.42);
    cursor: pointer;
}

.play-button::before {
    content: "▶";
}

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

.empty-state {
    display: none;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--white);
    color: var(--slate-600);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

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

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

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

.footer-grid h3 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 16px;
}

.footer-grid p {
    margin: 10px 0 0;
    color: var(--slate-400);
}

.footer-grid a {
    display: block;
    margin: 7px 0;
    color: var(--slate-400);
    font-size: 14px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--slate-500);
    font-size: 13px;
}

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

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

@media (max-width: 860px) {
    .header-inner {
        height: 68px;
    }

    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 14px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.98);
        color: var(--slate-900);
        box-shadow: var(--shadow-md);
    }

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

    .nav-link {
        min-height: 42px;
        padding: 0 12px;
        border-radius: 12px;
    }

    .nav-link:hover,
    .nav-link.is-active {
        background: var(--slate-100);
    }

    .hero-carousel {
        height: 590px;
    }

    .hero-arrow {
        display: none;
    }

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

    .movie-grid,
    .movie-grid.is-wide,
    .category-grid,
    .rank-list,
    .related-grid,
    .footer-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

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

    .brand-text small {
        display: none;
    }

    .hero-content {
        padding-top: 54px;
    }

    .hero-copy p {
        font-size: 16px;
    }

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

    .movie-body {
        padding: 13px;
    }

    .movie-body em,
    .tag-row {
        display: none;
    }

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

    .rank-item {
        grid-template-columns: 44px 74px 1fr;
        gap: 12px;
    }

    .panel {
        padding: 22px;
    }
}

.quick-links {
    display: grid;
    gap: 10px;
    margin: 16px 0 20px;
}

.quick-links a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--slate-100);
    color: var(--slate-700);
    font-weight: 700;
}

.quick-links a:hover {
    color: var(--blue-600);
    background: rgba(59, 130, 246, 0.1);
}

.category-overview {
    display: flex;
    flex-direction: column;
}

.category-overview .btn {
    margin-top: auto;
}
