* {
    box-sizing: border-box;
}

:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --orange-500: #f97316;
    --red-500: #ef4444;
    --blue-500: #3b82f6;
    --cyan-500: #06b6d4;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-md: 0 12px 30px rgba(17, 24, 39, 0.10);
    --shadow-lg: 0 24px 55px rgba(17, 24, 39, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-800);
    background: var(--gray-50);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--amber-700);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 10px 26px rgba(217, 119, 6, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--gray-700);
    font-weight: 600;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--amber-600);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: var(--amber-50);
    cursor: pointer;
}

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

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(105deg, #f59e0b 0%, #f97316 52%, #ef4444 100%);
}

.hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.28), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.18), transparent 26%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.08));
}

.hero-slider {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 520px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 46px;
    padding: 56px 0;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: #fff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 20px;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 640px;
    margin: 0 0 26px;
    color: var(--amber-50);
    font-size: clamp(18px, 2vw, 23px);
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-primary {
    color: var(--amber-700);
    background: #fff;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    color: #fff;
    background: rgba(180, 83, 9, 0.86);
    box-shadow: 0 16px 32px rgba(180, 83, 9, 0.22);
}

.hero-poster {
    position: relative;
    align-self: stretch;
    min-height: 390px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 32px 70px rgba(17, 24, 39, 0.32);
    transform: rotate(1.5deg);
}

.hero-poster img {
    height: 100%;
    min-height: 390px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster span {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 8px 14px;
    color: #fff;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

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

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

.hero-dots button.active {
    background: #fff;
}

.section {
    padding: 64px 0;
}

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

.section.white {
    background: #fff;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.18;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--gray-600);
}

.section-more {
    flex: 0 0 auto;
    color: var(--amber-600);
    font-weight: 800;
}

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

.movie-grid.large {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.movie-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.76);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: var(--amber-200);
    box-shadow: var(--shadow-lg);
}

.poster-link {
    position: relative;
    display: block;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-100), #fed7aa);
}

.movie-grid.large .poster-link {
    height: 280px;
}

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

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

.year-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    color: var(--amber-700);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.14);
    font-size: 13px;
    font-weight: 800;
}

.movie-body {
    padding: 20px;
}

.movie-body h3 {
    margin: 0 0 8px;
    color: var(--gray-800);
    font-size: 20px;
    line-height: 1.3;
}

.movie-body h3 a:hover {
    color: var(--amber-600);
}

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

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 13px;
}

.movie-tags span,
.detail-tags span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: var(--amber-700);
    border-radius: 999px;
    background: var(--amber-50);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    padding: 22px;
    color: #fff;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: var(--shadow-md);
}

.category-card::after {
    position: absolute;
    right: -22px;
    bottom: -34px;
    width: 120px;
    height: 120px;
    content: "";
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 23px;
}

.category-card p {
    position: relative;
    margin: 0;
    color: var(--amber-50);
    font-size: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 88px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: linear-gradient(180deg, #fff, var(--amber-50));
    border: 1px solid var(--amber-200);
    border-radius: 20px;
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
}

.rank-num {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--red-500), var(--orange-500));
    font-weight: 900;
}

.rank-item img {
    height: 112px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-item p {
    margin: 0;
    color: var(--gray-600);
    font-size: 14px;
}

.page-hero {
    color: #fff;
    padding: 70px 0;
    background: linear-gradient(105deg, var(--amber-500), var(--orange-500));
}

.page-hero.blue {
    background: linear-gradient(105deg, var(--blue-500), var(--cyan-500));
}

.page-hero h1 {
    max-width: 850px;
    margin: 18px 0 12px;
    font-size: clamp(36px, 6vw, 56px);
    line-height: 1.12;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    margin-bottom: 26px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.07);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--gray-50);
    font: inherit;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber-400);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.22);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-button {
    min-height: 48px;
    padding: 0 18px;
    color: #fff;
    border: 0;
    border-radius: 999px;
    background: var(--amber-600);
    cursor: pointer;
    font-weight: 800;
}

.filter-button.clear {
    color: var(--amber-700);
    background: var(--amber-50);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    align-items: start;
}

.detail-panel,
.side-panel {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 26px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
    overflow: hidden;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
    display: inline-flex;
    width: 84px;
    height: 84px;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    font-size: 30px;
}

.detail-content {
    padding: 30px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--gray-500);
    font-size: 14px;
}

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

.detail-content h1 {
    margin: 0 0 16px;
    color: var(--gray-900);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.14;
}

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

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

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

.detail-content h2,
.side-panel h2 {
    margin: 26px 0 12px;
    color: var(--gray-800);
    font-size: 24px;
}

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

.side-panel {
    padding: 20px;
}

.related-grid {
    display: grid;
    gap: 14px;
}

.related-card a {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
}

.related-card img {
    height: 112px;
    border-radius: 16px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card strong {
    display: block;
    color: var(--gray-800);
    line-height: 1.3;
}

.related-card span {
    display: block;
    margin-top: 7px;
    color: var(--gray-500);
    font-size: 13px;
}

.site-footer {
    padding: 46px 0 22px;
    color: var(--gray-600);
    background: #fff;
    border-top: 1px solid var(--gray-200);
}

.footer-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 30px;
    align-items: start;
}

.footer-brand {
    margin-bottom: 12px;
}

.footer-wrap p {
    max-width: 560px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 20px;
    font-weight: 700;
}

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
    font-size: 14px;
}

.empty-tip {
    display: none;
    padding: 30px;
    text-align: center;
    color: var(--gray-600);
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 24px;
}

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

@media (max-width: 1000px) {
    .movie-grid,
    .movie-grid.large,
    .category-grid,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hero-slider {
        min-height: 760px;
    }

    .hero-poster {
        min-height: 320px;
    }
}

@media (max-width: 720px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        background: #fff;
        border: 1px solid var(--gray-200);
        border-radius: 20px;
        box-shadow: var(--shadow-lg);
    }

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

    .nav-links a {
        padding: 12px 14px;
        border-radius: 14px;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: var(--amber-50);
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        padding: 38px 0 70px;
        gap: 26px;
    }

    .hero-dots {
        bottom: 24px;
    }

    .movie-grid,
    .movie-grid.large,
    .category-grid,
    .rank-list,
    .footer-wrap {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .filter-bar {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .filter-actions,
    .footer-links {
        justify-content: flex-start;
    }

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

    .rank-num {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .rank-item img {
        height: 98px;
    }

    .related-card a {
        grid-template-columns: 76px 1fr;
    }
}
