:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #dbeafe;
    --cyan: #06b6d4;
    --orange: #f97316;
    --red: #ef4444;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --surface: #f8fafc;
    --dark: #0f172a;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--surface);
    font-family: Inter, -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 {
    font: inherit;
}

.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 12px 34px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #0f172a;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.logo-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
    padding: 9px 13px;
    color: #475569;
    border-radius: 999px;
    font-weight: 650;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--blue);
    background: var(--blue-soft);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0;
    width: min(320px, 30vw);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.page-search input,
.hero-search input,
.mobile-panel input,
.list-tools input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    padding: 10px 14px;
}

.header-search button,
.page-search button,
.hero-search button,
.mobile-panel button {
    border: 0;
    color: #ffffff;
    background: var(--blue);
    cursor: pointer;
    transition: 0.2s ease;
}

.header-search button {
    padding: 10px 16px;
}

.header-search button:hover,
.page-search button:hover,
.hero-search button:hover,
.mobile-panel button:hover {
    background: var(--blue-dark);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #0f172a;
    border-radius: 999px;
}

.mobile-panel {
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin: 14px auto;
}

.mobile-panel form {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.mobile-panel input {
    padding: 12px 14px;
}

.mobile-panel button {
    padding: 12px 18px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-slide {
    position: relative;
    display: none;
    min-height: 680px;
    isolation: isolate;
}

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

.hero-slide::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.1) brightness(0.56);
    transform: scale(1.04);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 72% 24%, rgba(59, 130, 246, 0.42), transparent 34%), linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.34) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: center;
    gap: 56px;
    min-height: 680px;
    padding: 76px 0 150px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-copy .eyebrow,
.compact-page-hero .eyebrow {
    color: #93c5fd;
}

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

.hero-description {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
}

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

.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(37, 99, 235, 0.42);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.ghost-button.dark {
    color: var(--blue);
    background: #ffffff;
    border-color: var(--line);
}

.ghost-button.dark:hover {
    background: var(--blue-soft);
}

.primary-button.small {
    min-height: 38px;
    padding: 8px 16px;
    font-size: 14px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 480px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

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

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.62);
    border-radius: 999px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.hero-toolbar {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
    display: grid;
    grid-template-columns: minmax(280px, 430px) 1fr;
    align-items: center;
    gap: 24px;
}

.hero-search,
.page-search {
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.hero-search input,
.page-search input {
    padding: 16px 20px;
}

.hero-search button,
.page-search button {
    padding: 16px 24px;
    border: 0;
    white-space: nowrap;
}

.hero-dots {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.hero-dot {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px;
    color: #ffffff;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.48);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: 0.2s ease;
}

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

.hero-dot img {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    object-fit: cover;
}

.hero-dot span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.section-block {
    padding: 64px 0;
}

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

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

.section-heading h2,
.compact-page-hero h1,
.detail-copy h1,
.content-panel h2,
.side-card h2 {
    margin: 0;
    color: var(--text);
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 44px);
}

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

.section-more:hover {
    color: var(--blue-dark);
    text-decoration: underline;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.14);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #e2e8f0;
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.06);
}

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    color: #ffffff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.movie-year {
    left: 12px;
    background: rgba(15, 23, 42, 0.65);
}

.rank-badge {
    right: 12px;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta-line a {
    color: var(--blue);
}

.movie-card h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--blue);
}

.movie-card p {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #64748b;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    display: block;
    min-height: 170px;
    padding: 22px;
    overflow: hidden;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    transition: 0.24s ease;
}

.category-card::after {
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 110px;
    height: 110px;
    content: "";
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22), transparent 70%);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 24px 52px rgba(37, 99, 235, 0.14);
}

.category-card span {
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
}

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

.category-card p {
    margin: 0;
    color: var(--muted);
}

.category-card strong {
    display: block;
    margin-top: 18px;
    color: var(--blue);
    font-size: 14px;
    line-height: 1.5;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 18% 15%, rgba(6, 182, 212, 0.35), transparent 30%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #0f172a 100%);
}

.compact-page-hero .container {
    padding: 88px 0;
}

.compact-page-hero h1 {
    color: #ffffff;
    font-size: clamp(40px, 6vw, 70px);
}

.compact-page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.page-search {
    max-width: 620px;
    margin-top: 30px;
}

.list-tools {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.list-tools label {
    display: grid;
    gap: 8px;
    width: min(520px, 100%);
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.list-tools input {
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 116px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 14px;
}

.ranking-cover {
    overflow: hidden;
    width: 116px;
    height: 148px;
    border-radius: 14px;
}

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

.ranking-main {
    min-width: 0;
}

.ranking-number {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--orange);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.ranking-main h2 {
    margin: 0 0 8px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.ranking-main h2 a:hover {
    color: var(--blue);
}

.ranking-main p {
    margin: 0 0 12px;
    color: var(--muted);
}

.detail-hero {
    position: relative;
    color: #ffffff;
    isolation: isolate;
    background: #020617;
}

.detail-hero::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    background-image: var(--detail-image);
    background-position: center;
    background-size: cover;
    filter: blur(2px) brightness(0.46);
    transform: scale(1.02);
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.36));
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.detail-intro {
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 26px 62px rgba(0, 0, 0, 0.42);
}

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

.detail-copy h1 {
    color: #ffffff;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
}

.detail-copy p {
    max-width: 820px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.detail-tags {
    margin-top: 24px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding: 48px 0 18px;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-section,
.content-panel,
.side-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.video-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.44));
    cursor: pointer;
    transition: 0.2s ease;
}

.play-button span {
    display: block;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    clip-path: polygon(34% 24%, 34% 76%, 78% 50%);
}

.video-player.is-playing .play-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.content-panel {
    padding: 28px;
}

.content-panel h2 {
    font-size: 28px;
}

.content-panel p:last-child {
    margin: 14px 0 0;
    color: #334155;
    font-size: 17px;
}

.detail-sidebar {
    display: grid;
    align-content: start;
    gap: 20px;
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin-bottom: 18px;
    font-size: 22px;
}

.side-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.side-card dl div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.side-card dt {
    color: var(--muted);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: #0f172a;
    font-weight: 650;
}

.side-links {
    grid-template-columns: 1fr;
}

.related-section {
    padding-top: 28px;
}

.site-footer {
    margin-top: 52px;
    padding: 46px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
}

.site-footer p {
    max-width: 520px;
    margin: 16px 0 0;
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    display: none;
    width: 46px;
    height: 46px;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.back-to-top.visible {
    display: block;
}

.empty-message {
    display: none;
    grid-column: 1 / -1;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border: 1px dashed var(--line);
    border-radius: 18px;
}

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

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

    .hero-poster {
        display: none;
    }

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

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        padding: 54px 0 210px;
    }

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

    .hero-dot {
        grid-template-columns: 44px 1fr;
    }

    .hero-dot img {
        width: 44px;
        height: 44px;
    }

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

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

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

    .detail-poster {
        width: min(260px, 72vw);
    }

    .ranking-row {
        grid-template-columns: 90px 1fr;
    }

    .ranking-row .primary-button {
        grid-column: 1 / -1;
    }

    .ranking-cover {
        width: 90px;
        height: 118px;
    }

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

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

    .logo {
        font-size: 18px;
    }

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

    .hero-content {
        padding-bottom: 250px;
    }

    .hero-toolbar {
        bottom: 18px;
    }

    .hero-search,
    .page-search {
        display: grid;
        border-radius: 18px;
    }

    .hero-search button,
    .page-search button {
        width: 100%;
    }

    .hero-dots {
        grid-template-columns: 1fr;
        max-height: 178px;
        overflow: auto;
    }

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

    .section-block {
        padding: 44px 0;
    }

    .compact-page-hero .container {
        padding: 58px 0;
    }

    .content-panel {
        padding: 22px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}
