:root {
    --blue-900: #0f2d64;
    --blue-800: #1555a6;
    --blue-700: #1d6fd8;
    --cyan-500: #06b6d4;
    --cyan-100: #dff7ff;
    --gold-400: #facc15;
    --orange-500: #f97316;
    --green-500: #22c55e;
    --amber-50: #fffbeb;
    --gray-950: #101827;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 45, 100, 0.16);
    --soft-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
    --radius-xl: 22px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--gray-800);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 46%, #f8fbff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(90deg, var(--blue-700), var(--cyan-500));
    box-shadow: 0 10px 30px rgba(29, 111, 216, 0.22);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

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

.logo-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--blue-800);
    background: var(--white);
    border-radius: 12px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
    font-weight: 600;
}

.nav-link {
    position: relative;
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 3px;
    content: "";
    background: var(--gold-400);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff7ad;
    opacity: 1;
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-link {
    display: block;
    padding: 12px 16px;
    margin: 4px auto;
    max-width: 1180px;
    border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.is-active {
    background: rgba(255, 255, 255, 0.18);
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(90deg, var(--blue-900), var(--blue-700), var(--cyan-500));
}

.hero-slide {
    position: absolute;
    inset: 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    position: relative;
    visibility: visible;
    opacity: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(10px) saturate(1.1);
    transform: scale(1.06);
    opacity: 0.28;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.18), transparent 30%),
        linear-gradient(90deg, rgba(12, 37, 84, 0.96), rgba(29, 111, 216, 0.83) 54%, rgba(6, 182, 212, 0.7));
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.58fr);
    gap: 56px;
    align-items: center;
    min-height: 640px;
    padding: 70px 0 86px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #fff3a4;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 70px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

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

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

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

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    font-weight: 800;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: var(--blue-900);
    background: var(--gold-400);
    box-shadow: 0 14px 28px rgba(250, 204, 21, 0.28);
}

.ghost-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(15, 45, 100, 0.24);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
    transform: rotate(2deg);
    transition: transform 0.25s ease;
}

.hero-poster:hover {
    transform: rotate(0) scale(1.03);
}

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

.hero-play,
.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    color: var(--blue-700);
    background: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.hero-play {
    width: 78px;
    height: 78px;
    font-size: 30px;
}

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 26px;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-dots,
.hero-nav {
    display: flex;
    gap: 10px;
}

.hero-dot,
.hero-nav button {
    border: 0;
    cursor: pointer;
}

.hero-dot {
    width: 32px;
    height: 8px;
    padding: 0;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

.hero-dot.is-active {
    background: var(--gold-400);
}

.hero-nav button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--white);
    font-size: 30px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
}

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

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

.section-title span {
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title h2 {
    margin: 6px 0 0;
    color: var(--gray-800);
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
}

.section-title a,
.category-feature-head a {
    color: var(--blue-700);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
    max-width: 720px;
    margin: 0 0 34px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 18px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: var(--soft-shadow);
}

.search-box span {
    color: var(--blue-700);
    font-size: 22px;
    font-weight: 900;
}

.search-box input,
.filter-panel select {
    width: 100%;
    color: var(--gray-800);
    background: transparent;
    border: 0;
    outline: 0;
}

.filter-panel select {
    min-height: 52px;
    padding: 0 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: var(--soft-shadow);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(29, 111, 216, 0.25);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--blue-900);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

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

.poster-play {
    width: 54px;
    height: 54px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    color: var(--blue-900);
    font-weight: 900;
    background: linear-gradient(135deg, #fde68a, var(--gold-400));
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.card-body {
    padding: 18px;
}

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

.card-body h3 {
    margin: 0;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.35;
}

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

.card-body p {
    margin: 10px 0 14px;
    color: var(--gray-600);
    font-size: 14px;
}

.tag-row span {
    padding: 5px 9px;
    color: var(--gray-700);
    font-size: 12px;
    background: var(--gray-100);
    border-radius: 999px;
}

.compact-card .card-body {
    padding: 14px;
}

.compact-card .card-body h3 {
    font-size: 16px;
}

.compact-card .card-body p {
    font-size: 13px;
}

.soft-section {
    background: linear-gradient(90deg, #f0fdf4, #ecfeff);
}

.gold-section {
    background: linear-gradient(90deg, #fffbeb, #fef9c3);
}

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

.category-feature {
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--soft-shadow);
}

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

.category-feature h3 {
    margin: 0;
    color: var(--blue-700);
    font-size: 22px;
}

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

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

.page-hero {
    position: relative;
    color: var(--white);
    background: linear-gradient(105deg, var(--blue-900), var(--blue-700), var(--cyan-500));
    overflow: hidden;
}

.page-hero::before {
    position: absolute;
    inset: -30% -10% auto auto;
    width: 480px;
    height: 480px;
    content: "";
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 66%);
    border-radius: 50%;
}

.page-hero .site-container {
    position: relative;
    padding: 72px 0;
}

.slim-hero .site-container,
.ranking-hero .site-container,
.category-hero .site-container {
    padding: 74px 0 62px;
}

.page-hero .filter-panel {
    margin-top: 28px;
    margin-bottom: 0;
}

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

.category-card {
    overflow: hidden;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card-link {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 220px;
}

.category-cover-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--blue-900);
}

.category-cover-grid img {
    width: 100%;
    height: 100%;
    min-height: 110px;
    object-fit: cover;
}

.category-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.category-card-body h2 {
    margin: 0 0 12px;
    color: var(--gray-900);
    font-size: 28px;
}

.category-card-body p {
    margin: 0 0 20px;
    color: var(--gray-600);
}

.category-card-body span {
    color: var(--blue-700);
    font-weight: 900;
}

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

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

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: var(--white);
    background: var(--blue-900);
}

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

.detail-bg {
    background-position: center;
    background-size: cover;
    filter: blur(14px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.36;
}

.detail-mask {
    background: linear-gradient(90deg, rgba(12, 37, 84, 0.96), rgba(29, 111, 216, 0.82), rgba(6, 182, 212, 0.52));
}

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    min-height: 560px;
    padding: 56px 0;
}

.detail-poster {
    overflow: hidden;
    border: 7px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.32);
}

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

.detail-copy h1 {
    max-width: 850px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    background: #050914;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050914;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    gap: 18px;
    place-items: center;
    align-content: center;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.72));
    border: 0;
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover span {
    max-width: min(760px, 80%);
    font-size: clamp(22px, 4vw, 42px);
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.player-cover strong {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    color: var(--blue-700);
    font-size: 32px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

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

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 36px;
    padding: 16px 0 72px;
}

.detail-article,
.detail-side {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--soft-shadow);
}

.detail-article {
    padding: 34px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: var(--gray-900);
    font-size: 24px;
}

.detail-article p {
    margin: 0 0 28px;
    color: var(--gray-700);
    font-size: 17px;
}

.related-text-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-text-links a {
    padding: 9px 13px;
    color: var(--blue-700);
    font-weight: 800;
    background: #eff6ff;
    border-radius: 999px;
}

.detail-side {
    align-self: start;
    padding: 24px;
}

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

.side-grid .movie-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    border-radius: 18px;
}

.side-grid .poster-link img {
    height: 100%;
    aspect-ratio: auto;
}

.side-grid .poster-play,
.side-grid .tag-row,
.side-grid .card-body p {
    display: none;
}

.site-footer {
    color: #d1d5db;
    background: var(--gray-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 44px;
    padding: 52px 0;
}

.footer-logo {
    color: var(--white);
}

.site-footer p {
    max-width: 560px;
    margin: 14px 0 0;
    color: #aab2c0;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.footer-links a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
}

.footer-bottom {
    padding: 18px 16px;
    color: #9ca3af;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-filtered-out {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content,
    .detail-layout,
    .detail-main,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 36px;
        padding: 54px 0 98px;
    }

    .hero-poster {
        max-width: 360px;
        margin: 0 auto;
    }

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

    .movie-grid,
    .movie-grid.four-col,
    .category-page-grid,
    .ranking-grid,
    .ranking-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .feature-grid,
    .category-grid,
    .category-card-link {
        grid-template-columns: 1fr;
    }

    .category-cover-grid {
        min-height: 260px;
    }
}

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

    .logo {
        font-size: 20px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(32px, 12vw, 48px);
    }

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

    .hero-controls {
        align-items: flex-end;
    }

    .hero-nav {
        display: none;
    }

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

    .section-title {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.four-col,
    .category-page-grid,
    .ranking-grid,
    .ranking-list,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .card-body {
        padding: 14px;
    }

    .card-body h3 {
        font-size: 16px;
    }

    .card-body p,
    .tag-row {
        display: none;
    }

    .detail-main {
        padding-bottom: 48px;
    }

    .detail-article,
    .detail-side {
        padding: 22px;
    }

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

@media (max-width: 440px) {
    .movie-grid,
    .movie-grid.four-col,
    .category-page-grid,
    .ranking-grid,
    .ranking-list,
    .mini-grid {
        grid-template-columns: 1fr;
    }

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

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }
}
