:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #3b82f6;
    --primary-600: #1e40af;
    --primary-700: #1e3a8a;
    --secondary-50: #f0fdf4;
    --secondary-600: #065f46;
    --accent-50: #fef3c7;
    --accent-600: #92400e;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 25px 60px rgba(15, 23, 42, 0.18);
    --radius-lg: 14px;
    --radius-xl: 20px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--gray-200);
    backdrop-filter: blur(18px);
}

.header-inner,
.section-inner,
.footer-inner {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 74px;
}

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

.brand-mark {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    box-shadow: 0 12px 30px rgba(30, 64, 175, 0.28);
}

.brand-mark span {
    position: absolute;
    top: 50%;
    left: 53%;
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid var(--white);
    transform: translate(-50%, -50%);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    color: var(--gray-900);
}

.brand-text small {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 13px;
}

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

.nav-link,
.mobile-link {
    color: var(--gray-700);
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.top-search,
.mobile-search,
.hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    outline: none;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    width: 220px;
    padding: 10px 12px;
}

.top-search button,
.mobile-search button,
.hero-search button,
.btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    color: var(--white);
    background: var(--primary-600);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.btn:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--gray-700);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--gray-200);
    padding: 16px;
    background: var(--white);
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-search input {
    flex: 1;
    padding: 10px 12px;
}

.hero-section {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700) 48%, var(--secondary-600));
    overflow: hidden;
}

.hero-inner {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.2fr);
    gap: 40px;
    align-items: center;
    padding: 64px 0;
}

.hero-intro h1 {
    margin: 12px 0 18px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-intro p {
    max-width: 620px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: 19px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-600);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow.light {
    color: #bfdbfe;
}

.hero-search {
    max-width: 580px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
}

.hero-search button {
    padding: 14px 22px;
    background: var(--white);
    color: var(--primary-600);
}

.hero-search button:hover {
    background: var(--gray-100);
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-chips a {
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #e0f2fe;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-chips a:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.hero-carousel {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
    background: #000000;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18) 60%, rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 34px;
    max-width: 690px;
}

.hero-label {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-500);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
}

.hero-content h2 {
    margin: 14px 0 10px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.hero-content p {
    margin: 0 0 14px;
    color: #e5e7eb;
    font-size: 17px;
}

.hero-meta,
.detail-meta,
.movie-meta,
.compact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #eff6ff;
    font-size: 13px;
}

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

.btn-light {
    color: var(--primary-600);
    background: var(--white);
}

.btn-light:hover {
    color: var(--primary-700);
    background: var(--gray-100);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    right: 26px;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

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

.hero-dot.active {
    width: 28px;
    background: var(--white);
}

.content-section {
    padding: 64px 0;
    background: var(--gray-50);
}

.content-section.soft {
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-50));
}

.content-section.warm {
    background: linear-gradient(135deg, var(--accent-50), var(--secondary-50));
}

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

.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-link {
    color: var(--primary-600);
    font-weight: 800;
}

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

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

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--gray-200);
}

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

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

.poster-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.play-chip,
.rank-badge {
    position: absolute;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(30, 64, 175, 0.92);
}

.rank-badge {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    background: rgba(146, 64, 14, 0.94);
}

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

.movie-meta,
.compact-meta {
    color: var(--gray-500);
    font-size: 13px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.compact-title:hover,
.category-card a:hover {
    color: var(--primary-600);
}

.movie-card p,
.compact-card p,
.category-card p,
.footer-brand p {
    margin: 0;
    color: var(--gray-600);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-600);
    font-size: 12px;
    font-weight: 700;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 30px;
    align-items: start;
}

.compact-heading {
    align-items: center;
    margin-bottom: 22px;
}

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

.category-tile,
.category-card {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile {
    display: grid;
    gap: 8px;
    padding: 24px;
}

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

.category-tile span,
.category-card-head span {
    color: var(--primary-600);
    font-size: 20px;
    font-weight: 900;
}

.category-tile strong,
.category-card p {
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
}

.ranking-card,
.side-card,
.detail-card,
.category-card,
.filter-panel,
.search-summary {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.ranking-card {
    padding: 24px;
}

.compact-list {
    display: grid;
    gap: 14px;
}

.compact-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border-radius: 14px;
    background: var(--white);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: var(--gray-100);
    transform: translateX(2px);
}

.compact-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: var(--gray-200);
}

.compact-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-title {
    display: inline-block;
    color: var(--gray-900);
    font-weight: 900;
    line-height: 1.35;
}

.compact-card p {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.45;
}

.compact-rank {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--accent-600);
    font-weight: 900;
}

.page-hero,
.detail-top {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
}

.page-hero .section-inner {
    padding: 58px 0 56px;
}

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

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

.category-hero {
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
}

.ranking-hero {
    background: linear-gradient(135deg, var(--secondary-600), var(--primary-600));
}

.search-hero {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
}

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

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 12px 14px;
}

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

.category-card {
    padding: 24px;
}

.category-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.category-card-head strong {
    color: var(--primary-600);
    font-size: 14px;
}

.category-card ul {
    margin: 16px 0 0;
    padding-left: 18px;
    color: var(--gray-700);
}

.category-card li + li {
    margin-top: 8px;
}

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

.ranking-list .compact-card {
    padding: 10px;
    box-shadow: var(--shadow-sm);
}

.search-summary {
    margin-bottom: 24px;
    padding: 22px;
}

.search-summary h2 {
    margin: 0 0 6px;
}

.detail-top {
    padding: 0 0 64px;
    background: linear-gradient(180deg, var(--primary-700), var(--gray-50) 340px);
}

.detail-top .section-inner {
    padding-top: 28px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: var(--shadow-lg);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.play-button::after {
    position: absolute;
    top: 50%;
    left: 54%;
    content: "";
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 23px solid var(--primary-600);
    transform: translate(-50%, -50%);
}

.detail-card {
    margin-top: 22px;
    padding: 28px;
    color: var(--gray-900);
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.2;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 700;
}

.lead-text {
    margin: 20px 0;
    color: var(--gray-700);
    font-size: 18px;
}

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

.detail-section {
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

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

.detail-section h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

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

.review-box {
    padding: 24px;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
}

.detail-side {
    position: sticky;
    top: 98px;
}

.side-card {
    padding: 22px;
    color: var(--gray-900);
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 34px;
}

.brand-footer .brand-text strong,
.site-footer h3 {
    color: var(--white);
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-brand p {
    max-width: 460px;
    margin-top: 16px;
    color: #9ca3af;
}

[hidden] {
    display: none !important;
}

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

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

    .detail-side {
        position: static;
    }

    .ranking-list,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-inner {
        padding: 46px 0;
    }

    .hero-carousel {
        min-height: 390px;
    }

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

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

@media (max-width: 640px) {
    .header-inner,
    .section-inner,
    .footer-inner,
    .hero-inner {
        width: min(100% - 22px, var(--max));
    }

    .brand-text small {
        display: none;
    }

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .ranking-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

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

    .hero-search {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-carousel {
        min-height: 360px;
        border-radius: 20px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 24px;
    }

    .hero-control {
        display: none;
    }

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

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

    .page-hero .section-inner {
        padding: 42px 0;
    }

    .detail-card,
    .side-card,
    .ranking-card,
    .category-card {
        padding: 18px;
    }

    .compact-card {
        grid-template-columns: 66px minmax(0, 1fr);
    }

    .play-button {
        width: 66px;
        height: 66px;
    }
}
