:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--amber-600), var(--amber-700));
    color: var(--white);
    box-shadow: 0 8px 24px rgba(146, 64, 14, 0.25);
}

.header-inner {
    max-width: 1280px;
    min-height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.nav-link {
    font-size: 15px;
    font-weight: 600;
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

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

.header-search {
    width: 210px;
}

.header-search input {
    width: 100%;
    border: 0;
    outline: none;
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--gray-900);
    background: rgba(255, 255, 255, 0.95);
}

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

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

.main-content {
    min-height: 72vh;
}

.hero {
    position: relative;
    height: 520px;
    overflow: hidden;
    background: #000;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

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

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.48) 44%, rgba(0, 0, 0, 0.16)), linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 54%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 62px;
    width: min(1180px, calc(100% - 48px));
    transform: translateX(-50%);
    color: var(--white);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--amber-100);
    background: rgba(245, 158, 11, 0.2);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    max-width: 820px;
    margin: 16px 0 12px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

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

.button,
.button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button {
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.32);
}

.button:hover,
.button-outline:hover {
    transform: translateY(-2px);
}

.button-outline {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    transform: translateY(-50%);
}

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

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    font-weight: 900;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--gray-500);
    line-height: 1.7;
}

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

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

.movie-card {
    position: relative;
    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 22px 55px rgba(17, 24, 39, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-200), var(--amber-100));
}

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

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

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

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
}

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

.movie-title {
    display: block;
    min-height: 44px;
    color: var(--gray-900);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
}

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

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

.movie-card p {
    min-height: 60px;
    margin: 0 0 12px;
    color: var(--gray-700);
    font-size: 14px;
    line-height: 1.55;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

.scroll-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 0 22px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    width: 250px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

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

.category-card {
    min-height: 160px;
    padding: 24px;
    border-radius: var(--radius);
    color: var(--gray-900);
    background: linear-gradient(135deg, var(--white), var(--amber-50));
    box-shadow: var(--shadow);
    transition: transform 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--gray-600, #4b5563);
    line-height: 1.65;
}

.feature-panel {
    border-radius: 28px;
    padding: 30px;
    color: var(--gray-900);
    background: linear-gradient(135deg, var(--amber-50), var(--white));
    box-shadow: var(--shadow);
}

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

.filter-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--gray-900);
    background: var(--gray-50);
    outline: none;
}

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

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

.compact-card a {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 108px;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.compact-card img {
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
}

.compact-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 17px;
}

.compact-card em {
    display: block;
    color: var(--gray-500);
    font-style: normal;
    line-height: 1.5;
}

.compact-rank {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: var(--amber-600);
    font-weight: 900;
}

.breadcrumb {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 0;
    color: var(--gray-500);
    font-size: 14px;
}

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

.detail-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) 380px;
    gap: 28px;
}

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

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

.movie-player {
    position: relative;
    overflow: hidden;
    background: #000;
}

.player-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.22));
    cursor: pointer;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    font-size: 34px;
    background: rgba(217, 119, 6, 0.94);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

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

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

.detail-title {
    margin: 0 0 18px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    font-weight: 900;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--gray-700);
    background: var(--gray-100);
    font-weight: 700;
}

.content-card h2,
.content-card h3 {
    margin: 28px 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.content-card p {
    color: var(--gray-700);
    font-size: 16px;
    line-height: 1.9;
}

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

.side-title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 900;
}

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

.side-list .compact-card a {
    grid-template-columns: 64px 1fr;
    min-height: 90px;
    padding: 10px;
    box-shadow: none;
    background: var(--gray-50);
}

.side-list .compact-card img {
    height: 80px;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 22px;
    align-items: center;
}

.footer-inner strong {
    color: var(--white);
    font-size: 18px;
}

.footer-inner p {
    margin: 8px 0 0;
}

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

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

.copyright {
    grid-column: 1 / -1;
    color: #9ca3af;
    font-size: 14px;
}

.empty-result {
    display: none;
    padding: 38px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--gray-500);
    background: var(--white);
    box-shadow: var(--shadow);
}

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

@media (max-width: 1120px) {
    .card-grid,
    .card-grid.large {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 860px) {
    .header-inner {
        flex-wrap: wrap;
        min-height: auto;
        padding: 14px 18px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        order: 3;
    }

    .main-nav.open {
        display: flex;
    }

    .nav-link {
        padding: 11px 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
    }

    .header-search {
        width: 100%;
        order: 4;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        bottom: 72px;
    }

    .hero-arrow {
        display: none;
    }

    .card-grid,
    .card-grid.large {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

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

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

@media (max-width: 520px) {
    .section,
    .detail-layout,
    .breadcrumb {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-content {
        width: calc(100% - 32px);
    }

    .content-card {
        padding: 20px;
    }

    .movie-title {
        min-height: auto;
    }

    .movie-card p {
        min-height: auto;
    }
}
