:root {
    --primary-50: #fef3e7;
    --primary-400: #f5b759;
    --primary-500: #f3ab3c;
    --primary-600: #f19d36;
    --accent-500: #ff835c;
    --secondary-50: #f7fafc;
    --secondary-100: #d9e2ec;
    --secondary-400: #829ab1;
    --secondary-500: #627d98;
    --secondary-600: #486581;
    --secondary-700: #334e68;
    --secondary-800: #243b53;
    --secondary-900: #102a43;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --shadow-soft: 0 2px 15px rgba(0, 0, 0, .08);
    --shadow-medium: 0 8px 24px rgba(16, 42, 67, .13);
    --shadow-strong: 0 8px 40px rgba(0, 0, 0, .16);
    --shadow-glow: 0 0 20px rgba(243, 171, 60, .3);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--gray-50);
    color: var(--secondary-700);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid rgba(229, 231, 235, .9);
    backdrop-filter: blur(12px);
}

.nav-shell,
.footer-shell,
.quick-shell,
.content-section,
.detail-shell,
.page-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-shell {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--secondary-800);
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    color: var(--white);
    box-shadow: var(--shadow-glow);
    font-size: 13px;
    transition: transform .25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-size: 15px;
    font-weight: 650;
    color: var(--secondary-600);
    transition: color .2s ease;
}

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

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

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--secondary-700);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--gray-100);
    padding: 8px 16px 16px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--secondary-600);
    font-weight: 650;
}

.mobile-link:hover {
    background: var(--primary-50);
    color: var(--primary-600);
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .65s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .3;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--secondary-900), rgba(16, 42, 67, .82), transparent);
}

.hero-inner {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: var(--white);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-400);
    font-weight: 750;
    letter-spacing: .02em;
}

.hero-copy h1 {
    margin: 14px 0 16px;
    font-size: clamp(40px, 6vw, 60px);
    line-height: 1.05;
    color: var(--white);
}

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.hero-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    font-size: 14px;
    backdrop-filter: blur(4px);
}

.hero-tags span:first-child {
    background: var(--primary-500);
}

.hero-actions,
.section-heading,
.filter-panel,
.detail-meta,
.quick-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-button,
.ghost-button,
.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button,
.search-box button {
    background: var(--primary-500);
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.primary-button:hover,
.search-box button:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

.ghost-button {
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(6px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, .2);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, .3);
    color: var(--white);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .2s ease;
}

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

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.active {
    width: 34px;
    background: var(--primary-500);
}

.quick-search {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.quick-shell {
    padding: 26px 0;
}

.search-box {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    margin-bottom: 18px;
}

.search-box input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--gray-300);
    border-radius: 14px;
    background: var(--white);
    padding: 0 16px;
    color: var(--secondary-700);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(243, 171, 60, .14);
}

.quick-links a {
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--secondary-700);
    font-size: 14px;
    transition: background .2s ease, color .2s ease;
}

.quick-links a:hover {
    background: var(--primary-500);
    color: var(--white);
}

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

.white-section {
    background: var(--white);
    box-shadow: 0 0 0 100vmax var(--white);
    clip-path: inset(0 -100vmax);
}

.gray-section {
    background: var(--gray-50);
    box-shadow: 0 0 0 100vmax var(--gray-50);
    clip-path: inset(0 -100vmax);
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 32px;
}

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

.section-heading p {
    margin: 10px 0 0;
    max-width: 700px;
    color: var(--secondary-500);
    line-height: 1.8;
}

.section-more {
    color: var(--primary-600);
    font-weight: 750;
}

.rail {
    display: flex;
    gap: 24px;
    padding: 4px 4px 20px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.rail-item {
    width: 260px;
    flex: 0 0 auto;
}

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

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

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

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

.movie-card {
    min-width: 0;
}

.movie-card[hidden] {
    display: none;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--secondary-100);
}

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

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

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

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    color: var(--white);
    font-weight: 800;
    box-shadow: var(--shadow-glow);
}

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

.movie-card-body h2 {
    margin: 0 0 8px;
    color: var(--secondary-800);
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-body p {
    margin: 0 0 14px;
    min-height: 42px;
    color: var(--secondary-500);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-row span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--secondary-100);
    color: var(--secondary-700);
    font-size: 12px;
}

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

.category-tile {
    display: block;
    min-height: 220px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--white), var(--primary-50));
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease;
}

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

.category-tile span {
    color: var(--secondary-800);
    font-size: 22px;
    font-weight: 800;
}

.category-tile p {
    color: var(--secondary-500);
    line-height: 1.75;
}

.category-tile ul {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    color: var(--secondary-600);
    font-size: 14px;
}

.category-tile li {
    padding: 3px 0;
}

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

.rank-panel,
.rank-feature,
.detail-card,
.side-card,
.filter-panel {
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.rank-panel {
    padding: 10px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    transition: background .2s ease;
}

.rank-item:hover {
    background: var(--primary-50);
}

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

.rank-title {
    color: var(--secondary-800);
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: var(--secondary-500);
    font-size: 13px;
}

.rank-feature {
    overflow: hidden;
}

.rank-feature img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.rank-feature div {
    padding: 24px;
}

.rank-feature span {
    color: var(--primary-600);
    font-weight: 750;
}

.rank-feature h2 {
    margin: 8px 0 10px;
    color: var(--secondary-800);
}

.rank-feature p {
    color: var(--secondary-500);
    line-height: 1.8;
}

.page-hero {
    background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
    color: var(--white);
}

.compact-hero {
    padding: 74px 0;
}

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

.page-hero p {
    max-width: 760px;
    color: #d1d5db;
    line-height: 1.85;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, .78);
    font-size: 14px;
}

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

.filter-panel {
    margin-bottom: 30px;
    padding: 18px;
}

.filter-panel input {
    flex: 1 1 300px;
}

.filter-panel select {
    flex: 0 1 180px;
}

.filter-count {
    color: var(--secondary-500);
    font-weight: 700;
}

.detail-page {
    padding: 32px 0 70px;
}

.detail-page .breadcrumb {
    color: var(--secondary-500);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
}

.detail-main {
    min-width: 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000000;
    box-shadow: var(--shadow-strong);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .28));
    color: var(--white);
    text-align: center;
    cursor: pointer;
    padding: 24px;
    transition: opacity .25s ease, visibility .25s ease;
}

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

.play-circle {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-500);
    box-shadow: var(--shadow-glow);
    font-size: 28px;
    padding-left: 4px;
}

.play-cover strong {
    font-size: clamp(22px, 3vw, 34px);
}

.play-cover em {
    max-width: 680px;
    color: #d1d5db;
    font-style: normal;
    line-height: 1.7;
}

.detail-card {
    margin-top: 24px;
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 18px;
    color: var(--secondary-800);
    font-size: clamp(28px, 4vw, 40px);
}

.detail-meta {
    padding-bottom: 22px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-meta span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--secondary-600);
}

.detail-meta b {
    color: var(--secondary-800);
}

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

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    color: var(--secondary-800);
    font-size: 22px;
}

.detail-card p {
    color: var(--secondary-600);
    line-height: 1.95;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--gray-200);
}

.tag-cloud span {
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--secondary-100);
    color: var(--secondary-700);
    font-size: 14px;
}

.detail-side {
    min-width: 0;
}

.side-card {
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

.side-related {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-related img {
    width: 82px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: var(--secondary-100);
}

.side-related strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--secondary-800);
    line-height: 1.45;
}

.side-related em {
    display: block;
    margin-top: 6px;
    color: var(--secondary-500);
    font-size: 13px;
    font-style: normal;
}

.more-related {
    margin-top: 46px;
}

.site-footer {
    background: var(--secondary-900);
    color: #d1d5db;
}

.footer-shell {
    padding: 54px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 34px;
}

.footer-logo {
    color: var(--white);
}

.footer-brand p {
    max-width: 480px;
    color: #9fb3c8;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 17px;
}

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

.site-footer li {
    margin: 9px 0;
}

.site-footer a {
    color: #d1d5db;
    transition: color .2s ease;
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: #9fb3c8;
    text-align: center;
    font-size: 14px;
}

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

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

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

    .detail-side .side-card {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

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

    .hero-slider {
        height: 540px;
    }

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

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .four-grid,
    .category-list,
    .small-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .rank-item {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .rank-meta {
        grid-column: 2;
    }

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

@media (max-width: 560px) {
    .nav-shell,
    .footer-shell,
    .quick-shell,
    .content-section,
    .detail-shell,
    .page-hero-inner,
    .hero-inner {
        width: min(100% - 24px, 1180px);
    }

    .hero-slider {
        height: 520px;
    }

    .hero-copy h1 {
        font-size: 34px;
    }

    .hero-actions,
    .search-box {
        grid-template-columns: 1fr;
    }

    .primary-button,
    .ghost-button,
    .search-box button {
        width: 100%;
    }

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

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

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

    .movie-card-body p {
        font-size: 13px;
    }

    .filter-panel {
        align-items: stretch;
    }

    .filter-panel input,
    .filter-panel select {
        flex: 1 1 100%;
    }

    .detail-card {
        padding: 20px;
    }

    .play-circle {
        width: 62px;
        height: 62px;
        font-size: 22px;
    }
}
