* {
    box-sizing: border-box;
}

:root {
    --primary-50: #e6f2f8;
    --primary-100: #cce5f1;
    --primary-400: #3397c7;
    --primary-600: #006494;
    --primary-700: #004b6f;
    --primary-800: #00324a;
    --secondary-600: #147494;
    --accent-500: #f5c30f;
    --accent-600: #c49c0c;
    --neutral-50: #f8f9fa;
    --neutral-100: #f1f3f5;
    --neutral-200: #e9ecef;
    --neutral-300: #dee2e6;
    --neutral-500: #adb5bd;
    --neutral-600: #6c757d;
    --neutral-700: #495057;
    --neutral-900: #212529;
    --white: #ffffff;
    --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 16px 45px rgba(0, 0, 0, 0.18);
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
}

.header-inner {
    min-height: 76px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    color: var(--white);
    font-size: 14px;
    box-shadow: var(--shadow-soft);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.brand-copy small {
    color: var(--neutral-600);
    font-size: 12px;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
}

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

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

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 320px;
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 11px 12px;
    background: transparent;
}

.header-search button {
    border: 0;
    color: var(--white);
    background: var(--primary-600);
    padding: 11px 14px;
    cursor: pointer;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--neutral-100);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--neutral-700);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600) 48%, var(--secondary-600));
}

.hero-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(20px);
    opacity: 0.25;
    pointer-events: none;
}

.hero-glow-one {
    width: 420px;
    height: 420px;
    right: -100px;
    top: 80px;
    background: var(--accent-500);
}

.hero-glow-two {
    width: 320px;
    height: 320px;
    left: -80px;
    bottom: 40px;
    background: var(--primary-100);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    align-items: center;
    gap: 48px;
    min-height: 620px;
    padding: 72px 0;
}

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

.hero h1,
.page-hero h1 {
    margin: 14px 0 22px;
    font-size: clamp(36px, 5vw, 66px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
}

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

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

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.button-light {
    background: var(--white);
    color: var(--primary-700);
}

.button-ghost {
    background: rgba(0, 50, 74, 0.42);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.hero-feature-row span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
}

.hero-stage {
    position: relative;
    min-height: 470px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: center;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-strong);
    opacity: 0;
    transform: translateX(24px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow-strong);
}

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

.hero-score {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.7);
    font-weight: 800;
}

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

.hero-slide-copy p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.hero-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 13px;
}

.hero-dots {
    position: absolute;
    left: 26px;
    bottom: 20px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

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

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

.page-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600), var(--secondary-600));
    padding: 76px 0;
}

.compact-hero h1,
.category-hero h1 {
    max-width: 850px;
}

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

.section-muted {
    background: var(--neutral-100);
}

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

.section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

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

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

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

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

.poster-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--primary-100), var(--neutral-200));
}

.movie-card-large .poster-frame {
    aspect-ratio: 4 / 3;
}

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

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

.duration-pill,
.category-pill,
.score-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.duration-pill {
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.68);
}

.category-pill {
    left: 10px;
    top: 10px;
    padding: 4px 8px;
    color: var(--white);
    background: var(--primary-600);
}

.score-pill {
    right: 10px;
    top: 10px;
    padding: 4px 8px;
    color: var(--white);
    background: var(--accent-600);
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    color: var(--primary-700);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

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

.movie-card-large .movie-card-body {
    padding: 22px;
}

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

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

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: var(--neutral-600);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    display: flex;
    align-items: end;
    border-radius: var(--radius-xl);
    background: var(--neutral-900);
    box-shadow: var(--shadow-soft);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    transition: transform 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
}

.category-tile span {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    color: var(--white);
}

.category-tile strong {
    font-size: 20px;
}

.category-tile small {
    color: rgba(255, 255, 255, 0.78);
}

.filter-section {
    padding: 28px 0;
    background: var(--white);
    border-top: 1px solid var(--neutral-200);
    border-bottom: 1px solid var(--neutral-200);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
    gap: 14px;
    align-items: end;
}

.filter-panel label {
    display: block;
    margin-bottom: 6px;
    color: var(--neutral-700);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    padding: 0 12px;
    background: var(--white);
    color: var(--neutral-900);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(0, 100, 148, 0.14);
}

.filter-panel button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    background: var(--primary-600);
    color: var(--white);
    font-weight: 800;
    cursor: pointer;
}

.empty-state {
    margin: 28px 0 0;
    padding: 18px;
    border: 1px dashed var(--neutral-300);
    border-radius: var(--radius-lg);
    color: var(--neutral-600);
    background: var(--white);
    text-align: center;
}

.category-panel-grid {
    display: grid;
    gap: 28px;
}

.category-panel {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 28px;
    padding: 24px;
    border-radius: var(--radius-2xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.category-panel-cover {
    overflow: hidden;
    min-height: 240px;
    border-radius: var(--radius-xl);
    background: var(--neutral-200);
}

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

.category-panel h2 {
    margin: 8px 0 10px;
    font-size: 30px;
}

.category-panel p {
    margin: 0 0 18px;
    color: var(--neutral-600);
}

.mini-card-list {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.mini-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
}

.mini-card img {
    width: 96px;
    height: 58px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--neutral-200);
}

.mini-card span {
    min-width: 0;
}

.mini-card strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mini-card small {
    display: block;
    margin-top: 4px;
    color: var(--neutral-600);
}

.rank-grid .movie-card:first-child,
.rank-grid .movie-card:nth-child(2) {
    grid-column: span 2;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 42px 76px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 900;
}

.rank-list img {
    width: 76px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--neutral-200);
}

.rank-list strong {
    display: block;
}

.rank-list small {
    display: block;
    color: var(--neutral-600);
}

.movie-detail-hero {
    padding: 34px 0 20px;
}

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

.detail-main {
    display: grid;
    gap: 20px;
}

.back-link {
    display: inline-flex;
    width: fit-content;
    color: var(--primary-600);
    font-weight: 800;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-2xl);
    background: #050b12;
    box-shadow: var(--shadow-strong);
}

.video-player {
    width: 100%;
    height: 100%;
    background: #050b12;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.62));
    cursor: pointer;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: var(--primary-600);
    box-shadow: var(--shadow-strong);
    font-size: 28px;
}

.player-status {
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 5;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.55);
    font-size: 12px;
}

.detail-card,
.sidebar-card {
    border-radius: var(--radius-2xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-card {
    padding: 28px;
}

.detail-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.detail-title-row h1 {
    margin: 8px 0 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.category-link {
    flex: none;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-100);
    font-weight: 800;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

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

.one-line {
    margin: 0 0 24px;
    color: var(--neutral-700);
    font-size: 18px;
    font-weight: 600;
}

.prose-block {
    padding-top: 22px;
    border-top: 1px solid var(--neutral-200);
}

.prose-block h2,
.tag-cloud h2,
.sidebar-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.prose-block p {
    margin: 0 0 22px;
    color: var(--neutral-700);
    white-space: pre-line;
}

.tag-cloud {
    padding-top: 22px;
    border-top: 1px solid var(--neutral-200);
}

.tag-cloud div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--neutral-700);
    background: var(--neutral-100);
    font-size: 13px;
    font-weight: 700;
}

.detail-sidebar {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 20px;
}

.sidebar-card {
    padding: 20px;
}

.poster-info-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-xl);
    object-fit: cover;
    background: var(--neutral-200);
}

.poster-info-card h2 {
    margin-top: 16px;
}

.poster-info-card p {
    color: var(--neutral-600);
}

.search-page-filter .filter-panel {
    grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
}

.site-footer {
    background: var(--neutral-900);
    color: var(--neutral-300);
    padding: 54px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.brand-footer .brand-copy strong {
    color: var(--white);
}

.footer-brand p {
    max-width: 520px;
    color: var(--neutral-500);
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--neutral-400);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-400);
}

@media (max-width: 1080px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .nav-toggle {
        display: block;
        justify-self: end;
    }

    .main-nav,
    .header-search {
        display: none;
    }

    .main-nav.is-open,
    .header-search.is-open {
        grid-column: 1 / -1;
        display: flex;
        width: 100%;
    }

    .main-nav.is-open {
        justify-content: flex-start;
        flex-wrap: wrap;
        padding-top: 10px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hero-stage {
        min-height: 430px;
    }

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

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

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

    .detail-sidebar {
        position: static;
    }
}

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

    .brand-copy strong {
        font-size: 18px;
    }

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

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

    .hero-stage {
        min-height: 640px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: start;
    }

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

    .movie-grid,
    .rank-list,
    .footer-grid,
    .category-tile-grid,
    .filter-panel,
    .search-page-filter .filter-panel,
    .category-panel {
        grid-template-columns: 1fr;
    }

    .rank-grid .movie-card:first-child,
    .rank-grid .movie-card:nth-child(2) {
        grid-column: auto;
    }

    .section-heading,
    .detail-title-row {
        align-items: start;
        flex-direction: column;
    }

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

    .page-hero {
        padding: 52px 0;
    }
}
