:root {
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --cyan: #06b6d4;
    --cyan-soft: #cffafe;
    --gold: #f59e0b;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f8fafc;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: #f3f6fb;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.site-nav {
    min-height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #2563eb 0%, #0891b2 100%);
}

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fef3c7;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

.category-strip {
    background: #155e75;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.category-strip-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0;
}

.category-strip a {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: linear-gradient(90deg, #172554 0%, #1d4ed8 48%, #0891b2 100%);
}

.hero-stage,
.hero-slide,
.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-bg {
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    opacity: 0.32;
    filter: saturate(1.15) contrast(1.08);
}

.hero-overlay {
    background:
        radial-gradient(circle at 76% 28%, rgba(34, 211, 238, 0.36), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 64, 175, 0.78) 52%, rgba(8, 145, 178, 0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    max-width: 1180px;
}

.hero-content h1 {
    max-width: 760px;
    margin: 12px 0 22px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(18px, 2vw, 24px);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #cffafe;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-tags,
.movie-meta-pills,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.movie-meta-pills span,
.movie-meta-pills a,
.tag-row span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
    transform: translateY(-2px);
}

.primary-button.dark {
    background: #111827;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.2);
}

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

.text-button {
    color: var(--blue);
    padding: 0;
    min-height: auto;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

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

.section {
    padding: 64px 0;
}

.light-section {
    background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
}

.alt-section:nth-of-type(odd) {
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
}

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

.section-heading h2,
.rank-heading h2,
.content-card h2,
.side-card h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

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

.search-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.search-band h2,
.search-band p {
    margin: 0;
}

.search-band p {
    color: var(--muted);
    margin-top: 4px;
}

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

.category-card,
.category-overview-card,
.content-card,
.side-card,
.player-card,
.filter-panel,
.rank-panel {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.category-card {
    padding: 18px;
    min-height: 220px;
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.category-covers img {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.category-card h2,
.movie-info h2,
.category-overview-card h2 {
    margin: 0 0 8px;
    line-height: 1.28;
}

.category-card p,
.movie-info p,
.category-overview-card p,
.content-card p,
.detail-title-group p {
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.movie-cover.wide {
    aspect-ratio: 16 / 10;
}

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

.movie-card:hover .movie-cover img,
.category-cover-wall:hover img {
    transform: scale(1.08);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(15, 23, 42, 0.76) 100%);
}

.play-badge {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--blue);
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.type-badge {
    position: absolute;
    z-index: 3;
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.movie-info {
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.movie-info h2 {
    font-size: 18px;
}

.movie-info p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.rank-panel {
    position: sticky;
    top: 112px;
    padding: 22px;
}

.rank-heading span {
    color: var(--gold);
    font-weight: 900;
}

.rank-list,
.side-rank-list {
    display: grid;
    gap: 12px;
}

.rank-item,
.side-rank-item,
.rank-row {
    display: grid;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item {
    grid-template-columns: 42px 54px 1fr auto;
    padding: 9px;
}

.rank-item:hover,
.side-rank-item:hover,
.rank-row:hover {
    background: #e0f2fe;
    transform: translateX(2px);
}

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    font-weight: 900;
}

.rank-item img,
.side-rank-item img,
.rank-row img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-title {
    font-weight: 800;
}

.rank-heat,
.rank-row em {
    color: var(--gold);
    font-style: normal;
    font-weight: 900;
    font-size: 13px;
}

.page-hero,
.detail-hero {
    position: relative;
    color: #ffffff;
    background: linear-gradient(90deg, #172554 0%, #1d4ed8 48%, #0891b2 100%);
    overflow: hidden;
}

.small-hero {
    padding: 70px 0;
}

.page-hero h1,
.detail-title-group h1 {
    margin: 16px 0 12px;
    font-size: clamp(38px, 6vw, 62px);
    line-height: 1.05;
}

.page-hero p,
.detail-title-group p {
    max-width: 760px;
    color: #dbeafe;
    font-size: 19px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 700;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 20px;
    padding: 18px;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-cover-wall img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.35s ease;
}

.mini-link-row,
.footer-links,
.compact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 14px;
}

.mini-link-row a,
.footer-links a {
    color: var(--blue);
    font-weight: 700;
}

.filter-panel {
    padding: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.filter-grid label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 800;
    font-size: 13px;
}

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

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.rank-table {
    display: grid;
    gap: 10px;
}

.rank-row {
    grid-template-columns: 48px 58px 1fr 180px 110px;
    padding: 10px 14px;
}

.vertical-card-list {
    display: grid;
    gap: 18px;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 240px 1fr;
}

.detail-hero {
    min-height: 360px;
}

.detail-backdrop,
.detail-mask {
    position: absolute;
    inset: 0;
}

.detail-backdrop {
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    filter: blur(4px) saturate(1.1);
    opacity: 0.35;
}

.detail-mask {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.78), rgba(8, 145, 178, 0.48));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 56px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

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

.player-card,
.content-card,
.side-card {
    padding: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #020617;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    outline: none;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.58));
    cursor: pointer;
}

.play-overlay span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.92);
    font-size: 30px;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.play-overlay strong {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.player-shell.is-playing .play-overlay,
.play-overlay[hidden] {
    display: none;
}

.content-card {
    padding: 26px;
}

.content-card h2 {
    font-size: 26px;
    margin-top: 24px;
}

.content-card h2:first-of-type {
    margin-top: 0;
}

.movie-meta-pills {
    margin-bottom: 20px;
}

.movie-meta-pills span,
.movie-meta-pills a,
.large-tags span {
    color: var(--blue-dark);
    background: #dbeafe;
}

.large-tags {
    gap: 10px;
}

.detail-side {
    display: grid;
    gap: 22px;
    position: sticky;
    top: 112px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
}

.full-button {
    width: 100%;
}

.side-rank-item {
    grid-template-columns: 36px 52px 1fr;
    padding: 8px;
}

.side-rank-item strong {
    font-size: 14px;
    line-height: 1.35;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 36px;
}

.footer-logo {
    margin-bottom: 12px;
}

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

.footer-inner p {
    margin: 0;
    color: #94a3b8;
}

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

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

.footer-bottom {
    margin-top: 36px;
    padding: 18px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

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

    .split-layout,
    .detail-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .detail-side {
        position: static;
    }

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

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .nav-menu {
        position: absolute;
        left: 0;
        right: 0;
        top: 64px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #1d4ed8;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        padding: 14px 24px;
    }

    .hero {
        height: 620px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-title-group h1 {
        font-size: 38px;
    }

    .hero-actions,
    .search-band,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

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

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

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

    .rank-row span:nth-of-type(2),
    .rank-row em {
        display: none;
    }

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

    .section {
        padding: 46px 0;
    }
}
