:root {
    --orange: #f97316;
    --orange-dark: #ea580c;
    --amber: #f59e0b;
    --blue: #2563eb;
    --teal: #0f766e;
    --green: #16a34a;
    --text: #1f2937;
    --muted: #6b7280;
    --soft: #fff7ed;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 20px 50px rgba(31, 41, 55, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 36%, #fffbeb 100%);
    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 {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

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

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

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: var(--orange-dark);
    background: #fff7ed;
}

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

.top-search input,
.mobile-search input,
.hero-search input,
.filter-card input {
    width: 260px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    background: #fff;
    color: var(--text);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-card input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.top-search button,
.mobile-search button,
.hero-search button,
.primary-button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(249, 115, 22, 0.32);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
}

.mobile-panel {
    border-top: 1px solid var(--line);
    padding: 16px;
    background: #fff;
}

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

.hero-carousel {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    height: 520px;
    margin: 32px auto 48px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.48) 46%, rgba(0, 0, 0, 0.08) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent 55%);
}

.hero-copy {
    position: absolute;
    left: clamp(24px, 6vw, 72px);
    bottom: clamp(28px, 7vw, 72px);
    width: min(680px, calc(100% - 48px));
    color: #fff;
}

.eyebrow,
.section-heading span,
.category-card-content small {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(249, 115, 22, 0.94);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
}

.hero-tags,
.hero-actions,
.hero-mini-actions,
.detail-tags,
.tag-row,
.category-chips,
.compact-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.category-chips span,
.compact-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--orange-dark);
    background: #fff7ed;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-actions {
    margin-top: 26px;
}

.ghost-button,
.hero-mini-actions a {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover,
.hero-mini-actions a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    right: 32px;
    bottom: 26px;
    display: flex;
    gap: 8px;
}

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

.hero-dots button.is-active {
    width: 28px;
    background: #fff;
}

.content-section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 52px;
}

.soft-panel {
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 247, 237, 0.72);
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.14);
}

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

.section-heading h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-heading a {
    color: var(--orange-dark);
    font-weight: 800;
}

.section-heading.slim {
    margin-bottom: 14px;
}

.section-heading.slim h2 {
    font-size: 24px;
}

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

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(31, 41, 55, 0.16);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f3f4f6;
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.62) 100%);
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.movie-card-body strong {
    min-height: 44px;
    color: #111827;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.movie-desc {
    color: var(--muted);
    font-size: 13px;
}

.movie-desc {
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 20px;
    color: #fff;
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    position: absolute;
    object-fit: cover;
    inset: 0;
    transition: transform 0.3s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1));
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1;
}

.category-tile strong,
.category-tile small {
    display: block;
}

.category-tile strong {
    font-size: 21px;
    font-weight: 900;
}

.category-tile small {
    color: #e5e7eb;
}

.page-hero {
    margin-bottom: 40px;
    padding: 52px 0;
    color: #fff;
}

.orange-hero {
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.blue-hero {
    background: linear-gradient(135deg, #2563eb, #0f766e);
}

.green-hero {
    background: linear-gradient(135deg, #16a34a, #14b8a6);
}

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

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

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

.page-hero .breadcrumb {
    color: rgba(255, 255, 255, 0.78);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.hero-mini-actions {
    margin-top: 24px;
}

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

.category-card-large {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border-radius: 26px;
    color: #fff;
    box-shadow: var(--shadow);
}

.category-card-large img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-card-large:hover img {
    transform: scale(1.06);
}

.category-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

.category-card-content {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    display: grid;
    gap: 12px;
}

.category-card-content strong {
    font-size: 32px;
    line-height: 1.2;
}

.category-card-content em {
    max-width: 640px;
    color: #e5e7eb;
    font-style: normal;
}

.filter-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 18px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
}

.filter-card label {
    font-size: 20px;
    font-weight: 900;
}

.filter-card input {
    width: min(420px, 100%);
}

.empty-state {
    padding: 72px 20px;
    color: var(--muted);
    text-align: center;
    background: #fff;
    border-radius: 18px;
}

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

.ranking-panel {
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
}

.ranking-row {
    display: grid;
    grid-template-columns: 42px 76px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #f3f4f6;
}

.ranking-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    font-weight: 900;
}

.ranking-row img {
    width: 76px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.ranking-copy strong,
.compact-card strong {
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-copy small,
.ranking-copy span,
.compact-card small {
    color: var(--muted);
    font-size: 13px;
}

.ranking-copy span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-summary {
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 18px;
    font-weight: 700;
}

.detail-top {
    padding: 28px 0 0;
}

.detail-top .breadcrumb {
    margin-bottom: 18px;
    color: var(--muted);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 380px;
    gap: 28px;
}

.detail-main,
.detail-side {
    min-width: 0;
}

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.player-card {
    margin-bottom: 24px;
}

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

.player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.player-shade {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.78));
    cursor: pointer;
}

.player-shade.is-hidden {
    display: none;
}

.play-mark {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.32);
    font-size: 34px;
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
}

.detail-card h2,
.side-card h2 {
    margin: 26px 0 12px;
    font-size: 22px;
}

.detail-card p {
    margin: 0 0 16px;
    color: #4b5563;
    font-size: 16px;
}

.detail-card .lead-text {
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--muted);
}

.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3f4f6;
}

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

.side-card {
    padding: 20px;
}

.poster-side img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    margin-bottom: 14px;
}

.poster-side strong {
    display: block;
    font-size: 22px;
    line-height: 1.25;
}

.poster-side span {
    color: var(--muted);
}

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

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

.compact-card img {
    width: 86px;
    height: 112px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.site-footer {
    margin-top: 64px;
    padding: 46px 0 22px;
    color: #4b5563;
    background: #fff;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

.footer-grid p {
    max-width: 430px;
}

.footer-grid strong,
.footer-grid a {
    display: block;
}

.footer-grid strong {
    margin-bottom: 12px;
    color: #111827;
}

.footer-grid a {
    margin: 8px 0;
    color: #6b7280;
}

.footer-grid a:hover {
    color: var(--orange-dark);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: #9ca3af;
    font-size: 14px;
}

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

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

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

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

@media (max-width: 860px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

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

    .hero-carousel {
        height: 500px;
        border-radius: 22px;
    }

    .hero-overlay {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
    }

    .hero-copy {
        left: 22px;
        right: 22px;
        bottom: 34px;
        width: auto;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-control {
        display: none;
    }

    .category-large-grid,
    .footer-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .filter-card {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .container,
    .content-section,
    .hero-carousel,
    .footer-bottom {
        width: min(100% - 24px, 1280px);
    }

    .brand {
        font-size: 20px;
    }

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

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

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

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

    .movie-card-body strong {
        min-height: 40px;
        font-size: 15px;
    }

    .hero-carousel {
        margin-top: 20px;
        height: 460px;
    }

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

    .page-hero {
        padding: 38px 0;
    }

    .ranking-row {
        grid-template-columns: 34px 68px 1fr;
    }

    .ranking-row img {
        width: 68px;
        height: 88px;
    }

    .detail-card {
        padding: 20px;
    }
}
