:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f8fafc;
    --muted: #94a3b8;
    --amber: #f59e0b;
    --amber-soft: #fbbf24;
    --blue: #2563eb;
    --cyan: #22d3ee;
    --radius: 24px;
    --shadow: 0 25px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.26), transparent 38rem),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.16), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

main {
    min-height: 60vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b, #fb923c);
    box-shadow: 0 0 26px rgba(245, 158, 11, 0.45);
}

.brand-name {
    font-size: 1.22rem;
    background: linear-gradient(90deg, #fde68a, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #fff;
    background: rgba(245, 158, 11, 0.14);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: #f8fafc;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-slider {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: scale(1.02);
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide::before,
.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image, var(--page-hero-image));
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.55);
    transform: scale(1.05);
}

.hero-backdrop,
.page-hero::after,
.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0.92)),
        radial-gradient(circle at 72% 28%, rgba(245, 158, 11, 0.25), transparent 30rem),
        radial-gradient(circle at 18% 74%, rgba(37, 99, 235, 0.32), transparent 36rem);
}

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

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fde68a;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 18px;
    font-size: clamp(2.4rem, 7vw, 5.6rem);
    line-height: 1.02;
    font-weight: 950;
    text-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.hero-copy p,
.page-hero p,
.detail-info p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.85;
}

.hero-tags,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.movie-tags span {
    display: inline-flex;
    border: 1px solid rgba(245, 158, 11, 0.24);
    color: #fde68a;
    background: rgba(245, 158, 11, 0.11);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.82rem;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b, #fb923c);
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.25);
}

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

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.36);
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.hero-poster img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    color: #111827;
    font-weight: 900;
    border-radius: 999px;
    padding: 8px 14px;
    background: #fbbf24;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 2rem;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 30px;
    background: #fbbf24;
}

.home-search-panel,
.toolbar-card,
.section-block,
.overview-grid,
.detail-layout,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-panel {
    margin-top: -34px;
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.home-search-panel h2,
.toolbar-card h2,
.section-heading h2,
.detail-main h2,
.detail-side h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    font-weight: 900;
}

.home-search-panel p,
.toolbar-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.section-heading a {
    color: #fbbf24;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    overflow: hidden;
    border-radius: 24px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(2, 6, 23, 0.94)), var(--category-image);
    background-size: cover;
    background-position: center;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.category-card strong {
    position: relative;
    z-index: 2;
    font-size: 1.25rem;
}

.category-card em {
    position: relative;
    z-index: 2;
    color: #cbd5e1;
    font-style: normal;
    font-size: 0.9rem;
    line-height: 1.55;
}

.category-glow {
    position: absolute;
    inset: auto -35% -40% -35%;
    height: 90px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.35), transparent 62%);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.34);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #0f172a;
}

.movie-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.74));
}

.video-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.video-badge {
    top: 12px;
    right: 12px;
    color: #fff;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.88);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    color: #111827;
    background: #fbbf24;
}

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

.movie-title {
    display: block;
    color: #fff;
    font-weight: 900;
    font-size: 1.08rem;
    line-height: 1.35;
    margin-bottom: 8px;
}

.movie-title:hover {
    color: #fbbf24;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 0.88rem;
}

.movie-card-body p {
    color: #94a3b8;
    line-height: 1.7;
    min-height: 4.6em;
}

.movie-card-compact .movie-card-body p {
    min-height: auto;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px max(16px, calc((100vw - 1180px) / 2));
    isolation: isolate;
}

.page-hero > *,
.detail-hero > * {
    position: relative;
    z-index: 2;
}

.compact-hero::before {
    background-image:
        radial-gradient(circle at 24% 20%, rgba(245, 158, 11, 0.25), transparent 24rem),
        radial-gradient(circle at 80% 40%, rgba(37, 99, 235, 0.28), transparent 28rem);
    filter: none;
    transform: none;
}

.compact-hero h1,
.category-hero h1,
.ranking-hero h1 {
    max-width: 900px;
}

.toolbar-card {
    margin-top: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 24px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.toolbar-actions {
    display: grid;
    gap: 12px;
}

.site-search {
    width: 100%;
    height: 48px;
    color: #fff;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 0 16px;
    background: rgba(2, 6, 23, 0.72);
}

.site-search:focus {
    border-color: rgba(245, 158, 11, 0.58);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #111827;
    background: #fbbf24;
    border-color: #fbbf24;
}

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

.overview-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
}

.overview-cover {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
}

.overview-cover img {
    height: 100%;
    object-fit: cover;
}

.overview-cover span {
    position: absolute;
    inset: auto 12px 12px 12px;
    font-weight: 900;
}

.overview-card h2 {
    margin: 4px 0 10px;
}

.overview-card p {
    color: #cbd5e1;
    line-height: 1.75;
}

.overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.overview-links a {
    color: #fde68a;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(245, 158, 11, 0.1);
}

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

.related-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.34);
}

.related-card img {
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
}

.related-card strong,
.related-card em {
    display: block;
}

.related-card strong {
    font-size: 0.96rem;
    line-height: 1.35;
}

.related-card em {
    margin-top: 5px;
    color: #94a3b8;
    font-style: normal;
    font-size: 0.82rem;
}

.detail-hero {
    min-height: 520px;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
}

.detail-poster {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow);
}

.detail-poster img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.breadcrumb a {
    color: #fbbf24;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.12);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82));
    cursor: pointer;
}

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

.play-button {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    font-size: 2rem;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: 0 0 48px rgba(245, 158, 11, 0.55);
}

.player-overlay strong {
    max-width: min(720px, 90%);
    font-size: clamp(1.4rem, 4vw, 2.6rem);
    text-align: center;
}

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

.detail-main,
.detail-side {
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-main {
    padding: 30px;
}

.detail-main p {
    color: #cbd5e1;
    line-height: 2;
    font-size: 1.04rem;
}

.detail-side {
    padding: 24px;
    align-self: start;
}

.related-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.detail-meta-grid div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-meta-grid span,
.detail-meta-grid strong {
    display: block;
}

.detail-meta-grid span {
    color: #94a3b8;
    margin-bottom: 8px;
}

.site-footer {
    margin-top: 80px;
    padding: 44px 0 24px;
    background: rgba(2, 6, 23, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-inner p,
.footer-bottom {
    color: #94a3b8;
    line-height: 1.75;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    justify-content: flex-end;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.search-empty {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 26px;
    text-align: center;
    color: #cbd5e1;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
}

.search-empty.visible {
    display: block;
}

.movie-card.hidden-card {
    display: none;
}

@media (max-width: 1100px) {
    .category-grid,
    .related-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-content {
        padding: 44px 0 110px;
    }

    .hero-poster,
    .detail-poster {
        max-width: 320px;
    }

    .home-search-panel,
    .section-heading,
    .toolbar-card,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .home-search-panel,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .overview-card {
        grid-template-columns: 150px minmax(0, 1fr);
    }

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .top-nav,
    .home-search-panel,
    .toolbar-card,
    .section-block,
    .overview-grid,
    .detail-layout,
    .player-section,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-slider,
    .hero-content {
        min-height: 84vh;
    }

    .hero-poster {
        display: none;
    }

    .category-grid,
    .movie-grid,
    .related-strip,
    .overview-card {
        grid-template-columns: 1fr;
    }

    .movie-card-body p {
        min-height: auto;
    }

    .page-hero,
    .detail-hero {
        padding-top: 46px;
        padding-bottom: 46px;
    }

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