:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;
    --text: #171717;
    --muted: #737373;
    --line: #e5e5e5;
    --panel: #ffffff;
    --soft: #f5f5f5;
    --black: #050505;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: #ffffff;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.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 var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

.desktop-nav > a,
.nav-drop-button {
    color: #404040;
    font-weight: 650;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.desktop-nav > a:hover,
.nav-drop-button:hover,
.desktop-nav .is-active {
    color: var(--primary);
}

.nav-dropdown {
    position: relative;
}

.nav-drop-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    display: grid;
    min-width: 190px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

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

.nav-drop-menu a {
    padding: 9px 12px;
    color: #525252;
    border-radius: 10px;
}

.nav-drop-menu a:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

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

.header-search input,
.mobile-search input,
.page-filter input,
.filter-bar input,
.filter-bar select {
    border: 1px solid #d4d4d4;
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 250px;
    padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.page-filter input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.mobile-search button,
.page-filter button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.header-search button {
    padding: 10px 16px;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-panel a {
    padding: 9px 0;
    color: #404040;
    font-weight: 650;
}

.mobile-search {
    display: flex;
    gap: 8px;
}

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

.mobile-search button {
    padding: 10px 16px;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: absolute;
    right: 0;
    bottom: 74px;
    left: 0;
    max-width: 1180px;
    color: #ffffff;
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: #e5e5e5;
    font-size: 19px;
}

.pill {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 6px 13px;
    color: #ffffff;
    background: var(--primary);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
}

.hero-actions,
.page-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

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

.button:hover {
    transform: translateY(-2px);
}

.button.primary,
.button.small {
    color: #ffffff;
    background: var(--primary);
}

.button.primary:hover,
.button.small:hover {
    background: var(--primary-dark);
}

.button.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
}

.button.small {
    min-height: 38px;
    padding: 0 18px;
    font-size: 14px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    border-radius: 50%;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.74);
}

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

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.54);
    border: 0;
    border-radius: 99px;
    cursor: pointer;
    transition: 0.2s ease;
}

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

.section {
    padding: 70px 0;
}

.section-white {
    background: #ffffff;
}

.section-muted {
    background: #f5f5f5;
}

.section-black {
    background: #050505;
}

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.section-action {
    color: var(--primary);
    font-weight: 800;
    white-space: nowrap;
}

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

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

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    background: #111827;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: #171717;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--primary);
}

.movie-line {
    display: -webkit-box;
    overflow: hidden;
    min-height: 46px;
    margin: 10px 0 14px;
    color: #525252;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.compact-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #737373;
    font-size: 13px;
}

.movie-tags {
    margin-top: 12px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.scroll-row {
    display: grid;
    grid-auto-columns: 320px;
    grid-auto-flow: column;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 20px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.8), transparent 32%), linear-gradient(135deg, #0f172a, #111827 58%, #020617);
}

.page-hero.small-hero,
.page-hero.search-hero {
    padding: 74px 0;
}

.page-hero h1 {
    max-width: 760px;
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

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

.page-filter {
    margin-top: 26px;
}

.page-filter input {
    min-width: min(560px, 100%);
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.94);
}

.page-filter button {
    padding: 0 24px;
}

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

.category-panel {
    padding: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-panel-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.category-icon {
    display: grid;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #0891b2);
    border-radius: 14px;
    font-weight: 900;
}

.category-panel h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.category-panel p {
    margin: 0;
    color: var(--muted);
}

.category-preview {
    display: grid;
    gap: 8px;
    margin: 20px 0;
}

.category-preview a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    color: #404040;
    border-bottom: 1px solid #eeeeee;
}

.category-preview a:hover {
    color: var(--primary);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-bar input {
    flex: 1 1 260px;
    padding: 12px 16px;
}

.filter-bar select {
    padding: 12px 16px;
    background: #ffffff;
}

.year-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.year-chips button {
    padding: 8px 12px;
    color: #525252;
    background: #f5f5f5;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.year-chips button:hover,
.year-chips button.is-active {
    color: #ffffff;
    background: var(--primary);
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 128px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.rank-number {
    color: var(--primary);
    font-size: 26px;
    font-weight: 900;
}

.compact-poster {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #111827;
    border-radius: 14px;
}

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

.compact-title {
    color: #171717;
    font-size: 20px;
    font-weight: 850;
}

.compact-title:hover {
    color: var(--primary);
}

.compact-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 10px;
    color: #525252;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.1);
    transform: scale(1.05);
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.86));
}

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

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

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

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

.breadcrumbs a:hover {
    color: #ffffff;
}

.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 860px;
    margin: 0 0 18px;
    color: #e5e5e5;
    font-size: 19px;
}

.detail-meta {
    color: #d4d4d4;
    font-size: 15px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.tag-list span {
    padding: 7px 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

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

.player-start {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    padding: 16px 28px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.94);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    font-weight: 850;
    transform: translate(-50%, -50%);
}

.player-shell.is-playing .player-start {
    display: none;
}

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

.text-panel {
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: #404040;
    white-space: pre-wrap;
}

.site-footer {
    padding: 48px 0;
    color: #d4d4d4;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
}

.footer-brand {
    color: #ffffff;
}

.site-footer p {
    max-width: 520px;
    color: #a3a3a3;
}

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

.site-footer a:not(.brand) {
    display: block;
    margin: 8px 0;
    color: #d4d4d4;
}

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

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

    .mobile-toggle {
        display: block;
    }

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

    .detail-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 28px;
    }
}

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

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        bottom: 80px;
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 48px 0;
    }

    .section-head {
        display: block;
    }

    .section-action {
        display: inline-flex;
        margin-top: 12px;
    }

    .movie-grid.three,
    .movie-grid.four,
    .category-grid,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .compact-card {
        grid-template-columns: auto 90px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .compact-meta {
        display: none;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

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

    .page-filter input {
        min-width: 0;
        flex: 1 1 100%;
    }

    .page-filter button {
        min-height: 44px;
    }
}
