:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-900: #78350f;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 24px 70px rgba(15, 23, 42, 0.22);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--amber-50), var(--white) 32%, var(--slate-50));
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 251, 235, 0.9);
    border-bottom: 1px solid rgba(252, 211, 77, 0.45);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

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

.brand-text strong {
    display: block;
    font-size: 20px;
    color: var(--amber-900);
    line-height: 1.1;
}

.brand-text em {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-style: normal;
    color: var(--amber-700);
}

.header-search,
.mobile-search,
.home-search,
.search-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search {
    flex: 1 1 390px;
    max-width: 430px;
}

.header-search input,
.mobile-search input,
.home-search input,
.search-page-form input,
.filter-panel input,
.filter-row select {
    width: 100%;
    border: 1px solid rgba(217, 119, 6, 0.35);
    border-radius: 999px;
    background: var(--white);
    color: var(--slate-700);
    outline: none;
    padding: 12px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.home-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-row select:focus {
    border-color: var(--amber-400);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.22);
}

.header-search button,
.mobile-search button,
.home-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), #f97316);
    cursor: pointer;
    white-space: nowrap;
}

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

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

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

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 14px;
    background: var(--amber-100);
    color: var(--amber-900);
    width: 44px;
    height: 44px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel.open {
    display: block;
}

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

.mobile-nav .nav-link {
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(254, 243, 199, 0.78);
}

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

.hero-stage {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-position: center;
    background-size: cover;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    color: var(--white);
    padding: 96px 0 86px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(15, 23, 42, 0.36);
    border: 1px solid rgba(251, 191, 36, 0.32);
    backdrop-filter: blur(8px);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    max-width: 780px;
    margin: 24px 0 10px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 3vw, 42px);
    color: #fde68a;
}

.hero-content p {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags,
.filter-tags,
.quick-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-tags a,
.quick-links a,
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--amber-900);
    background: var(--amber-100);
}

.hero-tags span {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 22px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), #f97316);
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.34);
}

.btn.ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
}

.btn.small {
    padding: 10px 16px;
    color: var(--white);
    background: var(--amber-600);
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search-panel,
.section-block,
.page-main {
    margin-top: 46px;
}

.quick-search-panel {
    position: relative;
    z-index: 2;
    margin-top: -48px;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(16px);
}

.quick-search-panel h2 {
    margin: 0 0 16px;
    color: var(--slate-900);
}

.home-search input,
.search-page-form input {
    min-height: 52px;
}

.home-search button,
.search-page-form button {
    min-height: 52px;
    padding-inline: 26px;
}

.quick-links {
    margin-top: 16px;
}

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

.section-head h2 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(24px, 3vw, 36px);
}

.section-head p {
    margin: 8px 0 0;
    color: var(--slate-500);
    line-height: 1.7;
}

.section-more {
    color: var(--amber-700);
    font-weight: 800;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

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

.poster-link img {
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.68));
}

.play-chip,
.rank-badge {
    position: absolute;
    color: var(--white);
    font-weight: 900;
    border-radius: 999px;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: rgba(245, 158, 11, 0.92);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, var(--amber-400));
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.3);
}

.movie-body {
    padding: 16px;
}

.movie-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--amber-700);
    font-size: 12px;
    font-weight: 800;
}

.movie-body h2 {
    margin: 9px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    color: var(--slate-900);
}

.movie-body p {
    margin: 0 0 13px;
    color: var(--slate-500);
    font-size: 14px;
    line-height: 1.65;
}

.tag-row span {
    color: var(--slate-600);
    background: var(--slate-100);
}

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

.category-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border-radius: var(--radius);
    color: var(--white);
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow-md);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.category-card span {
    font-size: 24px;
    font-weight: 900;
}

.category-card strong {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.split-layout {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 28px;
    align-items: start;
}

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

.side-panel,
.category-overview-card,
.search-panel-large,
.filter-panel,
.detail-article,
.detail-side,
.player-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.side-panel {
    padding: 24px;
}

.side-panel h2 {
    margin-top: 0;
    color: var(--slate-900);
}

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

.wide-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    align-items: center;
}

.wide-cover {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: var(--slate-200);
}

.wide-card h3 {
    margin: 8px 0 6px;
    color: var(--slate-900);
    font-size: 17px;
}

.wide-card p {
    margin: 0;
    color: var(--slate-500);
    font-size: 14px;
    line-height: 1.55;
}

.page-main {
    padding-bottom: 30px;
}

.page-hero {
    padding: 58px;
    border-radius: 30px;
    color: var(--white);
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow-xl);
}

.page-hero.soft {
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--amber-100), var(--white));
}

.page-hero.soft .hero-kicker {
    color: var(--amber-900);
    background: rgba(251, 191, 36, 0.18);
}

.page-hero h1 {
    margin: 22px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: inherit;
    line-height: 1.8;
    opacity: 0.86;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--slate-500);
    font-size: 14px;
}

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

.breadcrumb.dark {
    color: rgba(255, 255, 255, 0.75);
}

.breadcrumb.dark a {
    color: #fde68a;
}

.filter-panel {
    margin-top: 28px;
    padding: 22px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
}

.filter-row.secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.filter-tags {
    margin-top: 14px;
}

.filter-tags button {
    border: 0;
    border-radius: 999px;
    padding: 9px 13px;
    color: var(--slate-600);
    background: var(--slate-100);
    cursor: pointer;
    font-weight: 800;
}

.filter-tags button.active,
.filter-tags button:hover {
    color: var(--amber-900);
    background: var(--amber-100);
}

.category-overview-grid {
    display: grid;
    gap: 22px;
    margin-top: 30px;
}

.category-overview-card {
    padding: 24px;
}

.category-overview-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.category-overview-top h2 {
    margin: 10px 0 8px;
    color: var(--slate-900);
    font-size: 28px;
}

.category-overview-top p {
    margin: 0;
    color: var(--slate-500);
    line-height: 1.7;
}

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

.search-panel-large {
    margin-top: 28px;
    padding: 24px;
}

.search-page-form {
    width: 100%;
}

.detail-page {
    background: linear-gradient(180deg, var(--slate-900) 0, var(--slate-900) 560px, var(--slate-50) 560px);
}

.detail-hero {
    padding: 34px 0 76px;
    color: var(--white);
    background-position: center;
    background-size: cover;
}

.detail-head-grid {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow-xl);
    background: var(--slate-800);
}

.detail-info h1 {
    margin: 22px 0 18px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.06;
}

.detail-info p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.player-section {
    margin-top: -42px;
}

.player-card {
    overflow: hidden;
    background: #020617;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.75));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 34px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), #f97316);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.4);
}

.player-overlay strong {
    max-width: min(720px, 90%);
    font-size: clamp(20px, 3vw, 36px);
    text-align: center;
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    margin-top: 34px;
}

.detail-article,
.detail-side {
    padding: 28px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: var(--slate-900);
}

.detail-article p {
    margin: 0 0 24px;
    color: var(--slate-600);
    font-size: 17px;
    line-height: 1.9;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.detail-side dt {
    color: var(--slate-400);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: var(--slate-700);
}

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

.site-footer {
    margin-top: 70px;
    color: var(--slate-300);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

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

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--amber-400);
    font-size: 20px;
}

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

.footer-links {
    display: grid;
    gap: 10px;
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: var(--slate-400);
}

@media (max-width: 1080px) {
    .movie-grid,
    .category-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;
    }
}

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

    .header-inner {
        height: 66px;
    }

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

    .hero-carousel,
    .hero-stage {
        min-height: 600px;
    }

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

    .hero-content h1 {
        font-size: 42px;
    }

    .home-search,
    .search-page-form,
    .mobile-search {
        align-items: stretch;
        flex-direction: column;
    }

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

    .page-hero {
        padding: 34px 24px;
    }

    .filter-row,
    .filter-row.secondary {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(240px, 74vw);
    }

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

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

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text em {
        display: none;
    }

    .hero-carousel,
    .hero-stage {
        min-height: 640px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .quick-search-panel {
        padding: 20px;
    }

    .section-head,
    .category-overview-top {
        align-items: start;
        flex-direction: column;
    }

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

    .detail-hero {
        padding-bottom: 56px;
    }

    .detail-info h1 {
        font-size: 36px;
    }

    .player-overlay span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
