:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --orange-600: #ea580c;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-md: 0 10px 22px rgba(17, 24, 39, 0.10);
    --shadow-xl: 0 18px 44px rgba(17, 24, 39, 0.18);
    --radius-xl: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--gray-50);
    color: var(--gray-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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: 60;
    background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
    color: var(--white);
    box-shadow: 0 12px 28px rgba(180, 83, 9, 0.24);
}

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

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link {
    position: relative;
    font-weight: 600;
    opacity: 0.92;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--amber-100);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 3px;
    border-radius: 999px;
    background: var(--amber-100);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(180, 83, 9, 0.98);
}

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

.mobile-nav-inner {
    display: grid;
    gap: 8px;
    padding: 14px 0 18px;
}

.mobile-link {
    padding: 10px 2px;
    font-weight: 700;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--gray-900);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.42) 54%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 82px;
    color: var(--white);
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--amber-600);
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 16px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 20px);
}

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

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

.primary-button,
.search-form button {
    background: var(--amber-600);
    color: var(--white);
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.30);
}

.primary-button:hover,
.search-form button:hover {
    background: var(--amber-700);
    transform: translateY(-1px);
}

.ghost-button {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

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

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-1px);
}

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

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

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

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

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

.hero-panel {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 86px;
    z-index: 5;
    width: 280px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.72);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(16px);
}

.hero-panel-title {
    color: var(--white);
    font-weight: 800;
    margin-bottom: 12px;
}

.hero-mini-list {
    display: grid;
    gap: 10px;
}

.hero-mini {
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

.hero-mini img {
    width: 68px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
}

.quick-search {
    margin-top: -36px;
    position: relative;
    z-index: 10;
}

.quick-search-box {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 480px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
}

.quick-search-box h2 {
    margin: 0 0 4px;
    font-size: 26px;
}

.quick-search-box p {
    margin: 0;
    color: var(--gray-600);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
    color: var(--gray-900);
    padding: 0 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-chips a {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--amber-50);
    color: var(--amber-700);
    font-weight: 800;
}

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

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

.warm-section {
    background: linear-gradient(135deg, var(--amber-50), #fff7ed);
}

.section-head {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 28px;
}

.section-kicker {
    color: var(--amber-600);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.section-line {
    flex: 1;
    height: 4px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber-600), transparent);
}

.section-more,
.text-link {
    color: var(--amber-700);
    font-weight: 900;
}

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

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

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

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

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

.poster-grid .card-cover,
.compact-grid .card-cover {
    aspect-ratio: 3 / 4;
}

.card-cover img,
.wide-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.04) 54%);
    opacity: 0.72;
}

.cover-region {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 8px;
    border-radius: 7px;
    background: var(--amber-600);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.cover-play,
.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    color: var(--white);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.card-title:hover {
    color: var(--amber-700);
}

.card-meta {
    margin: 8px 0 0;
    color: var(--gray-500);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 0;
    color: var(--gray-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 118px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.rank-cover {
    position: relative;
    display: block;
    height: 80px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--gray-200);
}

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

.rank-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.rank-item p {
    display: -webkit-box;
    overflow: hidden;
    margin: 5px 0;
    color: var(--gray-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-item span:last-child {
    color: var(--gray-500);
    font-size: 13px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(255, 251, 235, 0.28), transparent 34%), linear-gradient(135deg, var(--gray-900), #3f2507 62%, var(--amber-700));
    color: var(--white);
}

.compact-hero .container {
    padding: 76px 0 64px;
}

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

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.category-tile {
    overflow: hidden;
    border-radius: 22px;
    background: var(--gray-900);
    box-shadow: var(--shadow-md);
}

.category-tile a {
    position: relative;
    display: block;
    min-height: 236px;
    color: var(--white);
}

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

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

.category-tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18));
}

.category-tile div {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
}

.category-tile h2 {
    margin: 0 0 8px;
    font-size: 25px;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.large-filter {
    grid-template-columns: 1fr 260px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    background: var(--gray-900);
    color: var(--white);
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px);
    transform: scale(1.08);
    opacity: 0.52;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.58));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 38px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-intro {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: end;
}

.detail-poster {
    width: 240px;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
}

.detail-intro h1 {
    margin: 16px 0 12px;
    max-width: 860px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
}

.detail-intro p {
    max-width: 820px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta span,
.tag-list a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
}

.tag-list {
    margin-top: 14px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 42px 0 70px;
}

.player-card,
.detail-article,
.detail-side {
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.player-card {
    padding: 14px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.24));
    color: var(--white);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    z-index: 3;
}

.video-shell.is-playing .play-layer {
    display: none;
}

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--amber-600);
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.36);
    font-size: 34px;
}

.detail-article {
    margin-top: 24px;
    padding: 30px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.detail-article p {
    margin: 0 0 22px;
    color: var(--gray-700);
    font-size: 17px;
}

.detail-article p:last-child {
    margin-bottom: 0;
}

.detail-side {
    height: fit-content;
    padding: 22px;
}

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

.side-list .movie-card {
    box-shadow: none;
    border: 1px solid var(--gray-100);
}

.wide-card {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.wide-cover {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    background: var(--gray-200);
}

.wide-body {
    padding: 16px;
}

.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 54px 0;
}

.footer-brand {
    color: var(--white);
    font-size: 20px;
}

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

.site-footer p {
    margin: 14px 0 0;
}

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

.site-footer li + li {
    margin-top: 8px;
}

.site-footer a:hover {
    color: var(--amber-500);
}

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

.footer-bottom p {
    margin: 0;
}

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 14px;
        font-size: 14px;
    }

    .hero-panel {
        display: none;
    }

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        height: 540px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search-box,
    .filter-bar,
    .large-filter,
    .detail-intro,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .poster-grid,
    .compact-grid,
    .category-grid,
    .ranking-preview,
    .ranking-list,
    .detail-side .side-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .section-line {
        width: 100%;
        flex: none;
    }

    .detail-poster {
        width: 190px;
    }
}

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

    .brand-text {
        font-size: 18px;
    }

    .hero {
        height: 500px;
    }

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

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

    .quick-search-box {
        padding: 20px;
    }

    .movie-grid,
    .poster-grid,
    .compact-grid,
    .category-grid,
    .ranking-preview,
    .ranking-list,
    .detail-side .side-list {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 44px 88px 1fr;
        gap: 12px;
    }

    .rank-cover {
        height: 70px;
    }

    .detail-article,
    .detail-side {
        padding: 22px;
    }
}
