:root {
    --bg: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --card: #ffffff;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #ef4444;
    --purple: #7c3aed;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "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;
}

.wrap {
    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);
    backdrop-filter: blur(18px);
}

.top-gradient {
    height: 4px;
    background: linear-gradient(90deg, #60a5fa, #8b5cf6, #f472b6);
}

.navbar {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

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

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

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

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

.nav-search {
    width: 245px;
}

.nav-search input,
.mobile-search input,
.page-search input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.84);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.page-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: #334155;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid #e2e8f0;
}

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

.mobile-link {
    padding: 10px 4px;
    font-weight: 800;
    color: #334155;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1s ease;
    pointer-events: none;
}

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

.hero-bg,
.detail-backdrop,
.ranking-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 38%, rgba(124, 58, 237, 0.5), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.76) 48%, rgba(15, 23, 42, 0.36));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 690px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 54px;
    padding: 96px 0 110px;
}

.hero-copy {
    max-width: 720px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 14px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--primary);
}

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

.hero-summary,
.page-hero p,
.ranking-copy p {
    margin: 22px 0 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-tags,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 12px;
    backdrop-filter: blur(10px);
}

.hero-actions {
    margin-top: 30px;
    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 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(12px);
}

.btn.text {
    color: #ffffff;
    padding-inline: 6px;
}

.btn.full {
    width: 100%;
    color: #ffffff;
    background: var(--text);
    margin-top: 14px;
}

.hero-poster {
    position: relative;
    min-height: 490px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 490px;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 22px;
    bottom: 22px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-dots {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.hero-dot,
.hero-arrow {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    padding: 0;
}

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

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 30px;
    line-height: 1;
    pointer-events: auto;
}

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

.section-lift {
    margin-top: -34px;
    position: relative;
    z-index: 5;
}

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

.section-head h2,
.rank-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-more {
    color: var(--primary);
    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.9);
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
}

.poster-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.poster-year {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.56);
    padding: 6px 10px;
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    padding: 7px 11px;
    font-size: 13px;
}

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

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

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
}

.tag-row span {
    color: #1d4ed8;
    background: #dbeafe;
    padding: 5px 9px;
}

.movie-card-small {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
}

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

.movie-card-small .movie-card-body {
    min-width: 0;
}

.soft-section {
    background: #ffffff;
    border-block: 1px solid #e2e8f0;
}

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

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 26px;
    color: #ffffff;
    box-shadow: var(--soft-shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.86));
}

.category-name,
.category-intro {
    position: absolute;
    left: 20px;
    right: 20px;
}

.category-name {
    bottom: 58px;
    font-size: 24px;
    font-weight: 950;
}

.category-intro {
    bottom: 20px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
    padding: 70px 0;
}

.split-main {
    padding: 0;
}

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

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: var(--soft-shadow);
}

.rank-head {
    margin-bottom: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 34px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.rank-item img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-num {
    font-weight: 950;
    color: var(--accent);
}

.rank-copy strong,
.rank-copy em {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy strong {
    font-size: 15px;
}

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

.page-hero {
    position: relative;
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 18%, rgba(124, 58, 237, 0.52), transparent 30%),
        linear-gradient(135deg, #1e3a8a, #4f46e5 52%, #111827);
}

.compact-hero,
.category-hero {
    padding: 98px 0 72px;
}

.page-hero h1 {
    font-size: clamp(40px, 6vw, 68px);
}

.page-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 760px;
    margin-top: 28px;
}

.page-search button {
    border: 0;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 22px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 900;
}

.filter-bar {
    margin-top: 20px;
}

.filter-chip {
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 900;
}

.filter-chip.active {
    background: #ffffff;
    color: var(--primary);
}

.ranking-hero,
.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #0f172a;
}

.ranking-mask,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 32%, rgba(37, 99, 235, 0.42), transparent 26%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.38));
}

.ranking-copy {
    position: relative;
    z-index: 2;
    padding: 140px 0 110px;
    color: #ffffff;
}

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

.detail-head {
    position: relative;
    z-index: 2;
    padding: 92px 0 74px;
    color: #ffffff;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: end;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.44);
}

.detail-copy h1 {
    font-size: clamp(38px, 5vw, 68px);
}

.detail-one {
    max-width: 800px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
}

.detail-tags {
    margin: 22px 0;
}

.detail-tags a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 8px 12px;
}

.detail-meta {
    color: rgba(255, 255, 255, 0.82);
    gap: 14px;
}

.player-section {
    margin-top: -48px;
    position: relative;
    z-index: 5;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
    aspect-ratio: 16 / 9;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
    font-weight: 950;
    letter-spacing: 0.03em;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 46px rgba(239, 68, 68, 0.34);
    font-size: 34px;
    padding-left: 5px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    padding: 44px 0 70px;
}

.content-card {
    padding: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

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

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

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-logo {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    max-width: 620px;
    margin: 10px 0 0;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-weight: 800;
}

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

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

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

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .nav-links,
    .nav-search {
        display: none;
    }

    .navbar {
        justify-content: space-between;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: 740px;
        padding-top: 76px;
    }

    .hero-poster {
        display: none;
    }

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

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

    .detail-cover {
        max-width: 260px;
    }

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

    .page-search {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

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

    .hero-carousel,
    .hero-content {
        min-height: 650px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1,
    .ranking-copy h1 {
        font-size: 40px;
    }

    .hero-summary,
    .page-hero p,
    .ranking-copy p,
    .detail-one {
        font-size: 16px;
    }

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

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

    .movie-card-small .movie-card-body {
        padding: 12px;
    }

    .movie-card h3 {
        font-size: 17px;
    }

    .movie-card p {
        min-height: auto;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-controls {
        bottom: 22px;
    }

    .player-section {
        margin-top: -26px;
    }

    .play-icon {
        width: 66px;
        height: 66px;
        font-size: 28px;
    }
}
