:root {
    --amber: #f59e0b;
    --orange: #f97316;
    --rose: #f43f5e;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --text: #111827;
    --muted: #6b7280;
    --line: rgba(15, 23, 42, 0.10);
    --card: #ffffff;
    --soft: #fff7ed;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 44%, #fff1f2 100%);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--amber), var(--orange), var(--rose));
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.24);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-icon,
.footer-logo span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    display: none;
    place-items: center;
    padding: 10px;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px 0;
    border-radius: 99px;
    background: #fff;
}

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

.mobile-links a {
    display: block;
    padding: 12px 4px;
    color: #fff;
    font-weight: 700;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

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

.page-main {
    min-height: 72vh;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

.hero-image,
.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.86) 0%, rgba(15, 23, 42, 0.68) 36%, rgba(15, 23, 42, 0.16) 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0.24;
    background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.24) 0 1px, transparent 2px), radial-gradient(circle at 70% 60%, rgba(245,158,11,0.24) 0 2px, transparent 4px);
    background-size: 34px 34px, 90px 90px;
}

.hero-content {
    position: absolute;
    z-index: 5;
    left: max(24px, calc((100vw - 1240px) / 2));
    bottom: 12vh;
    width: min(680px, calc(100% - 48px));
    color: #fff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    color: #d97706;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow,
.section-kicker.light {
    color: #fbbf24;
}

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

.hero p,
.page-hero p,
.detail-copy p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 21px);
}

.hero-tags,
.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-line span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.34);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(16px);
}

.btn.text {
    color: #fde68a;
    padding-inline: 6px;
}

.light-border {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--amber);
}

.home-search-wrap {
    position: relative;
    z-index: 9;
    width: min(1000px, calc(100% - 32px));
    margin: -42px auto 38px;
}

.search-panel {
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel label {
    display: block;
    margin-bottom: 10px;
    color: #92400e;
    font-weight: 900;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    min-height: 54px;
    padding: 0 18px;
    border: 2px solid rgba(245, 158, 11, 0.22);
    border-radius: 18px;
    background: #fff;
}

.search-row input {
    width: 100%;
    border: 0;
    outline: none;
    color: var(--text);
    background: transparent;
}

.search-row span {
    color: var(--orange);
    font-size: 24px;
    font-weight: 900;
}

.content-section,
.category-overview-block,
.text-card,
.player-card,
.side-card {
    margin-bottom: 54px;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.highlight-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 237, 0.86));
}

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

.section-head h2,
.category-overview-head h2,
.text-card h2,
.player-card h2,
.side-card h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head a,
.category-overview-head a {
    color: #d97706;
    font-weight: 900;
    white-space: nowrap;
}

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #fde68a, #fb923c);
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img {
    transform: scale(1.09);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 45%, rgba(15, 23, 42, 0.76) 100%);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.movie-card:hover .poster-wrap::after {
    opacity: 1;
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.76);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

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

.play-mark {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(245, 158, 11, 0.86);
    transform: translate(-50%, -50%) scale(0.78);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.movie-info strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1.3;
}

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

.desc-line {
    min-height: 44px;
}

.tag-line span {
    color: #b45309;
    background: #ffedd5;
    backdrop-filter: none;
}

.rank-entry {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.4fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 54px;
    padding: 32px;
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(120deg, #2563eb, #0891b2, #0f766e);
    box-shadow: 0 28px 70px rgba(8, 145, 178, 0.24);
}

.rank-entry h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.08;
}

.rank-entry p {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
}

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

.rank-list .movie-card {
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

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

.category-grid.wide {
    margin-bottom: 54px;
}

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--slate);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    opacity: 0.78;
    transition: transform 0.42s ease, opacity 0.42s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.82));
}

.category-tile span {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 6px;
    color: #fff;
}

.category-tile strong {
    font-size: 21px;
    line-height: 1.2;
}

.category-tile em {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-style: normal;
}

.soft-bg {
    padding-bottom: 64px;
    background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 54%, #fff1f2 100%);
}

.page-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 34px auto 34px;
    padding: 42px;
    border-radius: 30px;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.62), transparent 34%), linear-gradient(135deg, #0f172a, #1f2937 50%, #9a3412);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.page-hero.small-hero h1,
.page-hero.category-hero h1,
.page-hero.rank-hero h1,
.page-hero.library-hero h1 {
    font-size: clamp(32px, 5vw, 56px);
}

.category-overview-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.category-list,
.library-grid,
.ranking-grid {
    padding-top: 24px;
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: var(--slate);
}

.detail-bg,
.detail-overlay {
    position: absolute;
    inset: 0;
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 54px;
    color: #fff;
}

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

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

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

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.detail-copy .hero-tags {
    margin-bottom: 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 360px;
    gap: 28px;
    margin-top: 34px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-button {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.28), rgba(15, 23, 42, 0.68));
    cursor: pointer;
}

.player-button span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 50px rgba(249, 115, 22, 0.42);
    font-size: 32px;
}

.player-button strong {
    font-size: 19px;
}

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

.text-card p {
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.text-card h2 + p {
    margin-top: 10px;
}

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

.meta-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.meta-list span {
    color: var(--muted);
}

.meta-list strong {
    text-align: right;
}

.detail-side {
    position: sticky;
    top: 92px;
    align-self: start;
}

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

.side-related .movie-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    border-radius: 18px;
}

.side-related .poster-wrap {
    height: 100%;
    aspect-ratio: auto;
}

.side-related .desc-line,
.side-related .tag-line {
    display: none;
}

.side-related .movie-info strong {
    font-size: 15px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b 55%, #0f172a);
}

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

.footer-inner p {
    max-width: 420px;
    color: #94a3b8;
}

.footer-inner h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

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

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 16px 24px;
    text-align: center;
    color: #94a3b8;
}

[data-card].is-hidden,
.no-match.is-hidden {
    display: none;
}

.no-match {
    grid-column: 1 / -1;
    padding: 30px;
    border-radius: 20px;
    background: #fff;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .nav-links {
        gap: 14px;
    }

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

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

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

    .detail-side {
        position: static;
    }
}

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

    .menu-button {
        display: grid;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-content {
        bottom: 88px;
    }

    .section-head,
    .category-overview-head,
    .page-hero,
    .rank-entry {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-list,
    .movie-grid,
    .featured-grid,
    .compact-four,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-top {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 240px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .container,
    .footer-inner,
    .page-hero,
    .detail-inner {
        width: min(100% - 22px, 1240px);
    }

    .brand {
        font-size: 18px;
    }

    .home-search-wrap {
        width: min(100% - 22px, 1000px);
    }

    .content-section,
    .category-overview-block,
    .text-card,
    .player-card,
    .side-card,
    .page-hero,
    .rank-entry {
        padding: 20px;
        border-radius: 22px;
    }

    .movie-grid,
    .featured-grid,
    .compact-four,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .side-related .movie-card {
        grid-template-columns: 104px 1fr;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
