:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --purple: #7c3aed;
    --pink: #db2777;
    --red: #ef4444;
    --dark: #0f172a;
    --radius: 22px;
    --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1e3a8a, #7c3aed);
}

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

button,
input,
select {
    font: inherit;
}

.site-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.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.nav-wrap {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--dark);
    white-space: nowrap;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
}

.logo-text {
    font-size: 20px;
}

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

.desktop-nav a {
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.site-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.site-search-form input {
    width: 190px;
    border: 0;
    outline: 0;
    padding: 7px 12px;
    background: transparent;
}

.site-search-form button,
.primary-button,
.ghost-button,
.ghost-dark-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search-form button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
}

.site-search-form button {
    padding: 8px 16px;
}

.primary-button,
.ghost-button,
.ghost-dark-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
}

.primary-button:hover,
.ghost-button:hover,
.ghost-dark-button:hover,
.site-search-form button:hover {
    transform: translateY(-2px);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.ghost-dark-button {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 10px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--dark);
    border-radius: 10px;
}

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

.mobile-nav-panel a {
    display: block;
    padding: 12px 0;
    color: #334155;
    font-weight: 800;
}

.mobile-nav-panel.open {
    display: block;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    filter: saturate(1.12) contrast(1.05);
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 42%, rgba(124, 58, 237, 0.46), transparent 38%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.16)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.68), transparent 50%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
    padding-top: 82px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 1.02;
    letter-spacing: -0.08em;
    text-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 22px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 44px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    color: #ffffff;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    color: #ffffff;
    font-size: 30px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -58px;
    position: relative;
    z-index: 3;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.intro-strip span {
    color: var(--blue);
    font-weight: 900;
}

.intro-strip h2,
.section-heading h2,
.page-hero h1,
.ranking-copy h2,
.detail-info h1,
.detail-content h2 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.intro-strip h2 {
    margin-top: 5px;
    font-size: clamp(30px, 4vw, 48px);
}

.intro-strip p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

.content-section,
.page-main {
    padding: 70px 0;
}

.soft-section {
    padding: 55px 0;
}

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

.section-heading h2 {
    margin-top: 5px;
    color: var(--dark);
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading a {
    color: var(--blue);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.13);
}

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

.movie-poster img {
    transition: transform 0.32s ease;
}

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(10px);
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.42);
}

.movie-info {
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-info h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

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

.movie-info p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.tag-row span {
    padding: 4px 9px;
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    background: #eff6ff;
}

.card-list {
    display: grid;
    grid-template-columns: 118px 1fr;
}

.card-list .movie-poster {
    aspect-ratio: auto;
    height: 100%;
    min-height: 158px;
}

.wide-block {
    padding: 74px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 84% 10%, rgba(219, 39, 119, 0.35), transparent 35%),
        linear-gradient(135deg, #1e3a8a, #4f46e5 55%, #7c3aed);
}

.wide-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 38px;
    align-items: center;
}

.wide-grid h2 {
    margin: 10px 0 12px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.07em;
}

.wide-grid p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 24px;
}

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

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-images {
    height: 172px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    background: #0f172a;
}

.category-card div:last-child {
    padding: 18px;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

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

.ranking-block {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    align-items: center;
    padding: 72px 0;
}

.ranking-card,
.ranking-copy,
.filter-panel,
.detail-content,
.player-section {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--line);
}

.ranking-card {
    padding: 28px;
}

.ranking-card h2,
.ranking-copy h2 {
    font-size: clamp(30px, 4vw, 46px);
}

.rank-list {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 13px 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.rank-row span {
    color: var(--red);
    font-weight: 900;
}

.rank-row em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.ranking-copy {
    padding: 34px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.ranking-copy p {
    color: var(--muted);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 40px;
    padding: 54px 0;
}

.footer-logo {
    color: #ffffff;
}

.site-footer p {
    max-width: 460px;
    color: #94a3b8;
}

.site-footer h3 {
    color: #ffffff;
    margin: 0 0 12px;
}

.site-footer a:not(.logo) {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.page-main {
    padding-top: 34px;
}

.page-hero {
    overflow: hidden;
    position: relative;
    margin-bottom: 28px;
    padding: 52px;
    border-radius: 30px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.23), transparent 35%),
        linear-gradient(135deg, #1d4ed8, #7c3aed);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin-top: 8px;
    font-size: clamp(36px, 6vw, 64px);
}

.page-hero p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.84);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
    font-weight: 800;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(150px, 1fr));
    gap: 14px;
    padding: 18px;
    margin-bottom: 26px;
}

.filter-panel label {
    display: grid;
    gap: 7px;
}

.filter-panel span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    padding: 0 14px;
    background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.empty-state {
    display: none;
    padding: 26px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    background: #ffffff;
    margin-bottom: 20px;
}

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

.all-movies-grid {
    padding-bottom: 30px;
}

.category-overview {
    margin-bottom: 50px;
}

.category-preview-list {
    display: grid;
    gap: 22px;
}

.category-preview {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.compact-heading {
    margin-bottom: 12px;
}

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

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

.compact-card {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.compact-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 60%);
}

.compact-card span {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    color: #ffffff;
    font-weight: 900;
}

.ranking-table {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.ranking-table-row {
    display: grid;
    grid-template-columns: 70px 1fr 90px 120px minmax(180px, 0.8fr);
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ranking-table-row:hover {
    border-color: rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

.rank-num {
    color: var(--red);
    font-weight: 900;
}

.ranking-table-row span,
.ranking-table-row em {
    color: var(--muted);
    font-style: normal;
}

.movie-detail-main {
    padding-top: 30px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 34px;
    align-items: center;
    padding: 34px;
    border-radius: 32px;
    color: #ffffff;
    background:
        radial-gradient(circle at 84% 18%, rgba(219, 39, 119, 0.32), transparent 32%),
        linear-gradient(135deg, #0f172a, #1e3a8a 54%, #4c1d95);
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
    margin-top: 10px;
    font-size: clamp(34px, 6vw, 68px);
}

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 800;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.player-section {
    margin-top: 30px;
    padding: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.18));
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.38);
    font-size: 34px;
}

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

.detail-content {
    margin-top: 30px;
    padding: 32px;
}

.detail-content h2 {
    margin-top: 0;
    font-size: 28px;
}

.detail-content h2 + p {
    color: #334155;
    font-size: 17px;
}

.related-section {
    padding-bottom: 0;
}

.is-hidden {
    display: none !important;
}

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

    .site-search-form input {
        width: 150px;
    }
}

@media (max-width: 880px) {
    .desktop-nav,
    .site-search-form {
        display: none;
    }

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .intro-strip,
    .section-heading,
    .ranking-block,
    .wide-grid,
    .footer-grid,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

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

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .detail-hero {
        display: grid;
    }

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

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

    .ranking-table-row span:nth-child(n+3),
    .ranking-table-row em {
        display: none;
    }
}

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

    .nav-wrap {
        height: 64px;
    }

    .logo-text {
        font-size: 17px;
    }

    .hero-carousel {
        min-height: 560px;
    }

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

    .hero-content h1 {
        letter-spacing: -0.05em;
    }

    .hero-controls {
        bottom: 22px;
    }

    .intro-strip,
    .page-hero,
    .detail-hero,
    .detail-content,
    .ranking-card,
    .ranking-copy {
        padding: 22px;
        border-radius: 22px;
    }

    .movie-grid,
    .category-grid,
    .movie-list-grid,
    .compact-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .card-list {
        grid-template-columns: 104px 1fr;
    }

    .card-list .movie-poster {
        min-height: 150px;
    }

    .content-section,
    .page-main {
        padding: 42px 0;
    }

    .footer-grid {
        padding: 36px 0;
    }
}
