:root {
    --amber: #d97706;
    --amber-dark: #92400e;
    --amber-soft: #fef3c7;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --panel: #ffffff;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f6f7fb;
    color: var(--ink);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner,
.mobile-panel,
.page-shell,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706 55%, #78350f);
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

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

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

.nav-link,
.mobile-nav-link {
    color: #374151;
    font-weight: 650;
    border-radius: 999px;
    transition: color 0.18s ease, background 0.18s ease;
}

.nav-link {
    padding: 10px 14px;
}

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

.header-search {
    position: relative;
    margin-left: auto;
    width: 260px;
}

.header-search input,
.mobile-search input,
.filter-search input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border 0.18s ease, box-shadow 0.18s ease;
}

.header-search input {
    height: 42px;
    padding: 0 44px 0 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-search input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.header-search button {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--amber);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: #374151;
    font-size: 22px;
}

.mobile-panel {
    padding: 0 0 18px;
}

.mobile-search {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.mobile-search input {
    height: 42px;
    padding: 0 14px;
}

.mobile-search button,
.primary-button,
.ghost-button,
.filter-chip,
.player-start {
    cursor: pointer;
}

.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: #ffffff;
    background: var(--amber);
}

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

.mobile-nav-link {
    padding: 12px 14px;
}

.hero {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 1.2s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.88) 0%, rgba(17, 24, 39, 0.68) 42%, rgba(17, 24, 39, 0.18) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.12) 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: end;
    gap: 42px;
    width: min(1180px, calc(100% - 32px));
    min-height: 590px;
    margin: 0 auto;
    padding: 94px 0 58px;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(146, 64, 14, 0.35);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 640px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.detail-tags,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span,
.info-pill {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 8px 12px;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.primary-button {
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.34);
}

.ghost-button {
    padding: 0 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-panel {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: rgba(17, 24, 39, 0.58);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.hero-panel h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

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

.hero-mini-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.18s ease, transform 0.18s ease;
}

.hero-mini-item:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.hero-mini-item img {
    width: 72px;
    height: 92px;
    border-radius: 14px;
    object-fit: cover;
}

.hero-mini-item strong {
    display: block;
    line-height: 1.35;
}

.hero-mini-item small {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.72);
}

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

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

.hero-dot.is-active {
    background: #f59e0b;
}

.page-shell {
    padding: 44px 0 64px;
}

.section-block {
    margin-top: 52px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section-heading p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    min-height: 40px;
    padding: 0 16px;
    color: var(--amber);
    border: 1px solid #fcd34d;
    background: #fffbeb;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, #e5e7eb, #fef3c7);
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.9);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    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;
}

.movie-title {
    display: -webkit-box;
    min-height: 46px;
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.movie-meta {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 650;
}

.movie-tags {
    margin-top: 12px;
}

.movie-tags span {
    padding: 5px 9px;
    color: var(--amber-dark);
    background: #fffbeb;
}

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

.category-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 18px 34px rgba(180, 83, 9, 0.22);
}

.category-card:nth-child(4n + 2) {
    background: linear-gradient(135deg, #ef4444, #be123c);
}

.category-card:nth-child(4n + 3) {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

.category-card:nth-child(4n) {
    background: linear-gradient(135deg, #22c55e, #047857);
}

.category-card:after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -42px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-card strong {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 24px;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.85);
}

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

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    transition: border 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.rank-row:hover {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.rank-link {
    display: grid;
    grid-template-columns: 46px 58px 1fr 24px;
    gap: 13px;
    align-items: center;
    padding: 10px 12px;
}

.rank-num {
    color: var(--amber);
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.rank-link img {
    width: 58px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
    background: #f3f4f6;
}

.rank-info strong {
    display: block;
    color: #111827;
    line-height: 1.45;
}

.rank-info small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.rank-arrow {
    color: #9ca3af;
    font-size: 28px;
}

.page-title {
    margin-bottom: 28px;
    padding: 34px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.page-title h1 {
    font-size: clamp(32px, 4vw, 52px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber);
    font-weight: 700;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
}

.filter-search {
    position: relative;
    flex: 1 1 320px;
}

.filter-search input {
    height: 46px;
    padding: 0 16px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    color: var(--amber-dark);
    background: #fffbeb;
    font-weight: 800;
}

.filter-chip.active {
    color: #ffffff;
    background: var(--amber);
}

.empty-state {
    display: none;
    padding: 32px;
    border-radius: 20px;
    color: #6b7280;
    background: #ffffff;
    text-align: center;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.42;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(1.12);
    transform: scale(1.08);
}

.detail-bg:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(17, 24, 39, 0.72));
}

.detail-head-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.detail-poster img {
    width: 100%;
    border-radius: 26px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.detail-title h1 {
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
}

.detail-title p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.info-pill {
    padding: 8px 12px;
}

.detail-tags {
    margin-top: 22px;
}

.detail-tags span {
    padding: 8px 12px;
}

.player-card {
    overflow: hidden;
    border-radius: 28px;
    background: #030712;
    box-shadow: var(--shadow);
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.main-video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(217, 119, 6, 0.18), rgba(0, 0, 0, 0.42));
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.player-box.is-playing .player-layer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-start {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    border: 0;
    border-radius: 999px;
    padding: 0 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 18px 40px rgba(217, 119, 6, 0.38);
    font-size: 18px;
    font-weight: 900;
}

.player-start span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.content-card {
    margin-top: 26px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

.content-card p + p {
    margin-top: 16px;
}

.site-footer {
    background: #111827;
    color: #ffffff;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0;
}

.footer-inner p {
    max-width: 720px;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.76);
}

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

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        align-items: center;
    }

    .hero-panel {
        display: none;
    }

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

    .detail-head-inner {
        grid-template-columns: 220px 1fr;
    }
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

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

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

    .filter-bar,
    .section-heading,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

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

    .detail-poster {
        max-width: 260px;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .mobile-panel,
    .page-shell,
    .footer-inner,
    .hero-content,
    .detail-head-inner {
        width: min(100% - 22px, 1180px);
    }

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

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

    .hero-content {
        padding-top: 62px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-desc,
    .detail-title p {
        font-size: 16px;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

    .rank-link {
        grid-template-columns: 38px 52px 1fr 18px;
    }

    .rank-link img {
        width: 52px;
        height: 68px;
    }

    .page-title,
    .content-card {
        padding: 22px;
    }

    .player-start {
        min-height: 52px;
        padding: 0 20px;
        font-size: 16px;
    }
}
