:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-900: #0c4a6e;
    --bamboo-50: #f0fdf4;
    --bamboo-100: #dcfce7;
    --bamboo-600: #16a34a;
    --mist-50: #f8fafc;
    --mist-100: #f1f5f9;
    --mist-200: #e2e8f0;
    --mist-300: #cbd5e1;
    --mist-500: #64748b;
    --mist-600: #475569;
    --mist-700: #334155;
    --mist-900: #0f172a;
    --white: #ffffff;
    --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--mist-900);
    background: linear-gradient(180deg, var(--mist-50), var(--white));
    -webkit-font-smoothing: antialiased;
}

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.95);
    border-bottom: 1px solid var(--mist-200);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(12px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    color: var(--mist-900);
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-600), var(--bamboo-600));
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.22);
}

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

.nav-menu a {
    color: var(--mist-700);
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.header-search,
.footer-search,
.hero-search,
.search-panel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.footer-search input,
.hero-search input,
.search-panel input,
.filter-input {
    width: 100%;
    border: 1px solid var(--mist-300);
    border-radius: 12px;
    padding: 11px 14px;
    color: var(--mist-900);
    outline: none;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 230px;
}

.header-search input:focus,
.footer-search input:focus,
.hero-search input:focus,
.search-panel input:focus,
.filter-input:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.header-search button,
.footer-search button,
.hero-search button,
.search-panel button,
.btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    color: #fff;
    font-weight: 750;
    background: var(--primary-600);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.header-search button:hover,
.footer-search button:hover,
.hero-search button:hover,
.search-panel button:hover,
.btn:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.22);
}

.btn.secondary {
    background: var(--bamboo-600);
}

.btn.ghost {
    color: var(--primary-700);
    background: #fff;
    border: 2px solid var(--primary-600);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--mist-700);
    background: var(--mist-100);
}

.hero {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    color: #fff;
    background: #020617;
}

.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.03);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.62) 45%, rgba(2, 6, 23, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 590px;
    display: flex;
    align-items: center;
}

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

.eyebrow,
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 750;
    color: #fff;
    background: var(--primary-600);
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.detail-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hero-search {
    max-width: 540px;
    margin-top: 24px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-search input {
    border-color: transparent;
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.04);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.hero-dots button {
    width: 18px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 36px;
    background: #fff;
}

.section {
    padding: 54px 0;
}

.section.soft {
    background: linear-gradient(90deg, var(--bamboo-50), var(--primary-50));
}

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

.section-heading div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-heading span {
    display: inline-flex;
    color: var(--primary-600);
    font-size: 25px;
}

.section-heading h2 {
    margin: 0;
    color: var(--mist-900);
    font-size: 27px;
}

.section-heading a {
    color: var(--primary-700);
    font-weight: 750;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--mist-200);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--mist-200);
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster::after {
    opacity: 1;
}

.play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary-600);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    border-radius: 8px;
    padding: 4px 8px;
    color: #fff;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.7);
}

.card-body {
    padding: 18px;
}

.card-body h2,
.card-body h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
    color: var(--primary-600);
}

.card-body p {
    min-height: 44px;
    margin: 0 0 14px;
    color: var(--mist-600);
    font-size: 14px;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--mist-500);
    font-size: 13px;
}

.card-meta a {
    color: var(--primary-700);
    font-weight: 700;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.card-tags span,
.detail-tags a,
.filter-btn {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--mist-600);
    font-size: 12px;
    font-weight: 650;
    background: var(--mist-100);
}

.compact-card .poster {
    aspect-ratio: 16 / 9;
}

.compact-card .card-body p {
    display: none;
}

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

.list-column h2 {
    margin: 0 0 18px;
    font-size: 25px;
}

.list-row {
    display: grid;
    grid-template-columns: auto 116px 1fr auto;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--mist-200);
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.list-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.row-rank {
    width: 44px;
    text-align: center;
    color: var(--primary-700);
    font-size: 18px;
    font-weight: 900;
}

.row-thumb {
    display: block;
    width: 116px;
    height: 74px;
    overflow: hidden;
    background: var(--mist-200);
}

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

.row-main strong,
.row-main em {
    display: block;
}

.row-main strong {
    margin-bottom: 5px;
    color: var(--mist-900);
}

.row-main em {
    color: var(--mist-600);
    font-size: 13px;
    font-style: normal;
    line-height: 1.45;
}

.row-meta {
    padding-right: 16px;
    color: var(--mist-500);
    font-size: 13px;
}

.page-hero {
    padding: 56px 0;
    color: #fff;
    background: linear-gradient(120deg, var(--primary-600), var(--bamboo-600));
}

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

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 17px;
    line-height: 1.75;
}

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

.category-card {
    border: 1px solid var(--mist-200);
    border-radius: 20px;
    padding: 24px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2 {
    margin: 0 0 10px;
    font-size: 23px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--mist-600);
    line-height: 1.7;
}

.category-card strong {
    color: var(--primary-700);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filter-btn {
    border: 0;
    color: var(--mist-700);
}

.filter-btn.active,
.filter-btn:hover {
    color: #fff;
    background: var(--primary-600);
}

.filter-input {
    max-width: 320px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
    gap: 28px;
    padding: 34px 0 54px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    box-shadow: var(--shadow-xl);
    aspect-ratio: 16 / 9;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 0, 0, 0.22);
    transition: opacity 0.2s ease, background 0.2s ease;
}

.player-overlay:hover {
    background: rgba(0, 0, 0, 0.32);
}

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

.player-icon {
    display: flex;
    width: 82px;
    height: 82px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary-600);
    font-size: 34px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.player-overlay:hover .player-icon {
    transform: scale(1.08);
}

.detail-panel,
.related-panel {
    margin-top: 22px;
    border: 1px solid var(--mist-200);
    border-radius: 18px;
    padding: 24px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.detail-panel:first-child,
.related-panel:first-child {
    margin-top: 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--mist-500);
    font-size: 13px;
}

.breadcrumb a {
    color: var(--primary-700);
    font-weight: 700;
}

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-bottom: 20px;
    color: var(--mist-600);
}

.detail-meta span,
.detail-meta a {
    border-radius: 999px;
    padding: 6px 11px;
    background: var(--mist-100);
}

.detail-meta a {
    color: var(--primary-700);
    font-weight: 750;
}

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

.detail-section h2,
.related-panel h2 {
    margin: 0 0 12px;
    font-size: 21px;
}

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

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.related-panel {
    position: sticky;
    top: 88px;
}

.related-list .list-row {
    grid-template-columns: 88px 1fr;
    min-height: 72px;
}

.related-list .row-thumb {
    width: 88px;
    height: 58px;
}

.related-list .row-meta,
.related-list .row-rank {
    display: none;
}

.search-box-page {
    max-width: 760px;
    margin-top: 22px;
}

.search-results-note {
    margin: 0 0 22px;
    color: var(--mist-600);
}

.site-footer {
    color: var(--mist-300);
    background: var(--mist-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.footer-brand {
    color: #fff;
}

.site-footer p {
    max-width: 430px;
    color: var(--mist-300);
    line-height: 1.75;
}

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

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

.footer-links a {
    color: var(--mist-300);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px;
    text-align: center;
    color: var(--mist-500);
}

.empty-state {
    padding: 42px;
    border: 1px dashed var(--mist-300);
    border-radius: 18px;
    text-align: center;
    color: var(--mist-600);
    background: #fff;
}

@media (max-width: 980px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 0;
    }

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

    .nav-menu {
        display: none;
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 0;
    }

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

    .header-search {
        order: 3;
        width: 100%;
    }

    .header-search input {
        width: 100%;
    }

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

    .list-grid,
    .detail-layout,
    .footer-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .related-panel {
        position: static;
    }
}

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

    .hero,
    .hero-content {
        min-height: 540px;
    }

    .hero-copy {
        padding: 64px 0 88px;
    }

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

    .hero-search,
    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 38px 0;
    }

    .movie-grid,
    .movie-grid.three {
        grid-template-columns: 1fr;
    }

    .list-row {
        grid-template-columns: 96px 1fr;
        gap: 12px;
    }

    .row-rank,
    .row-meta {
        display: none;
    }

    .row-thumb {
        width: 96px;
        height: 64px;
    }

    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-input {
        max-width: none;
    }
}
