:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #0891b2;
    --orange: #f97316;
    --red: #ef4444;
    --green: #10b981;
    --teal: #0d9488;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: var(--gray-50);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--blue), var(--blue-dark));
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    position: relative;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.brand-mark span {
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #fff;
    margin-left: 3px;
}

.brand-name {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
}

.desktop-nav a,
.nav-dropdown > a {
    opacity: 0.94;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav .nav-active {
    color: #dbeafe;
    opacity: 1;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(118px, 1fr));
    gap: 2px;
    min-width: 270px;
    padding: 10px;
    color: var(--gray-800);
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(12px);
}

.dropdown-menu a {
    padding: 9px 12px;
    color: var(--gray-700);
    border-radius: 10px;
}

.dropdown-menu a:hover {
    color: var(--blue);
    background: #eff6ff;
}

.header-search {
    position: relative;
    flex: 1;
    max-width: 420px;
    margin-left: auto;
}

.header-search input,
.mobile-search input,
.page-search input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    padding: 10px 44px 10px 18px;
    backdrop-filter: blur(10px);
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.page-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.header-search button {
    position: absolute;
    top: 50%;
    right: 12px;
    border: 0;
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
}

.mobile-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    color: #fff;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
}

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

.mobile-search {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.mobile-search button,
.page-search button {
    border: 0;
    border-radius: 999px;
    color: var(--blue);
    background: #fff;
    padding: 0 20px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-panel nav a {
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(180deg, #111827, #1f2937);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.5) 46%, rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
}

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #fff;
    background: var(--red);
    border-radius: 999px;
    padding: 7px 15px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--blue);
    background: #dbeafe;
}

.light-head .eyebrow,
.section-green .eyebrow,
.site-cta .eyebrow {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.hero h1 {
    max-width: 820px;
    margin: 18px 0 16px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 12px 38px rgba(0, 0, 0, 0.55);
}

.hero p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.footer-tags a {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

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

.primary-button {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
}

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

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.white-button {
    color: var(--blue);
    background: #fff;
}

.full-button {
    width: 100%;
}

.hero-dots {
    position: absolute;
    right: 40px;
    bottom: 36px;
    display: flex;
    gap: 8px;
}

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

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

.site-section,
.hot-rail {
    padding: 58px 0;
}

.bg-white {
    background: #fff;
}

.bg-soft {
    background: var(--gray-100);
}

.section-orange {
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.section-green {
    color: #fff;
    background: linear-gradient(135deg, var(--green), var(--teal));
}

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

.section-head h2 {
    margin: 10px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.light-head {
    color: #fff;
}

.section-link {
    color: var(--blue);
    background: #eff6ff;
}

.rail-controls {
    display: flex;
    gap: 8px;
}

.rail-controls button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 26px;
}

.rail-list {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.rail-list::-webkit-scrollbar {
    display: none;
}

.rail-list .movie-card {
    flex: 0 0 300px;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.movie-card a {
    display: block;
    height: 100%;
}

.card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

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

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

.card-body {
    padding: 16px;
}

.card-badges,
.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.card-badges span,
.detail-badges span,
.detail-badges a {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--blue);
    background: #eff6ff;
    font-size: 12px;
    font-weight: 800;
}

.card-badges span + span,
.detail-badges span {
    color: var(--gray-700);
    background: var(--gray-100);
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

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

.movie-card p {
    display: -webkit-box;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--gray-500);
    font-size: 12px;
}

.card-meta span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card-compact h3 {
    min-height: 40px;
    font-size: 14px;
}

.compact-body {
    padding: 12px;
}

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

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

.movie-card-list .card-body {
    display: flex;
    min-height: 170px;
    flex-direction: column;
    justify-content: center;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.35);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.category-pills a {
    display: inline-flex;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--gray-700);
    background: #fff;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.08);
    font-weight: 800;
}

.category-pills a:hover {
    color: #fff;
    background: var(--blue);
}

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

.site-cta {
    color: #fff;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    padding: 62px 0;
    text-align: center;
}

.cta-inner h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
}

.cta-inner p {
    max-width: 720px;
    margin: 0 auto 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.page-hero {
    color: #fff;
    padding: 58px 0;
}

.page-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
}

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

.blue-hero {
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.green-hero {
    background: linear-gradient(135deg, var(--green), var(--teal));
}

.dark-hero {
    background: linear-gradient(135deg, #111827, #374151);
}

.search-hero {
    background: linear-gradient(135deg, #0f766e, #16a34a);
}

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

.detail-breadcrumb {
    color: var(--gray-500);
}

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.category-card div {
    padding: 20px;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--gray-500);
    line-height: 1.6;
}

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

.filter-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}

.filter-title {
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    min-height: 42px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 0 12px;
    outline: 0;
}

.filter-panel input {
    flex: 1;
}

.detail-main {
    background: var(--gray-50);
    padding: 36px 0 58px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    box-shadow: var(--shadow-lg);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.16));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay span {
    display: inline-flex;
    width: 86px;
    height: 86px;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 18px 44px rgba(37, 99, 235, 0.5);
    font-size: 44px;
}

.detail-card,
.related-section,
.aside-card {
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-card,
.related-section {
    margin-top: 22px;
    padding: 26px;
}

.detail-heading h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.detail-heading p {
    margin: 0;
    color: var(--gray-500);
    font-size: 18px;
    line-height: 1.7;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 20px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-weight: 750;
}

.detail-section {
    margin-top: 24px;
}

.detail-section h2,
.detail-tags h2,
.aside-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: var(--gray-700);
    line-height: 1.9;
    white-space: pre-line;
}

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

.detail-tags span {
    color: var(--gray-700);
    background: var(--gray-100);
}

.detail-aside {
    display: grid;
    align-content: start;
    gap: 22px;
}

.aside-card {
    padding: 20px;
}

.aside-card > img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: 16px;
}

.aside-card p {
    color: var(--gray-500);
    line-height: 1.7;
}

.sticky-card {
    position: sticky;
    top: 88px;
}

.side-link {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--gray-100);
}

.side-link img {
    width: 96px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.side-link strong {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-link small {
    display: block;
    margin-top: 4px;
    color: var(--gray-500);
}

.page-search {
    display: flex;
    gap: 12px;
    max-width: 680px;
    margin-top: 24px;
}

.page-search input {
    color: #fff;
}

.search-summary {
    margin-bottom: 22px;
    color: var(--gray-700);
    font-weight: 800;
}

.text-page {
    max-width: 860px;
}

.text-page h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.text-page p {
    margin: 0 0 24px;
    color: var(--gray-700);
    line-height: 1.85;
}

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

.faq-grid article {
    padding: 24px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.faq-grid h2 {
    margin: 0 0 10px;
}

.faq-grid p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.75;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 48px 0;
}

.site-footer .brand {
    margin-bottom: 14px;
}

.site-footer p {
    margin: 0;
    color: #9ca3af;
    line-height: 1.75;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

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

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

.footer-tags a {
    color: #dbeafe;
    background: rgba(96, 165, 250, 0.16);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .hero {
        height: 520px;
    }

    .three-grid,
    .four-grid,
    .five-grid,
    .category-grid,
    .faq-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .sticky-card {
        position: static;
    }

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

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

    .brand-name {
        font-size: 18px;
    }

    .hero {
        height: 500px;
    }

    .hero-content {
        bottom: 52px;
    }

    .hero p {
        font-size: 16px;
        line-height: 1.65;
    }

    .hero-dots {
        right: 20px;
        bottom: 22px;
    }

    .section-head,
    .filter-panel,
    .page-search,
    .footer-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .three-grid,
    .four-grid,
    .five-grid,
    .category-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-list a {
        grid-template-columns: 1fr;
    }

    .movie-card-list .list-cover {
        min-height: 190px;
        aspect-ratio: 16 / 9;
    }

    .rail-list .movie-card {
        flex-basis: 280px;
    }

    .site-section,
    .hot-rail {
        padding: 42px 0;
    }

    .detail-card,
    .related-section {
        padding: 20px;
    }
}
