:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --orange-600: #ea580c;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.10);
    --shadow-lg: 0 20px 50px rgba(17, 24, 39, 0.16);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.7;
}

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

.top-strip {
    background: var(--amber-700);
    color: white;
    font-size: 14px;
}

.top-strip-inner {
    padding: 8px 0;
    text-align: center;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.08);
}

.nav-shell {
    background: white;
}

.nav-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    color: white;
    box-shadow: 0 10px 18px rgba(217, 119, 6, 0.22);
}

.logo-text {
    color: var(--amber-800);
    font-size: 24px;
    line-height: 1.1;
}

.logo-text small {
    display: block;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 500;
    margin-top: 3px;
}

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: var(--amber-700);
}

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

.header-search input {
    width: 220px;
    border: 1px solid var(--gray-300);
    border-right: 0;
    border-radius: 999px 0 0 999px;
    padding: 10px 14px;
    outline: none;
}

.header-search input:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.header-search button,
.cta-search button {
    border: 0;
    background: var(--amber-600);
    color: white;
    padding: 11px 18px;
    border-radius: 0 999px 999px 0;
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid var(--gray-200);
}

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

.mobile-link {
    color: var(--gray-700);
    font-weight: 650;
    padding: 7px 0;
}

.mobile-category-title {
    color: var(--gray-500);
    font-size: 13px;
    margin-top: 8px;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 25%, rgba(245, 158, 11, 0.35), transparent 32%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.76) 48%, rgba(17, 24, 39, 0.36) 100%);
}

.hero-content {
    position: relative;
    height: 620px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(760px, 100%);
    color: white;
    padding: 90px 0 80px;
}

.eyebrow,
.section-kicker {
    color: var(--amber-500);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
    font-weight: 800;
    margin: 0 0 12px;
}

.hero-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    margin: 0 0 14px;
    color: var(--amber-100);
    font-size: clamp(25px, 3vw, 42px);
}

.hero-copy p {
    max-width: 680px;
    color: #e5e7eb;
    font-size: 18px;
    margin: 0 0 24px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-btn,
.secondary-btn,
.ghost-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn {
    background: var(--amber-600);
    color: white;
    padding: 13px 24px;
    box-shadow: 0 16px 26px rgba(217, 119, 6, 0.25);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.primary-btn:hover {
    background: var(--amber-700);
}

.secondary-btn {
    background: var(--gray-900);
    color: white;
    padding: 10px 18px;
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.34);
    color: white;
    padding: 12px 22px;
    backdrop-filter: blur(8px);
}

.primary-btn.full {
    width: 100%;
    margin-top: 20px;
}

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

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

.hero-dot.is-active {
    background: var(--amber-500);
}

.section-block {
    padding: 76px 0;
}

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

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

.section-heading.compact {
    margin-bottom: 24px;
}

.section-heading h2,
.rank-panel-head h2,
.content-panel h2,
.side-panel h2 {
    margin: 0;
    color: var(--gray-900);
    line-height: 1.2;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.text-link {
    color: var(--amber-700);
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    color: white;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card-large:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-tile img,
.category-tile span {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-tile img {
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.category-tile span {
    background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.88));
}

.category-tile strong,
.category-tile p {
    position: relative;
    z-index: 2;
}

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

.category-tile p {
    margin: 8px 0 0;
    color: #f3f4f6;
    font-size: 14px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}

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

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

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

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

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--gray-200);
}

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

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

.poster-year,
.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--amber-600);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: auto;
    right: 12px;
    background: var(--gray-900);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--amber-700);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--gray-500);
    font-size: 13px;
    margin-bottom: 6px;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--amber-700);
}

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

.tag-row span {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 5px 9px;
    font-size: 12px;
}

.rank-panel {
    position: sticky;
    top: 120px;
    background: white;
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.rank-list,
.rank-table {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 34px 52px minmax(0, 1fr);
    grid-template-areas:
        "num img title"
        "num img meta";
    align-items: center;
    gap: 0 12px;
    padding: 10px;
    border-radius: 14px;
    background: var(--gray-50);
}

.rank-row:hover {
    background: var(--amber-50);
}

.rank-row span {
    grid-area: num;
    color: var(--amber-700);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    grid-area: img;
    width: 52px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-row strong {
    grid-area: title;
    color: var(--gray-900);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em {
    grid-area: meta;
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
}

.cta-band {
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
    color: white;
    padding: 80px 0;
}

.cta-inner {
    text-align: center;
}

.cta-inner h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
}

.cta-inner p {
    color: #d1d5db;
    margin: 0 0 28px;
}

.cta-search {
    display: flex;
    width: min(560px, 100%);
    margin: 0 auto;
}

.cta-search input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-right: 0;
    border-radius: 999px 0 0 999px;
    padding: 14px 18px;
    color: white;
    background: rgba(255, 255, 255, 0.10);
    outline: none;
}

.page-hero {
    padding: 70px 0;
    color: white;
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.20), transparent 22%),
        linear-gradient(135deg, var(--amber-700), var(--orange-600));
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 52px);
}

.page-hero p {
    margin: 0;
    max-width: 760px;
    color: var(--amber-50);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
}

.breadcrumb a:hover {
    color: white;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 190px;
    gap: 14px;
    align-items: center;
    margin-bottom: 26px;
    background: white;
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    padding: 12px 14px;
    background: white;
    outline: none;
}

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

.empty-state {
    margin: 28px 0 0;
    padding: 36px;
    text-align: center;
    color: var(--gray-600);
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.category-large-grid {
    display: grid;
    gap: 24px;
}

.category-card-large {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    background: white;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-cover {
    min-height: 230px;
    background: var(--gray-200);
}

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

.category-card-content {
    padding: 28px;
}

.category-card-content h2 {
    margin: 0 0 10px;
    color: var(--gray-900);
    font-size: 28px;
}

.category-card-content p {
    margin: 0 0 18px;
    color: var(--gray-600);
}

.sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.sample-links a {
    border-radius: 999px;
    background: var(--amber-50);
    color: var(--amber-800);
    padding: 7px 12px;
    font-weight: 650;
    font-size: 14px;
}

.rank-table {
    margin-top: 34px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-top {
    padding: 34px 0 48px;
    color: white;
    background:
        radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.30), transparent 30%),
        linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.detail-top .breadcrumb {
    color: #d1d5db;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--gray-800);
}

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

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

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

.detail-one-line {
    max-width: 820px;
    color: #e5e7eb;
    font-size: 18px;
    margin: 0 0 20px;
}

.detail-tags {
    margin-bottom: 26px;
}

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

.detail-section.compact-top {
    padding-top: 0;
}

.movie-player {
    background: var(--gray-900);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
    display: grid;
    place-items: center;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.94);
    color: var(--amber-700);
    font-size: 34px;
    padding-left: 4px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

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

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

.content-panel,
.side-panel {
    background: white;
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.content-panel h2,
.side-panel h2 {
    margin-bottom: 14px;
}

.content-panel p {
    color: var(--gray-700);
    margin: 0 0 24px;
    font-size: 16px;
}

.side-panel dl {
    margin: 0;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
}

.side-panel dt {
    color: var(--gray-500);
}

.side-panel dd {
    margin: 0;
    color: var(--gray-900);
    font-weight: 700;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-logo {
    color: white;
    font-size: 22px;
}

.site-footer p {
    max-width: 420px;
    color: #9ca3af;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: white;
    font-size: 18px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    color: #9ca3af;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

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

    .rank-panel {
        position: static;
    }
}

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

    .top-strip-inner {
        font-size: 12px;
    }

    .nav-inner {
        min-height: 68px;
    }

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

    .hero-carousel,
    .hero-content {
        min-height: 560px;
        height: 560px;
    }

    .hero-copy {
        padding: 70px 0;
    }

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .section-block {
        padding: 52px 0;
    }

    .section-heading {
        display: block;
    }

    .text-link {
        display: inline-flex;
        margin-top: 12px;
    }

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .category-card-large,
    .detail-hero-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(280px, 100%);
    }

    .cta-search {
        display: grid;
        gap: 10px;
    }

    .cta-search input,
    .cta-search button {
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.22);
    }
}

@media (max-width: 520px) {
    .category-grid,
    .movie-grid,
    .list-grid,
    .home-grid,
    .related-grid,
    .rank-table {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .primary-btn,
    .ghost-btn,
    .secondary-btn {
        width: 100%;
    }

    .side-panel dl {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
