:root {
    color-scheme: light;
    --orange-700: #c2410c;
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --orange-100: #ffedd5;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-soft: 0 14px 40px rgba(17, 24, 39, 0.12);
    --shadow-card: 0 10px 24px rgba(17, 24, 39, 0.10);
    --radius-xl: 26px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
    font-family: Inter, 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;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-700), var(--orange-500));
    box-shadow: 0 8px 24px rgba(194, 65, 12, 0.28);
}

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand {
    font-size: 21px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: var(--orange-600);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

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

.nav-link,
.mobile-nav-link {
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    background: rgba(255, 255, 255, 0.18);
}

.header-search,
.large-search,
.mobile-menu form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search {
    width: min(360px, 30vw);
}

.header-search input,
.large-search input,
.mobile-menu input {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    outline: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 11px 16px;
}

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

.header-search button,
.mobile-menu button {
    border: 0;
    color: var(--orange-700);
    background: var(--white);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border-radius: 12px;
}

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

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

.mobile-menu nav,
.mobile-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-nav-link,
.mobile-categories a {
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.hero {
    position: relative;
    height: clamp(520px, 70vh, 680px);
    overflow: hidden;
    background: var(--gray-900);
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
    transform: scale(1.03);
}

.hero-overlay,
.detail-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.88) 0%, rgba(17, 24, 39, 0.72) 42%, rgba(17, 24, 39, 0.24) 100%), linear-gradient(0deg, rgba(3, 7, 18, 0.78), rgba(3, 7, 18, 0.12));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 48px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    color: var(--white);
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker,
.section-head p,
.page-hero p:first-child {
    margin: 0 0 12px;
    color: var(--orange-100);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-desc,
.detail-line,
.page-hero p:last-child {
    max-width: 740px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2vw, 22px);
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 700;
}

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

.primary-btn,
.secondary-btn,
.ghost-btn,
.large-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.large-search button {
    border: 0;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-600), var(--orange-500));
    box-shadow: 0 14px 26px rgba(249, 115, 22, 0.32);
}

.secondary-btn {
    color: var(--orange-700);
    background: var(--white);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.34);
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.large-search button:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-poster {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-control {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--white);
    background: rgba(17, 24, 39, 0.42);
    border-radius: 50%;
    font-size: 34px;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

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

.quick-search-panel,
.section-wrap,
.page-hero,
.detail-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: 28px;
    align-items: center;
    margin-top: -48px;
    padding: 28px;
    border: 1px solid rgba(249, 115, 22, 0.16);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 3;
    backdrop-filter: blur(16px);
}

.quick-search-panel h2,
.section-head h2,
.ranking-panel h2,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.quick-search-panel p {
    margin: 10px 0 0;
    color: var(--gray-600);
}

.large-search input {
    border-color: var(--gray-200);
    color: var(--gray-900);
    background: var(--white);
}

.large-search input::placeholder {
    color: var(--gray-500);
}

.section-wrap {
    padding-top: 58px;
}

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

.section-head p {
    color: var(--orange-600);
}

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

.movie-grid,
.feature-grid,
.category-grid,
.category-overview-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: 0 18px 36px rgba(17, 24, 39, 0.16);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-200), var(--orange-100));
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.movie-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--white);
    background: rgba(234, 88, 12, 0.94);
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 16px;
}

.movie-title {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-900);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.32;
}

.movie-line {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--gray-600);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 700;
}

.category-tile,
.category-overview-card a {
    display: block;
    min-height: 150px;
    padding: 22px;
    border: 1px solid rgba(249, 115, 22, 0.16);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fff7ed, #ffffff 58%, #f9fafb);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.category-tile span,
.category-overview-card h2 {
    display: block;
    margin: 0 0 10px;
    color: var(--gray-900);
    font-size: 22px;
    font-weight: 850;
}

.category-tile em,
.category-overview-card p {
    display: block;
    margin: 0;
    color: var(--gray-600);
    font-style: normal;
    font-size: 14px;
}

.category-overview-card span {
    display: inline-flex;
    margin-top: 18px;
    color: var(--orange-700);
    font-weight: 800;
}

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

.ranking-panel,
.detail-side {
    align-self: start;
    padding: 22px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

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

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

.rank-item:hover {
    background: #fff7ed;
    transform: translateX(3px);
}

.rank-number {
    color: var(--orange-600);
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--gray-200);
}

.rank-title {
    display: block;
    overflow: hidden;
    color: var(--gray-900);
    font-weight: 850;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    grid-column: 3;
    color: var(--gray-500);
    font-size: 13px;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    align-items: center;
    gap: 32px;
    margin-top: 34px;
    padding: 54px;
    color: var(--white);
    border-radius: var(--radius-xl);
    background: radial-gradient(circle at 12% 0%, rgba(251, 146, 60, 0.95), transparent 34%), linear-gradient(135deg, var(--gray-950), var(--gray-800));
    box-shadow: var(--shadow-soft);
}

.simple-hero {
    display: block;
}

.page-hero h1 {
    max-width: 760px;
}

.search-hero .large-search,
.category-hero .large-search {
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.empty-result {
    display: none;
    margin: 28px 0 0;
    padding: 24px;
    text-align: center;
    color: var(--gray-600);
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    color: var(--white);
    background: var(--gray-950);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) saturate(1.1);
    transform: scale(1.03);
}

.detail-content {
    position: relative;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    min-height: 560px;
    padding: 56px 0;
    z-index: 1;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.44);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--gray-900);
    background: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 800;
}

.player-section {
    margin-top: -80px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.18), rgba(3, 7, 18, 0.62));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    padding-left: 6px;
    border-radius: 50%;
    color: var(--orange-600);
    background: var(--white);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.30);
    font-size: 38px;
}

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

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

.detail-article {
    padding: 30px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-article h2 {
    margin-top: 0;
    margin-bottom: 16px;
}

.detail-article h2:not(:first-child) {
    margin-top: 32px;
}

.detail-article p {
    margin: 0 0 16px;
    color: var(--gray-700);
    font-size: 17px;
}

.detail-side dl,
.detail-side dd,
.detail-side dt {
    margin: 0;
}

.detail-side dl {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.detail-side dl div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

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

.detail-side dd {
    color: var(--gray-800);
    font-weight: 700;
}

.site-footer {
    margin-top: 70px;
    color: var(--gray-300);
    background: var(--gray-900);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.8fr;
    gap: 42px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
}

.footer-logo {
    color: var(--white);
    font-size: 22px;
}

.footer-inner p {
    margin: 14px 0 0;
    color: var(--gray-300);
}

.footer-inner h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

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

.footer-links a {
    color: var(--gray-300);
}

.footer-links a:hover {
    color: var(--orange-500);
}

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

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .hero-content,
    .quick-search-panel,
    .split-layout,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 24px;
    }

    .hero-poster {
        display: none;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        height: 62px;
    }

    .brand {
        font-size: 18px;
    }

    .hero {
        height: 600px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 74px;
    }

    .hero-control {
        display: none;
    }

    .quick-search-panel,
    .page-hero {
        padding: 24px;
    }

    .quick-search-panel {
        margin-top: -24px;
    }

    .large-search {
        flex-direction: column;
        align-items: stretch;
    }

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

    .movie-grid,
    .small-grid,
    .feature-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-info {
        padding: 12px;
    }

    .movie-title {
        font-size: 15px;
    }

    .movie-line {
        min-height: 40px;
        font-size: 13px;
    }

    .rank-list {
        grid-template-columns: 1fr;
    }

    .page-hero {
        display: block;
    }

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

    .detail-poster {
        width: 210px;
    }

    .detail-hero {
        min-height: auto;
    }

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

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

@media (max-width: 480px) {
    .movie-grid,
    .small-grid,
    .feature-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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