*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --dark: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #0f172a;
    background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 48%, #f8fafc 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.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.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    font-weight: 900;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
    background: #eff6ff;
    transform: translateY(-1px);
}

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

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #0f172a;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 16px;
}

.mobile-nav.is-open {
    display: flex;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.24), transparent 24%),
        radial-gradient(circle at 85% 18%, rgba(34, 211, 238, 0.34), transparent 28%),
        linear-gradient(135deg, rgba(29, 78, 216, 0.92), rgba(8, 145, 178, 0.84));
}

.hero-container {
    position: relative;
    padding: 70px 0 64px;
}

.hero-track {
    position: relative;
    min-height: 470px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    gap: 48px;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(24px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: -36px;
    z-index: -1;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.28)), var(--hero-image);
    background-size: cover;
    background-position: center;
    border-radius: 38px;
    opacity: 0.24;
    filter: blur(1px);
}

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

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #dbeafe;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #67e8f9;
    box-shadow: 0 0 18px #67e8f9;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
    max-width: 720px;
    margin: 22px 0 0;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
}

.hero-tags,
.detail-badges,
.rank-row-meta,
.tag-cloud,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.detail-badges span,
.tag-cloud span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    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: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn.light {
    color: #0f172a;
    background: #fff;
}

.btn.ghost-white {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.48);
}

.btn.wide {
    width: 100%;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.16);
    border-radius: 32px;
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.36);
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.45);
}

.hero-poster img,
.poster-wrap img,
.detail-side img,
.rank-cover img,
.rank-row-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 10px;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 30px;
    background: #fff;
}

.hero-quick {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.hero-quick a {
    padding: 10px 14px;
    color: #e0f2fe;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.22);
}

.content-section {
    padding: 48px 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: clamp(24px, 4vw, 34px);
    letter-spacing: -0.03em;
}

.section-head h2 span {
    width: 5px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
}

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue);
    font-weight: 900;
}

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

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

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

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

.poster-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster-link:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

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

.poster-wrap img {
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.74));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.poster-link:hover .poster-shade {
    opacity: 1;
}

.poster-region,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.poster-region {
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.poster-play {
    left: 50%;
    bottom: 18px;
    padding: 8px 12px;
    color: var(--blue);
    background: #fff;
    transform: translate(-50%, 18px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.poster-link:hover .poster-play {
    transform: translate(-50%, 0);
    opacity: 1;
}

.movie-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.movie-info strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-tags span,
.tag-cloud span {
    padding: 5px 8px;
    color: #475569;
    background: #f1f5f9;
}

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

.category-card,
.category-large-card {
    position: relative;
    overflow: hidden;
    color: #fff;
    border-radius: 24px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: var(--shadow);
}

.category-card {
    min-height: 188px;
    padding: 22px;
    transition: transform 0.22s ease;
}

.category-card:hover {
    transform: translateY(-6px) scale(1.01);
}

.category-card span,
.category-large-copy span {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 900;
}

.category-card strong {
    display: block;
    line-height: 1.6;
}

.category-card em {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-style: normal;
}

.from-rose { background: linear-gradient(135deg, #e11d48, #f97316); }
.from-purple { background: linear-gradient(135deg, #7c3aed, #db2777); }
.from-orange { background: linear-gradient(135deg, #ea580c, #dc2626); }
.from-amber { background: linear-gradient(135deg, #d97706, #f59e0b); }
.from-cyan { background: linear-gradient(135deg, #0891b2, #2563eb); }
.from-emerald { background: linear-gradient(135deg, #059669, #0d9488); }
.from-lime { background: linear-gradient(135deg, #65a30d, #16a34a); }
.from-pink { background: linear-gradient(135deg, #db2777, #9333ea); }
.from-slate { background: linear-gradient(135deg, #334155, #0f172a); }
.from-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }

.spotlight-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rank-no {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    width: 58px;
    height: 78px;
    border-radius: 12px;
    background: #dbeafe;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.page-hero.slim {
    padding: 70px 0;
}

.page-hero.category-hero {
    padding: 74px 0;
}

.category-large-list {
    display: grid;
    gap: 24px;
    padding: 48px 0;
}

.category-large-card {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 22px;
    padding: 26px;
}

.category-large-copy h2 {
    margin: 0 0 12px;
    font-size: 34px;
}

.category-large-copy p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.8;
}

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

.category-large-movies .movie-card:nth-child(n+4) {
    display: none;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.filter-search,
.filter-row,
.filter-panel label {
    display: flex;
    gap: 10px;
}

.filter-search {
    flex-direction: column;
    margin-bottom: 14px;
}

.filter-row {
    flex-wrap: wrap;
}

.filter-panel label {
    flex: 1;
    min-width: 200px;
    flex-direction: column;
    color: #334155;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #fff;
    outline: none;
}

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

.hidden-card {
    display: none;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-row-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    background: #dbeafe;
}

.rank-row-body h2 {
    margin: 8px 0 10px;
    font-size: 24px;
}

.rank-row-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.rank-row-no {
    color: var(--blue);
    font-weight: 900;
}

.rank-row-meta {
    margin-top: 14px;
}

.rank-row-meta span,
.rank-row-meta strong {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 13px;
}

.rank-row-meta strong {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.detail-main {
    background: #f8fafc;
}

.player-section {
    padding: 34px 0 42px;
    color: #fff;
    background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.34), transparent 26%), #0f172a;
}

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

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

.breadcrumb a {
    color: #e0f2fe;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0.68));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    padding-left: 5px;
    color: var(--blue);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 16px 40px rgba(255, 255, 255, 0.24);
}

.detail-title-card {
    margin-top: 22px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.detail-badges span {
    padding: 7px 10px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.22);
}

.detail-title-card h1 {
    margin: 14px 0 10px;
    font-size: clamp(30px, 5vw, 48px);
}

.detail-title-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
}

.detail-side {
    overflow: hidden;
    border-radius: 24px;
    background: #1e293b;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
}

.detail-side > img {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #0f172a;
}

.side-info {
    padding: 20px;
}

.side-info h2 {
    margin: 0 0 14px;
}

.side-info dl {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 9px 12px;
    margin: 0 0 16px;
}

.side-info dt {
    color: #94a3b8;
}

.side-info dd {
    margin: 0;
    color: #fff;
}

.tag-cloud {
    margin-bottom: 18px;
}

.detail-content {
    padding: 42px 0 10px;
}

.detail-text-block {
    margin-bottom: 28px;
    padding: 26px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.detail-text-block h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-text-block p {
    margin: 0;
    color: #334155;
    line-height: 1.95;
    white-space: pre-line;
}

.site-footer {
    margin-top: 44px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.footer-brand {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.site-footer p {
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.8;
}

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

.site-footer ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
    font-size: 14px;
}

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

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

    .hero-slide,
    .player-layout,
    .category-large-card,
    .spotlight-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-side {
        max-width: 340px;
    }
}

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

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

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 760px;
    }

    .hero-slide {
        gap: 28px;
    }

    .hero-poster {
        width: min(260px, 82vw);
    }

    .movie-grid,
    .full-grid,
    .side-grid,
    .category-large-movies {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .rank-row {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
    }
}

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

    .hero-container {
        padding-top: 44px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .movie-info {
        padding: 12px;
    }

    .rank-item {
        grid-template-columns: 34px 52px minmax(0, 1fr);
    }

    .filter-panel label {
        min-width: 100%;
    }
}
