* {
    box-sizing: border-box;
}

:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --dark: #0f172a;
    --soft: #f1f5f9;
    --muted: #64748b;
    --text: #111827;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: #f8fafc;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.desktop-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
    font-size: 15px;
}

.desktop-links a,
.mobile-links a {
    opacity: 0.94;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-links a:hover,
.mobile-links a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 22px;
}

.mobile-links {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 24px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-links.is-open {
    display: grid;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(120deg, #1d4ed8, #06b6d4);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    transition: opacity 0.65s ease, transform 0.85s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 20%, rgba(6, 182, 212, 0.42), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(37, 99, 235, 0.60), rgba(14, 165, 233, 0.20)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.66), transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 760px;
    padding: 110px 24px 180px;
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #38bdf8;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
}

.hero h1 {
    margin: 14px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 0;
    max-width: 680px;
    color: #dbeafe;
    font-size: clamp(18px, 2.3vw, 26px);
    line-height: 1.58;
}

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

.hero-tags {
    margin: 28px 0;
}

.hero-tags span,
.detail-meta span,
.movie-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

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

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

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

.btn-light {
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(255, 255, 255, 0.18);
}

.btn-outline {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.hero-panel {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 84px;
    z-index: 4;
    display: flex;
    gap: 16px;
}

.hero-panel-card {
    min-width: 150px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-panel-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 5px;
}

.hero-panel-card span {
    color: #dbeafe;
    font-size: 13px;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 112px;
    display: flex;
    gap: 10px;
}

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

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

.hero-search {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 30px;
    width: min(760px, calc(100vw - 48px));
    display: flex;
    transform: translateX(-50%);
    border-radius: 999px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

.hero-search input,
.inline-filter input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 16px;
    padding: 0 18px;
    color: #0f172a;
}

.hero-search button,
.inline-filter button {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 800;
    white-space: nowrap;
}

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 76px 24px;
}

.white-section {
    background: #ffffff;
}

.soft-section {
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
    max-width: none;
    padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

.gray-section {
    background: #f1f5f9;
    max-width: none;
    padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 8px 0 0;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-heading a {
    color: #2563eb;
    font-weight: 800;
}

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

.feature-strip,
.horizontal-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 1fr);
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.movie-card-compact .poster-link {
    aspect-ratio: 16 / 10;
}

.poster-link img,
.rank-cover img,
.detail-poster img,
.category-covers img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.92);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-meta {
    color: #64748b;
    gap: 6px;
}

.movie-meta span {
    background: #eff6ff;
    color: #2563eb;
    padding: 5px 9px;
    font-size: 12px;
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
    color: #2563eb;
}

.movie-card p,
.rank-info p,
.content-card p,
.page-hero p,
.site-footer p {
    color: var(--muted);
    line-height: 1.72;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.4em;
    margin: 0 0 14px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile,
.category-overview-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: var(--radius);
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-tile > span,
.category-overview-card h2 {
    font-size: 22px;
    font-weight: 850;
}

.category-tile div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
}

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

.category-covers img {
    border-radius: 12px;
    background: #e0f2fe;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 100px 1fr auto;
    gap: 18px;
    align-items: center;
    border-radius: 20px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.rank-number {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    display: block;
    height: 78px;
    border-radius: 16px;
    overflow: hidden;
    background: #dbeafe;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 8px;
}

.heat-pill {
    border-radius: 999px;
    padding: 10px 14px;
    color: #dc2626;
    background: #fee2e2;
    font-weight: 850;
    white-space: nowrap;
}

.page-hero {
    min-height: 320px;
    padding: 86px 24px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.42), transparent 32%),
        linear-gradient(110deg, #1d4ed8, #06b6d4);
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

.inline-filter {
    display: flex;
    width: min(720px, 100%);
    margin-top: 28px;
    border-radius: 999px;
    padding: 8px;
    background: #ffffff;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
}

.solo-filter button {
    display: none;
}

.empty-state {
    display: none;
    margin: 30px 0 0;
    padding: 24px;
    border-radius: 18px;
    text-align: center;
    background: #f8fafc;
    color: #64748b;
    font-weight: 750;
}

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

.detail-hero {
    position: relative;
    color: #ffffff;
    overflow: hidden;
    background: #0f172a;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-image: var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.12);
    opacity: 0.42;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72)),
        radial-gradient(circle at 70% 10%, rgba(6, 182, 212, 0.42), transparent 40%);
}

.detail-wrap {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px 74px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
    background: #dbeafe;
}

.detail-one-line {
    max-width: 760px;
    color: #dbeafe;
    font-size: 20px;
    line-height: 1.7;
}

.detail-meta {
    margin: 24px 0;
}

.detail-tags {
    margin-bottom: 28px;
}

.detail-main-section {
    border-radius: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-trigger {
    position: absolute;
    inset: 0;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.48));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

.play-trigger.is-hidden {
    display: none;
}

.play-trigger span {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    padding-left: 6px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.content-card {
    border-radius: 24px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

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

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

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

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

.footer-brand {
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a:hover {
    color: #38bdf8;
}

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

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

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

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

@media (max-width: 820px) {
    .hero {
        min-height: 720px;
    }

    .hero-content {
        margin-left: 0;
        padding: 88px 24px 230px;
    }

    .hero-panel {
        left: 24px;
        right: 24px;
        bottom: 110px;
    }

    .hero-panel-card {
        flex: 1;
        min-width: 0;
    }

    .hero-dots {
        bottom: 182px;
    }

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

    .rank-row {
        grid-template-columns: 52px 74px 1fr;
    }

    .heat-pill {
        grid-column: 3;
        justify-self: start;
    }

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

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

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

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

    .brand {
        font-size: 18px;
    }

    .section,
    .soft-section,
    .gray-section {
        padding: 54px 16px;
    }

    .hero-search,
    .inline-filter {
        border-radius: 22px;
        flex-direction: column;
        gap: 8px;
    }

    .hero-search input,
    .inline-filter input {
        min-height: 42px;
    }

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

    .rank-row {
        grid-template-columns: 44px 66px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .rank-info p {
        display: none;
    }
}
