:root {
    --bg: #fff7ed;
    --bg-soft: #fff1f2;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(249, 115, 22, 0.16);
    --orange: #f97316;
    --orange-dark: #ea580c;
    --pink: #ec4899;
    --amber: #f59e0b;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 18px 45px rgba(148, 82, 19, 0.16);
    --radius: 24px;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, 0.22), transparent 32rem),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 34rem),
        linear-gradient(135deg, #fff7ed 0%, #fff1f2 48%, #fffbeb 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
    color: inherit;
}

img.is-hidden {
    display: none;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 247, 237, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(251, 146, 60, 0.18);
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.12);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.28);
}

.brand-name {
    font-size: 1.45rem;
    background: linear-gradient(90deg, var(--orange-dark), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link,
.mobile-nav-link {
    padding: 9px 14px;
    color: #374151;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

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

.header-search input,
.mobile-search input,
.big-search input,
.listing-search,
.search-page-input {
    min-width: 240px;
    border: 1px solid rgba(249, 115, 22, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    padding: 11px 16px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.listing-search:focus,
.search-page-input:focus {
    border-color: rgba(249, 115, 22, 0.72);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-submit,
.big-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.24);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(249, 115, 22, 0.18);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #374151;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

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

.search-panel {
    position: fixed;
    top: 74px;
    left: 50%;
    width: min(680px, calc(100% - 32px));
    transform: translateX(-50%);
    z-index: 110;
    display: none;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(249, 115, 22, 0.16);
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.search-result-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid rgba(249, 115, 22, 0.12);
}

.search-result-item:last-child {
    border-bottom: 0;
}

.search-result-item img {
    width: 64px;
    height: 84px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #fed7aa, #fbcfe8);
}

.search-result-item strong {
    display: block;
    margin-bottom: 4px;
}

.search-result-item small {
    color: var(--muted);
}

.hero {
    position: relative;
    overflow: hidden;
    padding-bottom: 30px;
    background: #111827;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

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

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 13px;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.28);
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
    max-width: 780px;
    margin: 22px 0 16px;
    font-size: clamp(2.35rem, 7vw, 5.6rem);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.15rem;
    line-height: 1.9;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.9rem;
    font-weight: 700;
}

.card-meta {
    margin: 0 0 10px;
}

.card-meta span {
    color: var(--orange-dark);
    background: #ffedd5;
}

.hero-actions,
.detail-intro .primary-button {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 24px;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.32);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.hero-rail {
    width: min(1180px, calc(100% - 32px));
    margin: -86px auto 0;
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 78px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    color: #fff;
    background: rgba(17, 24, 39, 0.62);
    backdrop-filter: blur(12px);
    text-align: left;
    cursor: pointer;
}

.hero-thumb.active {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(236, 72, 153, 0.88));
}

.hero-thumb img {
    width: 56px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #fed7aa, #fbcfe8);
}

.hero-thumb span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 800;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: 34px;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.quick-search-panel h2,
.section-heading h2,
.listing-toolbar h2,
.content-panel h2,
.sidebar-card h2 {
    margin: 10px 0;
    color: var(--ink);
    font-size: clamp(1.45rem, 3vw, 2.4rem);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.quick-search-panel p,
.section-heading p,
.listing-toolbar p,
.content-panel p {
    color: var(--muted);
    line-height: 1.85;
}

.big-search,
.search-page-form {
    display: flex;
    gap: 12px;
}

.big-search input,
.search-page-input {
    flex: 1;
    min-width: 0;
}

.section-block {
    padding: 54px 0;
}

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

.section-more {
    color: var(--orange-dark);
    background: #ffedd5;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 38px rgba(148, 82, 19, 0.12);
    transition: 0.22s ease;
}

.poster-link,
.poster-media {
    display: block;
}

.poster-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.74), transparent 34%),
        linear-gradient(135deg, #fed7aa, #fbcfe8 52%, #fde68a);
}

.poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.2);
}

.score-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(17, 24, 39, 0.78);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 9px;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.35;
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag,
.filter-chip {
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--orange-dark);
    background: #ffedd5;
    font-size: 0.82rem;
    font-weight: 800;
}

.filter-chip {
    border: 0;
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

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

.category-tile,
.category-overview-card a {
    position: relative;
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-radius: 24px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.22);
}

.category-tile:nth-child(3n + 2),
.category-overview-card:nth-child(3n + 2) a {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.category-tile:nth-child(3n + 3),
.category-overview-card:nth-child(3n + 3) a {
    background: linear-gradient(135deg, #10b981, #f97316);
}

.category-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
}

.category-name {
    position: relative;
    z-index: 1;
    font-size: 1.45rem;
    font-weight: 950;
}

.category-desc,
.category-sample,
.category-samples {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

.category-samples {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.ranking-grid .movie-card,
.compact-card {
    display: grid;
    grid-template-columns: 112px 1fr;
}

.ranking-grid .poster-media,
.compact-card .poster-media {
    height: 100%;
    min-height: 154px;
    aspect-ratio: auto;
}

.page-hero,
.detail-hero {
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 26rem),
        linear-gradient(135deg, #f97316, #ec4899 62%, #f59e0b);
}

.page-hero .container {
    padding: 92px 0 74px;
}

.small-hero .container,
.search-hero .container {
    padding-bottom: 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

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

.listing-toolbar {
    align-items: center;
    border-radius: 24px;
    padding: 24px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.toolbar-actions {
    display: grid;
    gap: 14px;
    justify-items: end;
}

.listing-search {
    width: min(100%, 420px);
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: 22px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    box-shadow: var(--shadow);
}

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

.detail-hero {
    background-size: cover;
    background-position: center;
}

.detail-hero-inner {
    padding: 92px 0 70px;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-cover {
    border: 6px solid rgba(255, 255, 255, 0.32);
    border-radius: 28px;
    box-shadow: 0 28px 58px rgba(17, 24, 39, 0.36);
}

.detail-cover img {
    border-radius: 20px;
}

.detail-tags .tag {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 42px 0 66px;
}

.detail-main,
.detail-sidebar {
    display: grid;
    gap: 22px;
    align-content: start;
}

.player-section,
.content-panel,
.sidebar-card {
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

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

.movie-video {
    width: 100%;
    height: 100%;
    background: #111827;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
    cursor: pointer;
    transition: 0.22s ease;
}

.play-overlay.is-playing {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.42);
    font-size: 2rem;
    padding-left: 5px;
}

.player-title-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
}

.player-title-row h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 950;
}

.player-title-row span {
    color: var(--orange-dark);
    font-weight: 900;
}

.content-panel,
.sidebar-card {
    padding: 24px;
}

.content-panel p {
    font-size: 1.05rem;
    color: #374151;
}

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

.nav-panel a {
    display: flex;
    min-height: 58px;
    align-items: center;
    border-radius: 16px;
    padding: 14px;
    color: var(--orange-dark);
    background: #ffedd5;
    font-weight: 800;
}

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

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

.related-poster {
    display: block;
    overflow: hidden;
    height: 68px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fed7aa, #fbcfe8);
}

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

.related-info strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
}

.related-info small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.side-meta dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px 14px;
}

.side-meta dt {
    color: var(--muted);
}

.side-meta dd {
    margin: 0;
    font-weight: 800;
}

.search-page-form {
    max-width: 720px;
    margin-top: 28px;
}

.site-footer {
    color: #f9fafb;
    background: #111827;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 18px;
    padding: 42px 0;
}

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

.footer-inner p {
    max-width: 720px;
    color: #d1d5db;
}

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

.footer-links a {
    color: #fed7aa;
    font-weight: 800;
}

.footer-copy {
    font-size: 0.9rem;
}

@media (max-width: 1080px) {
    .header-search {
        display: none;
    }

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

    .hero-rail {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-search-panel,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

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

    .header-inner {
        height: 66px;
    }

    .hero-stage {
        min-height: 560px;
    }

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

    .hero-arrow {
        display: none;
    }

    .hero-rail,
    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .ranking-grid .movie-card,
    .compact-card,
    .detail-hero-grid,
    .detail-sidebar,
    .nav-panel {
        grid-template-columns: 1fr;
    }

    .hero-thumb {
        grid-template-columns: 46px 1fr;
    }

    .section-heading,
    .listing-toolbar,
    .player-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar-actions {
        justify-items: stretch;
    }

    .listing-search {
        width: 100%;
    }

    .detail-cover {
        width: min(260px, 100%);
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .footer-inner,
    .hero-content,
    .hero-rail {
        width: min(100% - 22px, 1180px);
    }

    .brand-name {
        font-size: 1.08rem;
    }

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

    .hero-stage {
        min-height: 510px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-intro h1 {
        font-size: 2.45rem;
    }

    .hero-rail {
        margin-top: -52px;
        grid-template-columns: 1fr;
    }

    .quick-search-panel,
    .listing-toolbar,
    .content-panel,
    .sidebar-card {
        padding: 18px;
        border-radius: 18px;
    }

    .big-search,
    .search-page-form {
        flex-direction: column;
    }

    .page-hero .container,
    .detail-hero-inner {
        padding: 58px 0 48px;
    }
}
