:root {
    --primary-50: #fff7ed;
    --primary-100: #ffedd5;
    --primary-400: #f59e0b;
    --primary-500: #d97706;
    --primary-600: #b45309;
    --accent-500: #f97316;
    --accent-600: #ea580c;
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    --text-main: #111827;
    --text-soft: #64748b;
    --border-soft: rgba(148, 163, 184, .24);
    --card-bg: rgba(255, 255, 255, .94);
    --shadow-soft: 0 18px 50px rgba(15, 23, 42, .10);
    --shadow-hover: 0 24px 70px rgba(15, 23, 42, .18);
    --radius-lg: 24px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, .15), transparent 30rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 22rem, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(226, 232, 240, .8);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.brand {
    font-size: 22px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(217, 119, 6, .25);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    color: #475569;
    border-radius: 999px;
    font-weight: 650;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--primary-600);
    background: var(--primary-50);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: var(--secondary-100);
    border-radius: 12px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--secondary-900);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.mobile-nav.is-open {
    display: grid;
    gap: 6px;
}

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

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

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

.hero-slide {
    display: grid;
    align-items: center;
    padding: 80px max(32px, calc((100vw - 1180px) / 2));
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .75s ease, transform 1.2s ease;
}

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

.hero-copy {
    width: min(620px, 100%);
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    color: var(--primary-600);
    background: var(--primary-50);
    border: 1px solid rgba(245, 158, 11, .18);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
}

.hero-copy .eyebrow,
.page-hero .eyebrow,
.detail-hero .eyebrow {
    color: var(--primary-100);
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .18);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 20px 0 0;
    color: rgba(255, 255, 255, .86);
    font-size: clamp(17px, 2vw, 22px);
    max-width: 760px;
}

.hero-meta,
.detail-meta,
.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

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

.hero-meta span,
.detail-meta span,
.movie-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span,
.detail-meta span {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .16);
}

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

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 14px 34px rgba(217, 119, 6, .28);
}

.btn-primary:hover {
    box-shadow: 0 20px 46px rgba(217, 119, 6, .34);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    backdrop-filter: blur(12px);
}

.hero-panel {
    position: absolute;
    right: max(32px, calc((100vw - 1180px) / 2));
    bottom: 56px;
    z-index: 3;
    width: min(360px, calc(100% - 64px));
    padding: 24px;
    background: rgba(15, 23, 42, .56);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .28);
}

.hero-panel h2,
.section-heading h2,
.search-panel h2,
.category-overview-card h2,
.detail-content h2,
.ranking-info h2 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.18;
    letter-spacing: -.03em;
}

.hero-panel h2,
.hero-panel p {
    color: #fff;
}

.hero-panel p {
    margin: 10px 0 18px;
    color: rgba(255, 255, 255, .78);
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.hero-dot {
    width: 36px;
    height: 8px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, .34);
    border-radius: 999px;
    transition: width .2s ease, background .2s ease;
}

.hero-dot.is-active {
    width: 58px;
    background: #fff;
}

.hero-mini-links {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.hero-mini-links a {
    flex: 1;
    padding: 10px 12px;
    text-align: center;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-radius: 12px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--text-soft);
    max-width: 760px;
}

.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.text-link {
    color: var(--primary-600);
    font-weight: 800;
}

.top-feature-grid {
    margin-top: -42px;
    position: relative;
    z-index: 4;
    padding: 28px;
    background: rgba(255, 255, 255, .84);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-800), var(--secondary-900));
}

.movie-poster img,
.ranking-cover img,
.rank-item img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-600));
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .26);
}

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

.movie-card-meta {
    margin-bottom: 10px;
}

.movie-card-meta span {
    color: var(--primary-600);
    background: var(--primary-50);
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover,
.sample-links a:hover {
    color: var(--primary-600);
}

.movie-card p,
.category-overview-card p,
.detail-content p,
.ranking-info p {
    margin: 0;
    color: var(--text-soft);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    padding: 5px 9px;
    color: #475569;
    background: var(--secondary-100);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.large-tags span {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .16);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
    gap: 24px;
    align-items: end;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.search-controls {
    display: grid;
    gap: 12px;
}

.search-controls label {
    display: grid;
    gap: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 750;
}

.search-controls input,
.search-controls select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--text-main);
    background: var(--secondary-50);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.search-controls input:focus,
.search-controls select:focus {
    border-color: rgba(245, 158, 11, .7);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
}

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-strip a,
.category-card,
.category-overview-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.category-strip a {
    padding: 10px 14px;
    color: #475569;
    font-weight: 750;
}

.category-strip a:hover,
.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, .35);
    box-shadow: var(--shadow-hover);
}

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

.category-card {
    display: grid;
    gap: 10px;
    min-height: 190px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(255, 247, 237, .94), rgba(255, 255, 255, .94)),
        radial-gradient(circle at top right, rgba(249, 115, 22, .18), transparent 16rem);
}

.category-card span {
    color: var(--primary-600);
    font-weight: 850;
}

.category-card strong {
    font-size: 20px;
    line-height: 1.32;
}

.category-card em {
    color: var(--text-soft);
    font-style: normal;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.ranking-card {
    position: sticky;
    top: 96px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background .2s ease, transform .2s ease;
}

.rank-item:hover {
    background: var(--primary-50);
    transform: translateX(3px);
}

.rank-num {
    color: var(--primary-600);
    font-weight: 900;
}

.rank-item img {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text em {
    color: var(--text-soft);
    font-size: 13px;
    font-style: normal;
}

.page-hero,
.detail-hero {
    padding: 76px max(32px, calc((100vw - 1180px) / 2));
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .88)),
        radial-gradient(circle at top right, rgba(245, 158, 11, .36), transparent 24rem);
}

.small-hero,
.category-hero,
.ranking-hero {
    min-height: 320px;
    display: grid;
    align-items: center;
}

.category-overview-card {
    display: grid;
    gap: 22px;
    padding: 24px;
}

.sample-links {
    display: grid;
    gap: 8px;
}

.sample-links a {
    color: #475569;
    font-weight: 700;
}

.category-movie-grid {
    margin-top: 24px;
}

.ranking-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 72px 96px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 16px;
}

.ranking-index {
    color: var(--primary-600);
    font-size: 26px;
    font-weight: 900;
}

.ranking-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
}

.ranking-info h2 {
    font-size: 22px;
}

.ranking-info p {
    margin: 8px 0 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, .72);
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .36);
}

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

.player-section {
    scroll-margin-top: 96px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    background: linear-gradient(135deg, rgba(2, 6, 23, .28), rgba(2, 6, 23, .62));
    border: 0;
    cursor: pointer;
}

.play-trigger.is-hidden {
    display: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-600));
    border-radius: 50%;
    font-size: 34px;
    box-shadow: 0 24px 60px rgba(217, 119, 6, .36);
}

.play-trigger strong {
    padding: 10px 16px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-content article {
    padding: 28px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.detail-content p {
    margin-top: 14px;
    font-size: 16px;
}

.site-footer {
    margin-top: 80px;
    color: #fff;
    background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 36px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    font-size: 22px;
}

.site-footer p {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .72);
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--primary-100);
    font-size: 18px;
}

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: rgba(255, 255, 255, .62);
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.is-filtered-out {
    display: none !important;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 30px;
    color: var(--text-soft);
    text-align: center;
    background: #fff;
    border: 1px dashed var(--border-soft);
    border-radius: var(--radius-md);
}

@media (max-width: 1100px) {
    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .two-column-section {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 720px;
    }

    .hero-slide {
        padding: 72px 20px 230px;
    }

    .hero-panel {
        left: 20px;
        right: 20px;
        bottom: 24px;
        width: auto;
    }

    .search-panel,
    .detail-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(290px, 100%);
    }

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

    .split-heading,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .content-wrap {
        width: min(100% - 22px, 1180px);
        margin: 42px auto;
    }

    .nav-wrap {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .page-hero,
    .detail-hero {
        padding: 52px 16px;
    }

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

    .ranking-row {
        grid-template-columns: 44px 78px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .ranking-index {
        font-size: 20px;
    }
}
