:root {
    --amber: #d97706;
    --amber-dark: #b45309;
    --amber-soft: #fff7ed;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --soft: #f9fafb;
    --night: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--soft);
}

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

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

button,
input {
    font: inherit;
}

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

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), #f97316);
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

.brand-name {
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--amber-dark);
    background: var(--amber-soft);
}

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

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

.top-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.inline-filter input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.top-search button,
.mobile-search button,
.wide-search button,
.inline-filter button {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--amber);
    padding: 11px 18px;
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--amber-soft);
    padding: 10px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    background: var(--amber-dark);
    margin: 5px 0;
}

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

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

.mobile-panel nav {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    color: #374151;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--night);
}

.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-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 48px;
    align-items: center;
    padding: 70px 0;
}

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

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(217, 119, 6, 0.92);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 660px;
    margin: 0 0 30px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.primary-button {
    color: #fff;
    background: var(--amber);
    padding: 13px 24px;
    box-shadow: 0 16px 30px rgba(217, 119, 6, 0.32);
}

.primary-button:hover {
    background: var(--amber-dark);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.08);
}

.text-button {
    color: var(--amber-dark);
    margin-top: 16px;
}

.hero-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    background: rgba(255, 255, 255, 0.14);
    padding: 10px;
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.section-wrap,
.home-search-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
}

.home-search-section {
    padding-bottom: 28px;
}

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

.section-heading span,
.page-hero span {
    display: block;
    color: var(--amber-dark);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-heading h2,
.page-hero h1 {
    margin: 6px 0 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.14;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.center-heading p {
    color: var(--muted);
    line-height: 1.8;
}

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

.center-heading {
    display: block;
    text-align: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.wide-search {
    width: min(760px, 100%);
    margin: 26px auto 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.wide-search input {
    flex: 1;
    border: 0;
    box-shadow: none;
}

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

.category-card,
.category-overview-card,
.movie-card,
.detail-panel,
.side-card,
.ranking-card,
.rank-panel {
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    color: #fff;
}

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

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.78));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: #e5e7eb;
    line-height: 1.7;
}

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

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

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

.movie-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

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

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

.movie-year,
.movie-type {
    position: absolute;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.movie-year {
    right: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.movie-type {
    left: 10px;
    background: var(--amber);
}

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

.movie-title {
    display: block;
    min-height: 48px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.4;
}

.movie-title:hover {
    color: var(--amber-dark);
}

.movie-card-body p {
    min-height: 68px;
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-tags,
.detail-tags,
.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.detail-tags span,
.genre-list span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--amber-dark);
    background: var(--amber-soft);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card-compact .movie-title {
    min-height: 42px;
    font-size: 14px;
}

.movie-card-compact .movie-card-body p {
    display: none;
}

.rank-panel {
    padding: 20px;
    position: sticky;
    top: 96px;
}

.compact-heading {
    display: block;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 34px 62px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.rank-number {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--amber);
    font-weight: 900;
}

.rank-item img {
    width: 62px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy strong {
    font-weight: 900;
}

.rank-copy em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 255, 255, 0.92)), var(--hero-image, none);
    background-size: cover;
    background-position: center;
}

.page-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 82px 0;
    max-width: 820px;
}

.small-hero > div {
    text-align: center;
}

.inline-filter {
    margin-top: 24px;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    align-items: center;
}

.category-cover-set {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-cover-set img {
    aspect-ratio: 3 / 4;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

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

.category-overview-card p {
    color: var(--muted);
    line-height: 1.75;
}

.ranking-grid {
    display: grid;
    gap: 18px;
}

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

.ranking-poster {
    position: relative;
}

.ranking-poster img {
    width: 112px;
    height: 150px;
    object-fit: cover;
    border-radius: 16px;
}

.ranking-poster span {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--amber);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.3);
}

.ranking-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.ranking-card p {
    color: var(--muted);
    line-height: 1.75;
}

.detail-hero {
    position: relative;
    color: #fff;
    background: var(--night);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.5)), var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #e5e7eb;
    margin-bottom: 44px;
}

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

.detail-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.detail-title-row h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.detail-title-row p {
    max-width: 780px;
    color: #e5e7eb;
    line-height: 1.8;
    font-size: 18px;
}

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

.detail-main {
    display: grid;
    gap: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.site-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
    cursor: pointer;
}

.video-play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
    cursor: pointer;
}

.video-play-button span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--amber);
    font-size: 34px;
    box-shadow: 0 18px 46px rgba(217, 119, 6, 0.34);
}

.video-play-button strong {
    font-size: 18px;
}

.player-shell.is-playing .video-play-button {
    opacity: 0;
    pointer-events: none;
}

.video-error {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    color: #fff;
    text-align: center;
    font-weight: 800;
}

.detail-panel {
    padding: 26px;
}

.detail-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 900;
}

.detail-panel p {
    margin: 0 0 24px;
    color: #374151;
    line-height: 1.9;
    font-size: 16px;
}

.detail-tags {
    margin-top: 4px;
}

.prev-next-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

.prev-next-links a {
    color: var(--amber-dark);
    font-weight: 800;
}

.detail-side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 96px;
}

.detail-poster {
    width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 900;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0 0 18px;
}

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

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

.side-card a {
    color: var(--amber-dark);
}

.site-footer {
    margin-top: 40px;
    background: #111827;
    color: #d1d5db;
}

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

.footer-logo {
    color: #f59e0b;
    margin-bottom: 16px;
}

.footer-brand p {
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.site-footer ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #f59e0b;
}

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

.is-hidden {
    display: none !important;
}

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }

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

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

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

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .header-inner {
        height: 64px;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
    }

    .hero-slide.is-active {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 52px 0 86px;
    }

    .hero-poster {
        width: min(240px, 80%);
        margin: 0 auto;
        transform: none;
    }

    .hero-arrow {
        display: none;
    }

    .section-heading,
    .detail-title-row,
    .prev-next-links {
        display: block;
    }

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

    .category-overview-card,
    .ranking-card {
        grid-template-columns: 1fr;
    }

    .category-cover-set {
        grid-template-columns: repeat(4, 1fr);
    }

    .wide-search,
    .inline-filter,
    .mobile-search {
        border-radius: 24px;
        flex-direction: column;
        align-items: stretch;
    }

    .wide-search input,
    .inline-filter input,
    .mobile-search input {
        width: 100%;
    }

    .page-hero > div,
    .detail-hero-inner {
        padding: 54px 0;
    }
}
