:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --red: #dc2626;
    --slate: #0f172a;
    --gray: #64748b;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f8fafc;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 20px;
}

* {
    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: #111827;
    background: #f8fafc;
    line-height: 1.65;
}

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

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

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

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: #111827;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.mobile-link {
    font-weight: 650;
    color: #334155;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--blue);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: #f1f5f9;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #334155;
}

.mobile-nav {
    display: none;
    padding: 12px 24px 18px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.mobile-nav.open {
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, #172554, #0f172a);
}

.hero-title-card {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: min(1180px, calc(100% - 40px));
    padding: 18px 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.36);
    color: #fff;
    backdrop-filter: blur(18px);
}

.hero-title-card h1 {
    margin: 0 0 6px;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.15;
}

.hero-title-card p {
    margin: 0;
    color: rgba(226, 232, 240, 0.92);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.2));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%);
    z-index: 3;
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
    color: #fff;
}

.hero-content h2 {
    margin: 0 0 16px;
    max-width: 780px;
    font-size: clamp(34px, 5.5vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 18px;
    font-size: 18px;
    color: #e5e7eb;
}

.hero-kickers,
.detail-meta,
.meta-line,
.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-kickers span,
.tag-list span,
.hero-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    font-weight: 700;
}

.hero-kickers span:first-child {
    background: var(--red);
    color: #fff;
}

.hero-kickers span:not(:first-child),
.hero-tags span {
    background: rgba(37, 99, 235, 0.86);
    color: #fff;
}

.hero-tags {
    margin-bottom: 22px;
}

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

.primary-btn,
.ghost-btn,
.search-box button,
.text-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
    padding: 13px 25px;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

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

.ghost-btn {
    padding: 12px 22px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #fff;
    background: rgba(15, 23, 42, 0.28);
}

.ghost-btn.dark {
    border-color: rgba(148, 163, 184, 0.34);
    color: #fff;
    background: rgba(15, 23, 42, 0.42);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    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.active {
    width: 34px;
    background: #fff;
}

.home-search-panel {
    position: relative;
    z-index: 10;
    max-width: 1180px;
    margin: -38px auto 0;
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-box input,
.inline-search input {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    padding: 14px 18px;
    font-size: 16px;
    outline: none;
    background: #f8fafc;
}

.search-box input:focus,
.inline-search input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.search-box button {
    border: 0;
    padding: 0 24px;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
}

.quick-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-links a,
.filter-link,
.filter-buttons button {
    border-radius: 999px;
    padding: 10px 15px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.page-container,
.detail-container {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
}

.home-container {
    padding: 60px 0 80px;
}

.content-section {
    margin: 0 0 64px;
}

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

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

.section-head p {
    margin: 7px 0 0;
    color: var(--gray);
}

.section-more,
.text-arrow {
    color: var(--blue);
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    color: #fff;
}

.score-badge {
    right: 12px;
    bottom: 12px;
    min-width: 44px;
    height: 28px;
    background: rgba(0, 0, 0, 0.78);
}

.rank-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    background: var(--red);
}

.card-body {
    padding: 17px;
}

.card-body h2 {
    margin: 0 0 8px;
    min-height: 52px;
    font-size: 18px;
    line-height: 1.45;
}

.card-body h2 a:hover,
.movie-list-item h2 a:hover {
    color: var(--blue);
}

.card-body p {
    margin: 0 0 14px;
    min-height: 48px;
    color: var(--gray);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line {
    color: #64748b;
    font-size: 13px;
}

.meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 10px;
    color: #cbd5e1;
}

.tag-list {
    margin-top: 12px;
}

.tag-list span {
    color: #1d4ed8;
    background: #eff6ff;
}

.category-panel {
    padding: 36px;
    border-radius: 28px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.category-card {
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    background: var(--blue);
    color: #fff;
}

.category-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    font-weight: 900;
}

.category-card strong,
.category-card em {
    display: block;
}

.category-card em {
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
    font-style: normal;
}

.category-card:hover em {
    color: #dbeafe;
}

.movie-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.rail-cell {
    width: 320px;
    flex: 0 0 auto;
}

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

.movie-list-item {
    display: grid;
    grid-template-columns: auto 150px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.list-thumb {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

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

.list-info h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.list-info p {
    margin: 0 0 8px;
    color: var(--gray);
}

.list-rank,
.list-dot {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.list-dot {
    width: 12px;
    height: 12px;
    background: #2563eb;
}

.page-hero {
    margin: 34px 0 36px;
    min-height: 320px;
    border-radius: 30px;
    padding: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.9), transparent 34%), linear-gradient(135deg, #0f172a, #1d4ed8);
    box-shadow: var(--shadow);
}

.compact-hero {
    min-height: 240px;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filter-panel {
    margin-bottom: 32px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 16px;
}

.filter-links,
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-link.active,
.filter-buttons button.active,
.filter-buttons button:hover {
    background: var(--blue);
    color: #fff;
}

.filter-buttons button {
    border: 0;
    cursor: pointer;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.category-cover-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-cover-grid img {
    width: 100%;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-overview-card p {
    margin: 0 0 12px;
    color: var(--gray);
}

.detail-page {
    background: #f8fafc;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: end;
    color: #fff;
    background-image: var(--detail-bg);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.35));
    backdrop-filter: blur(2px);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
    padding: 110px 0 58px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 38px;
    align-items: end;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 30px 65px rgba(0, 0, 0, 0.38);
    background: #0f172a;
}

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

.detail-score {
    right: 16px;
    bottom: 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    color: #bfdbfe;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 5vw, 72px);
    line-height: 1.05;
}

.lead-text {
    max-width: 850px;
    margin: 0 0 18px;
    color: #e5e7eb;
    font-size: 19px;
}

.detail-meta {
    margin-bottom: 18px;
    color: #dbeafe;
}

.detail-meta span {
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.detail-tags span {
    color: #fff;
    background: rgba(37, 99, 235, 0.72);
}

.detail-container {
    padding: 44px 0 86px;
}

.player-section,
.detail-content,
.related-section {
    margin-bottom: 44px;
}

.player-section h2,
.detail-content h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

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

.play-circle {
    display: inline-grid;
    place-items: center;
    width: 88px;
    height: 88px;
    padding-left: 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    font-size: 42px;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.38);
}

.play-label {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    font-weight: 900;
}

.detail-content {
    padding: 32px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

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

.info-grid div {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.info-grid strong,
.info-grid span {
    display: block;
}

.info-grid strong {
    margin-bottom: 4px;
    color: #64748b;
    font-size: 13px;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
    padding: 52px 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: #fff;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.site-footer p,
.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer li {
    margin-bottom: 8px;
}

.footer-bottom {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    color: #94a3b8;
}

[data-card].hidden {
    display: none;
}

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

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

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

    .menu-toggle {
        display: flex;
    }

    .hero {
        min-height: 650px;
    }

    .hero-title-card {
        top: 18px;
    }

    .hero-content {
        bottom: 86px;
    }

    .hero-arrow {
        display: none;
    }

    .home-search-panel {
        width: calc(100% - 32px);
        grid-template-columns: 1fr;
    }

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

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

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .movie-list-item {
        grid-template-columns: auto 120px 1fr;
    }

    .movie-list-item .text-arrow {
        display: none;
    }

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

    .detail-poster {
        width: 240px;
    }

    .info-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .header-inner {
        padding: 0 16px;
    }

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

    .hero-title-card,
    .hero-content,
    .page-container,
    .detail-container,
    .detail-hero-inner,
    .footer-inner,
    .footer-bottom {
        width: calc(100% - 28px);
    }

    .hero-content h2 {
        font-size: 36px;
    }

    .page-hero {
        padding: 34px 24px;
        border-radius: 24px;
    }

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

    .movie-list-item {
        grid-template-columns: 86px 1fr;
        gap: 12px;
    }

    .list-rank,
    .list-dot {
        display: none;
    }

    .list-thumb {
        grid-row: span 2;
    }

    .card-body h2,
    .card-body p {
        min-height: auto;
    }

    .category-panel,
    .detail-content {
        padding: 22px;
    }

    .detail-poster {
        width: 190px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 34px;
    }
}
