:root {
    --primary-900: #1e3a8a;
    --primary-800: #1e40af;
    --primary-700: #1d4ed8;
    --primary-600: #2563eb;
    --primary-100: #dbeafe;
    --secondary-700: #047857;
    --secondary-600: #059669;
    --accent-600: #b45309;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.14);
    --shadow-xl: 0 25px 60px rgba(15, 23, 42, 0.22);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-900);
    background: var(--slate-50);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-700), var(--secondary-600));
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.24);
    font-size: 14px;
}

.brand-text,
.footer-logo span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong,
.footer-logo strong {
    color: var(--primary-700);
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-text small,
.footer-logo small {
    color: var(--slate-500);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
    color: var(--slate-700);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--primary-700);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.top-search input,
.mobile-search input,
.search-panel input {
    border: 0;
    outline: 0;
    min-width: 190px;
    padding: 11px 14px;
    color: var(--slate-800);
    background: transparent;
}

.top-search button,
.mobile-search button,
.search-panel button {
    border: 0;
    padding: 11px 15px;
    color: var(--white);
    background: var(--primary-700);
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--primary-800);
    background: var(--primary-100);
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 20px;
}

.mobile-panel {
    display: none;
    padding: 16px;
    background: var(--white);
    border-top: 1px solid var(--slate-200);
}

.mobile-panel.open {
    display: grid;
    gap: 14px;
}

.hero {
    position: relative;
    color: var(--white);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-800), var(--primary-900) 48%, var(--secondary-700));
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.35;
}

.hero::before {
    width: 280px;
    height: 280px;
    right: 8%;
    top: 12%;
    background: rgba(255, 255, 255, 0.18);
}

.hero::after {
    width: 220px;
    height: 220px;
    left: 6%;
    bottom: 8%;
    background: rgba(5, 150, 105, 0.32);
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 64px 0 78px;
}

.hero-title {
    text-align: center;
    max-width: 840px;
    margin: 0 auto 38px;
}

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

.hero-title p {
    margin: 0;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 21px);
}

.hero-stage {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--slate-900);
}

.hero-slide {
    display: none;
    min-height: 510px;
    position: relative;
}

.hero-slide.active {
    display: block;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.55) 46%, rgba(2, 6, 23, 0.1)), linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 55%);
}

.hero-content {
    position: absolute;
    left: 42px;
    right: 42px;
    bottom: 42px;
    max-width: 680px;
}

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

.hero-content h2 {
    margin: 18px 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 20px;
    color: #e2e8f0;
    font-size: 17px;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--primary-800);
    background: var(--primary-100);
    font-size: 12px;
    font-weight: 700;
}

.hero-content .hero-tags span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 13px;
    padding: 0 18px;
    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(--primary-600), var(--secondary-600));
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.26);
}

.btn-light {
    color: var(--primary-900);
    background: rgba(255, 255, 255, 0.92);
}

.btn-ghost {
    color: var(--slate-700);
    background: var(--white);
    border: 1px solid var(--slate-200);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(37, 99, 235, 0.82);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    right: 26px;
    bottom: 26px;
    display: flex;
    gap: 8px;
}

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

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

.main-section {
    padding: 58px 0;
}

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

.section-head h2,
.page-lead h1,
.detail-title h1 {
    margin: 0;
    color: var(--slate-900);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

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

.section-head p,
.page-lead p,
.detail-title p {
    margin: 9px 0 0;
    color: var(--slate-600);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 172px;
    padding: 24px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-700), var(--secondary-700));
    box-shadow: var(--shadow-lg);
}

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

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-card span {
    color: #dbeafe;
    font-size: 14px;
}

.category-card:hover,
.movie-card:hover,
.rank-card:hover {
    transform: translateY(-5px);
}

.filter-bar,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--slate-200);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.filter-button {
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--slate-700);
    background: var(--white);
    cursor: pointer;
    font-weight: 700;
}

.filter-button.active,
.filter-button:hover {
    color: var(--white);
    border-color: var(--primary-700);
    background: var(--primary-700);
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow-xl);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate-200);
}

.movie-card.compact .poster-wrap {
    aspect-ratio: 4 / 3;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), transparent 58%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

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

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--white);
    background: rgba(37, 99, 235, 0.92);
    font-size: 12px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.movie-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 17px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-500);
    font-size: 12px;
}

.movie-meta em {
    font-style: normal;
}

.movie-info strong {
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.32;
}

.movie-line {
    color: var(--slate-600);
    font-size: 14px;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
}

.rank-feature {
    display: grid;
    gap: 16px;
}

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: transform 0.22s ease;
}

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

.rank-card div {
    padding: 16px 16px 16px 0;
}

.rank-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.rank-card p {
    margin: 0;
    color: var(--slate-600);
    font-size: 14px;
}

.rank-list {
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.rank-list a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid var(--slate-100);
}

.rank-list a:hover {
    color: var(--primary-700);
    background: #eff6ff;
}

.rank-list b,
.rank-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
}

.rank-mark {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
}

.page-hero {
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border-bottom: 1px solid var(--slate-200);
}

.page-lead {
    padding: 48px 0;
}

.page-lead h1 {
    font-size: clamp(30px, 4vw, 46px);
}

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

.breadcrumb a {
    color: var(--primary-700);
}

.detail-hero {
    padding: 46px 0;
    background: linear-gradient(135deg, #eff6ff, #f8fafc 52%, #f0fdf4);
    border-bottom: 1px solid var(--slate-200);
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow-xl);
    aspect-ratio: 16 / 10;
    background: var(--slate-200);
}

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

.detail-title h1 {
    font-size: clamp(32px, 5vw, 56px);
}

.detail-title .tag-row {
    margin-top: 18px;
}

.player-section {
    padding: 42px 0 28px;
    background: var(--slate-950);
}

.player-wrap {
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.5);
}

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

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

.play-cover {
    position: absolute;
    inset: 0;
    border: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-cover span {
    display: inline-grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 22px 48px rgba(37, 99, 235, 0.34);
    font-size: 28px;
}

.player-box.is-playing .play-cover {
    opacity: 0;
    pointer-events: none;
}

.detail-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
    gap: 24px;
    padding: 42px 0;
}

.copy-card {
    padding: 26px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

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

.copy-card p {
    margin: 0;
    color: var(--slate-700);
}

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--slate-100);
}

.info-list span {
    color: var(--slate-500);
}

.related-section {
    padding: 0 0 58px;
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 18px;
    color: var(--slate-600);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.empty-state.show {
    display: block;
}

.site-footer {
    color: #cbd5e1;
    background: var(--slate-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.7fr 0.8fr;
    gap: 40px;
    padding: 48px 0;
}

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

.footer-logo small,
.footer-brand p,
.site-footer a {
    color: #94a3b8;
}

.footer-brand p {
    max-width: 480px;
}

.site-footer h3 {
    margin: 0 0 16px;
    color: var(--white);
}

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

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

.footer-bottom {
    padding: 18px 16px;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

@media (max-width: 1020px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
    }

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

    .rank-layout,
    .detail-copy,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        align-items: stretch;
    }
}

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

    .brand-text small {
        display: none;
    }

    .hero-inner {
        padding: 42px 0 54px;
    }

    .hero-slide,
    .hero-slide img {
        min-height: 520px;
        height: 520px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 24px;
    }

    .hero-control {
        display: none;
    }

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

    .section-head {
        display: block;
    }

    .rank-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .rank-card img {
        height: 116px;
    }
}

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

    .brand-icon {
        width: 34px;
        height: 34px;
    }

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

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

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

    .page-lead,
    .detail-hero {
        padding: 34px 0;
    }

    .copy-card {
        padding: 20px;
    }
}
