:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --orange-500: #f97316;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
    color: var(--slate-900);
}

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

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

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
    color: var(--white);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    color: var(--white);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.3);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 15px;
}

.nav-link {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    min-width: 300px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    padding: 11px 14px 11px 18px;
}

.header-search input::placeholder {
    color: #94a3b8;
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-panel button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button {
    padding: 10px 18px;
    margin-right: 3px;
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    font-size: 24px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 18px 18px;
    background: var(--slate-900);
}

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

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.32), transparent 28%), linear-gradient(120deg, #0f172a 0%, #1e293b 52%, #78350f 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: radial-gradient(circle, #ffffff 1px, transparent 1px);
    background-size: 28px 28px;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 420px;
    gap: 38px;
    align-items: center;
    padding: 70px 0 72px;
}

.hero-slider {
    position: relative;
    min-height: 510px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 34px;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

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

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.16);
    color: #fde68a;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero h1,
.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.8;
}

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

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
}

.primary-btn {
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.3);
}

.secondary-btn {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    min-height: 430px;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.5);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.9));
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.9);
}

.hero-side {
    border-radius: 30px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.hero-side h2 {
    margin: 0 0 16px;
    font-size: 22px;
    letter-spacing: 0;
}

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

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

.hero-mini:hover {
    transform: translateX(4px);
    background: rgba(251, 191, 36, 0.13);
}

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

.hero-mini strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.hero-mini span {
    color: #cbd5e1;
    font-size: 13px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 0;
    bottom: 0;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 36px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
}

.hero-dots button.active {
    background: var(--amber-400);
}

.section {
    padding: 54px 0 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.section-lead {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--slate-600);
    line-height: 1.8;
}

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

.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 {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--slate-800);
}

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

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    left: 12px;
    top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.35);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.card-line {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.card-meta span,
.detail-tags span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #92400e;
    background: #fffbeb;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 24px;
    border-radius: 26px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-800), #92400e);
    box-shadow: var(--shadow);
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, #1e3a8a, #0f766e);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #7c2d12, #be123c);
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: #e2e8f0;
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 18px;
    margin-bottom: 24px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.filter-panel input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 14px 18px;
    font-size: 16px;
    outline: 0;
}

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

.filter-panel button {
    padding: 0 24px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
}

.rank-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.rank-list {
    padding: 18px;
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.rank-row {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 54px;
    border-bottom: 1px solid #e2e8f0;
}

.rank-row:last-child {
    border-bottom: 0;
}

.rank-num {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--slate-950);
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
}

.rank-title {
    overflow: hidden;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: var(--slate-600);
    font-size: 13px;
    white-space: nowrap;
}

.page-hero {
    padding: 64px 0 44px;
    color: var(--white);
    background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.28), transparent 35%), linear-gradient(120deg, var(--slate-900), var(--slate-800));
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #fde68a;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
    padding-top: 44px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--slate-950);
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.36);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: var(--slate-950);
    cursor: pointer;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    color: var(--white);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.88));
}

.play-cover.hidden {
    display: none;
}

.play-cover img {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.38);
    font-size: 34px;
}

.play-cover strong {
    margin-top: 16px;
    font-size: 22px;
}

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

.detail-card {
    margin-top: 24px;
    padding: 26px;
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow);
}

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

.detail-card p {
    margin: 0 0 16px;
    color: var(--slate-700);
    line-height: 1.9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

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

.side-poster {
    overflow: hidden;
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow);
}

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

.side-poster div {
    padding: 18px;
}

.related-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.related-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.related-card img {
    width: 78px;
    height: 104px;
    border-radius: 12px;
    object-fit: cover;
}

.related-card strong {
    display: block;
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-card span {
    color: var(--slate-600);
    font-size: 13px;
}

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

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 24px;
    text-align: center;
    color: var(--slate-600);
    background: var(--white);
    box-shadow: var(--shadow);
}

.empty-state.show {
    display: block;
}

.site-footer {
    margin-top: 74px;
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1fr;
    gap: 30px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 12px;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    margin: 0;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: var(--white);
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    margin: 0;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    text-align: center;
    color: #94a3b8;
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-inner,
    .hero-slide,
    .detail-layout,
    .rank-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 780px;
    }

    .hero-poster {
        display: none;
    }

    .hero-side {
        margin-top: 34px;
    }

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

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

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

    .brand {
        font-size: 18px;
    }

    .hero {
        min-height: 700px;
    }

    .hero-inner {
        padding: 42px 0 52px;
    }

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

    .section-head,
    .filter-panel,
    .rank-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .rank-row {
        gap: 8px;
        padding: 12px 0;
    }

    .filter-panel button {
        min-height: 46px;
    }
}
