:root {
    --primary: #0073e6;
    --primary-dark: #005bb3;
    --primary-soft: #e6f2ff;
    --accent: #e67300;
    --accent-soft: #fff3e6;
    --neutral-50: #f8f9fa;
    --neutral-100: #e9ecef;
    --neutral-200: #dee2e6;
    --neutral-500: #6c757d;
    --neutral-700: #343a40;
    --neutral-900: #0d0f12;
    --white: #ffffff;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(13, 15, 18, 0.08);
    --shadow-strong: 0 24px 50px rgba(13, 15, 18, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

img,
video {
    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: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(222, 226, 230, 0.8);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 22px rgba(0, 115, 230, 0.25);
}

.brand-text,
.footer-brand {
    font-size: 1.35rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--neutral-700);
    font-weight: 600;
}

.nav-link {
    transition: color 0.2s ease;
}

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

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

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 4px;
    background: var(--neutral-900);
}

.mobile-nav {
    display: none;
    padding: 10px 16px 18px;
    border-top: 1px solid var(--neutral-200);
    background: var(--white);
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-nav-link {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--neutral-700);
    font-weight: 600;
}

.main-content {
    padding-top: 76px;
}

.hero {
    position: relative;
    height: min(720px, 72vh);
    min-height: 540px;
    overflow: hidden;
    background: var(--neutral-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 5s ease;
}

.hero-slide.is-active .hero-image {
    transform: scale(1);
}

.hero::after,
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-slide::after {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.48) 52%, rgba(0, 0, 0, 0.18) 100%);
}

.hero::after {
    background: radial-gradient(circle at 18% 78%, rgba(0, 115, 230, 0.34), transparent 32%), radial-gradient(circle at 82% 26%, rgba(230, 115, 0, 0.24), transparent 28%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 76px;
    color: var(--white);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
}

.hero h1 {
    max-width: 850px;
    margin: 0 0 18px;
    font-size: clamp(2.35rem, 5vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 760px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 22px;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 12px 24px rgba(0, 115, 230, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 18px 32px rgba(0, 115, 230, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.btn-ghost {
    background: var(--white);
    color: var(--neutral-900);
    border: 1px solid var(--neutral-200);
}

.btn-ghost:hover {
    color: var(--primary);
    box-shadow: var(--shadow);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

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

.content-section.white {
    background: var(--white);
}

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

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: var(--neutral-900);
    font-size: clamp(1.65rem, 2.8vw, 2.4rem);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.section-heading p,
.page-title p {
    margin: 8px 0 0;
    color: var(--neutral-500);
}

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

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

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

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

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

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

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

.poster-wide {
    aspect-ratio: auto;
    min-height: 230px;
}

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

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

.poster-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 800;
}

.rank-badge {
    left: 10px;
    right: auto;
    background: var(--accent);
}

.movie-card-body {
    display: grid;
    gap: 9px;
    padding: 15px;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.8em;
    color: var(--neutral-900);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

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

.movie-line {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--neutral-500);
    font-size: 0.9rem;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--neutral-500);
    font-size: 0.82rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-list span,
.info-pill {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.76rem;
    font-weight: 700;
}

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

.category-card {
    overflow: hidden;
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h3 {
    margin: 0 0 8px;
    color: var(--neutral-900);
    font-size: 1.15rem;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--neutral-500);
    font-size: 0.92rem;
}

.category-card strong {
    color: var(--primary);
    font-size: 1.45rem;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.rank-num {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
}

.rank-row img {
    width: 82px;
    height: 108px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--neutral-100);
}

.rank-row h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.rank-row p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--neutral-500);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    padding: 58px 0 36px;
    background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

.page-title {
    max-width: 840px;
}

.toolbar {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(140px, 1fr));
    gap: 12px;
    margin: 26px 0 30px;
}

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

.toolbar input:focus,
.toolbar select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 115, 230, 0.12);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-tabs button {
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--white);
    color: var(--neutral-700);
    box-shadow: 0 5px 16px rgba(13, 15, 18, 0.06);
    cursor: pointer;
}

.filter-tabs button.is-active {
    background: var(--primary);
    color: var(--white);
}

.search-results-note {
    min-height: 28px;
    margin-bottom: 18px;
    color: var(--neutral-500);
    font-weight: 700;
}

.detail-top {
    padding: 28px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--neutral-500);
    font-size: 0.92rem;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
    gap: 34px;
    align-items: start;
}

.player-panel,
.detail-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--neutral-900);
}

.player-wrap video {
    width: 100%;
    height: 100%;
    background: var(--neutral-900);
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(0, 115, 230, 0.22), rgba(0, 0, 0, 0.55));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 20px 45px rgba(0, 115, 230, 0.38);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    background: var(--primary-dark);
    transform: scale(1.06);
}

.detail-title {
    padding: 24px;
}

.detail-title p {
    margin: 14px 0 0;
    color: var(--neutral-500);
    font-size: 1.05rem;
}

.detail-card {
    padding: 24px;
}

.detail-card h2 {
    margin: 0 0 14px;
    font-size: 1.25rem;
}

.detail-card p {
    margin: 0;
    color: var(--neutral-700);
}

.detail-sidebar {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 18px;
}

.poster-large {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--neutral-100);
    box-shadow: var(--shadow);
}

.poster-large img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.info-list {
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--neutral-500);
}

.info-row strong {
    color: var(--neutral-900);
    text-align: right;
}

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

.site-footer {
    margin-top: 32px;
    padding: 52px 0 24px;
    background: var(--neutral-900);
    color: #ced4da;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1.2fr;
    gap: 38px;
    padding-bottom: 32px;
}

.site-footer p {
    max-width: 440px;
    margin: 16px 0 0;
    color: #adb5bd;
}

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

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

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

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid #212529;
    color: #868e96;
    font-size: 0.92rem;
}

.hidden-card {
    display: none !important;
}

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

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

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

    .detail-sidebar {
        position: static;
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 560px;
        height: 72vh;
    }

    .hero-content {
        padding-bottom: 72px;
    }

    .hero-control {
        display: none;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

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

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

    .poster-wide {
        aspect-ratio: 3 / 4;
        min-height: auto;
    }

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

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

    .rank-row {
        grid-template-columns: 44px 66px minmax(0, 1fr);
    }

    .rank-row .btn-ghost {
        grid-column: 1 / -1;
    }

    .rank-row img {
        width: 66px;
        height: 88px;
    }

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

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

    .footer-bottom {
        flex-direction: column;
    }
}

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

    .header-inner {
        height: 66px;
    }

    .main-content {
        padding-top: 66px;
    }

    .brand-text {
        font-size: 1.08rem;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    .hero {
        min-height: 520px;
    }

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

    .movie-grid,
    .movie-grid.compact,
    .movie-grid.wide-grid,
    .category-strip {
        gap: 14px;
    }

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

    .movie-title {
        font-size: 0.92rem;
    }

    .movie-line {
        font-size: 0.82rem;
    }

    .tag-list {
        display: none;
    }

    .category-card {
        padding: 18px;
    }
}
