:root {
    --page-bg: #fff7ed;
    --surface: #ffffff;
    --surface-soft: #fff1e5;
    --text-main: #171717;
    --text-muted: #6b7280;
    --brand: #f97316;
    --brand-dark: #ea580c;
    --rose: #f43f5e;
    --pink: #ec4899;
    --dark: #111827;
    --dark-soft: #1f2937;
    --ring: rgba(249, 115, 22, 0.35);
    --shadow-card: 0 18px 45px rgba(17, 24, 39, 0.13);
    --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 32rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 34rem);
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316 0%, #ef4444 52%, #ec4899 100%);
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.28);
}

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

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

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a.is-active {
    color: #fff7ed;
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input {
    width: 240px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    padding: 10px 42px 10px 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    outline: none;
    backdrop-filter: blur(12px);
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.74);
}

.header-search input:focus {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}

.header-search button {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav form {
    margin: 14px 0;
}

.mobile-nav .header-search,
.mobile-nav .header-search input {
    width: 100%;
}

.mobile-nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

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

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    color: #ffffff;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.04);
    transform: scale(1.03);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 28%, rgba(236, 72, 153, 0.45), transparent 28rem),
        linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.76) 46%, rgba(17, 24, 39, 0.28) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) 360px;
    align-items: center;
    gap: 42px;
    padding: 72px 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    border-radius: 999px;
    padding: 8px 14px;
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    font-weight: 700;
}

.hero-title {
    max-width: 780px;
    margin: 0;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.hero-movie-title {
    margin: 18px 0 10px;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.15;
    font-weight: 850;
}

.hero-desc {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

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

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta .pill,
.detail-hero .pill {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 10px 18px;
    border: 0;
    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: #ffffff;
    background: linear-gradient(90deg, #f97316, #ef4444, #ec4899);
    box-shadow: 0 14px 32px rgba(239, 68, 68, 0.34);
}

.btn-primary:hover {
    box-shadow: 0 18px 38px rgba(239, 68, 68, 0.42);
}

.btn-glass {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.btn-light {
    color: #9a3412;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    aspect-ratio: 3 / 4;
    background: linear-gradient(145deg, rgba(249, 115, 22, 0.6), rgba(236, 72, 153, 0.42));
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.45);
}

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

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.76) 100%);
}

.hero-poster-caption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2;
}

.hero-poster-caption strong {
    display: block;
    font-size: 22px;
    line-height: 1.2;
}

.hero-poster-caption span {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 4;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    margin: 54px 0;
}

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

.section-kicker {
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title {
    margin: 4px 0 0;
    font-size: clamp(25px, 3vw, 38px);
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-desc {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--text-muted);
}

.link-more {
    display: inline-flex;
    align-items: center;
    color: var(--brand-dark);
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link,
.poster-box {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 3 / 4;
    background:
        radial-gradient(circle at 30% 20%, rgba(249, 115, 22, 0.24), transparent 18rem),
        linear-gradient(145deg, #1f2937, #111827);
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 9px;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);
}

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

.card-title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 850;
}

.card-title a:hover {
    color: var(--brand-dark);
}

.card-meta {
    color: var(--text-muted);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 45px;
    margin: 9px 0 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    border-radius: 26px;
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444 55%, #ec4899);
    box-shadow: var(--shadow-card);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #9333ea, #f97316 52%, #ef4444);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #111827, #ef4444 56%, #f97316);
}

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.category-card ul {
    position: relative;
    z-index: 2;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.category-card li + li {
    margin-top: 6px;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -55px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.rank-panel {
    overflow: hidden;
    border-radius: 30px;
    background: #111827;
    color: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-row {
    display: grid;
    grid-template-columns: 68px 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-size: 18px;
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    width: 72px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: #1f2937;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 850;
}

.rank-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.rank-score {
    border-radius: 999px;
    padding: 7px 12px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.14);
    font-weight: 850;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 16%, rgba(236, 72, 153, 0.34), transparent 22rem),
        linear-gradient(135deg, #111827 0%, #7c2d12 54%, #ec4899 100%);
}

.page-hero .main-wrap,
.detail-hero .main-wrap {
    position: relative;
    z-index: 2;
    padding: 58px 0;
}

.page-hero h1,
.detail-hero h1 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(32px, 5vw, 60px);
    line-height: 1.08;
    font-weight: 930;
    letter-spacing: -0.04em;
}

.page-hero p,
.detail-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 170px;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select,
.search-box input {
    width: 100%;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    padding: 12px 14px;
    color: var(--text-main);
    background: #fffaf5;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-box input:focus {
    box-shadow: 0 0 0 4px var(--ring);
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow-card);
}

.detail-content {
    display: grid;
    gap: 22px;
}

.info-box {
    border-radius: 28px;
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.info-box h2 {
    margin: 0 0 12px;
    font-size: 25px;
    font-weight: 900;
}

.info-box p {
    margin: 0;
    color: #374151;
}

.info-box p + p {
    margin-top: 12px;
}

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

.player-stage {
    background: #0f172a;
}

.player-stage .main-wrap {
    padding: 42px 0;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 28px 78px rgba(15, 23, 42, 0.45);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(249, 115, 22, 0.34), transparent 18rem),
        linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.58));
}

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

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-button-core {
    gap: 12px;
    min-width: 180px;
    border-radius: 999px;
    padding: 16px 26px;
    background: linear-gradient(90deg, #f97316, #ef4444, #ec4899);
    box-shadow: 0 18px 42px rgba(239, 68, 68, 0.42);
    font-size: 19px;
    font-weight: 900;
}

.play-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

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

.search-box {
    max-width: 760px;
    margin: 0 auto 28px;
}

.search-results-title {
    margin-bottom: 18px;
    color: var(--text-muted);
    text-align: center;
    font-weight: 750;
}

.site-footer {
    margin-top: 62px;
    color: #d1d5db;
    background: linear-gradient(180deg, #111827, #030712);
}

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

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 850;
}

.footer-grid p,
.footer-grid li {
    color: #9ca3af;
    font-size: 14px;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid li + li {
    margin-top: 8px;
}

.footer-grid a:hover {
    color: #fed7aa;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    color: #6b7280;
    text-align: center;
    font-size: 14px;
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 70;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.32);
}

.back-top.is-visible {
    display: grid;
    place-items: center;
}

.empty-state {
    display: none;
    border-radius: 24px;
    padding: 28px;
    color: var(--text-muted);
    background: #ffffff;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
    display: block;
}

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

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

    .header-search input {
        width: 200px;
    }
}

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

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-content {
        padding: 54px 0 78px;
    }

    .hero-poster-card {
        max-width: 340px;
    }

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

@media (max-width: 680px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
        height: 60px;
    }

    .logo {
        font-size: 18px;
    }

    .main-wrap,
    .hero-content,
    .mobile-nav,
    .footer-grid {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-title {
        font-size: 38px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .rank-row {
        grid-template-columns: 42px 58px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    .rank-cover {
        width: 54px;
    }

    .rank-score {
        display: none;
    }

    .card-body {
        padding: 12px;
    }

    .page-hero .main-wrap,
    .detail-hero .main-wrap {
        padding: 42px 0;
    }
}
