:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --orange: #f97316;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 30rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.14), transparent 28rem),
        linear-gradient(180deg, #0f172a 0%, #020617 50%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent 78%);
    z-index: -1;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

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

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

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 12px 34px rgba(245, 158, 11, 0.38);
    transform: translateZ(0);
}

.logo-text,
.footer-logo {
    font-size: 1.7rem;
    background: linear-gradient(90deg, var(--amber-light), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: var(--soft);
    padding: 10px 16px;
    border-radius: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.68);
    color: #fff;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #fff;
}

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

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

.page-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    width: min(1320px, calc(100% - 32px));
    min-height: 680px;
    margin: 28px auto 48px;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid rgba(251, 191, 36, 0.24);
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: scale(1.02);
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.35) 100%), var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-content {
    position: relative;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 420px;
    gap: 38px;
    align-items: center;
    padding: 72px;
}

.hero-kicker,
.section-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--amber-light);
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.28);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero h1,
.page-title h1,
.detail-title h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.5rem, 7vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h1 span,
.gradient-title {
    background: linear-gradient(90deg, #fff, var(--amber-light), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    max-width: 680px;
    color: #dbeafe;
    font-size: 1.14rem;
    line-height: 1.85;
    margin: 0 0 26px;
}

.hero-meta,
.detail-meta,
.card-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--soft);
}

.chip,
.tag-pill,
.hero-meta span,
.detail-meta span,
.card-meta-line span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 0.84rem;
    font-weight: 700;
}

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

.btn-primary,
.btn-secondary,
.section-action,
.search-button,
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 16px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    font-weight: 900;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover,
.section-action:hover,
.search-button:hover,
.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(245, 158, 11, 0.36);
}

.btn-secondary {
    color: #fff;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: none;
}

.hero-search {
    display: flex;
    gap: 10px;
    margin-top: 26px;
    width: min(100%, 620px);
    padding: 8px;
    border: 1px solid rgba(251, 191, 36, 0.18);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
}

.hero-search input,
.search-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    padding: 0 14px;
    font-size: 1rem;
}

.hero-poster-card {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(251, 191, 36, 0.24);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.hero-poster-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.hero-poster-info {
    position: absolute;
    inset: auto 18px 18px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-poster-info strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.hero-controls {
    position: absolute;
    left: 72px;
    right: 72px;
    bottom: 38px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

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

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--amber-light), var(--orange));
}

.hero-arrow {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
}

.section-block {
    margin: 56px 0;
}

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

.section-heading h2,
.page-title h1 {
    margin: 12px 0 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.04em;
}

.section-heading p,
.page-title p {
    color: var(--muted);
    margin: 10px 0 0;
    max-width: 720px;
    line-height: 1.75;
}

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

.movie-card {
    height: 100%;
}

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.34);
    background: rgba(30, 41, 59, 0.86);
    box-shadow: 0 24px 70px rgba(245, 158, 11, 0.12);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(15, 23, 42, 0.88));
}

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

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

.image-missing {
    opacity: 0;
}

.poster-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.88);
}

.poster-wrap img:not(.image-missing) + .poster-fallback,
.hero-poster-card img:not(.image-missing) + .poster-fallback {
    display: none;
}

.type-badge,
.rating-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 0.78rem;
    font-weight: 900;
}

.rating-badge {
    left: auto;
    right: 14px;
    background: rgba(2, 6, 23, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}

.movie-card-meta,
.movie-card-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-card-body h3 {
    margin: 10px 0 8px;
    font-size: 1.16rem;
    line-height: 1.25;
}

.movie-card-body p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-foot {
    margin-top: auto;
    color: var(--soft);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.82));
    border: 1px solid var(--line);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.16);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -45px;
    bottom: -45px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 68%);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.32);
}

.category-card h3 {
    position: relative;
    margin: 14px 0 12px;
    font-size: 1.55rem;
}

.category-card p {
    position: relative;
    color: var(--muted);
    line-height: 1.7;
}

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

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 54px 78px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: rgba(30, 41, 59, 0.8);
}

.rank-num {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    font-weight: 1000;
}

.rank-thumb {
    position: relative;
    overflow: hidden;
    width: 78px;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.16);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.side-panel {
    position: sticky;
    top: 92px;
    border-radius: 28px;
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.side-panel h2,
.side-panel h3 {
    margin-top: 0;
}

.search-panel {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 24px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
}

.search-panel input {
    min-height: 46px;
}

.empty-result {
    display: none;
    padding: 32px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.54);
}

.empty-result.show {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0 18px;
    color: var(--muted);
    font-size: 0.95rem;
}

.breadcrumb a:hover {
    color: var(--amber-light);
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border-radius: 32px;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
    box-shadow: var(--shadow);
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(2, 6, 23, 0.92));
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-title h1 {
    font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.detail-title p {
    color: var(--soft);
    font-size: 1.08rem;
    line-height: 1.85;
}

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

.player-section {
    margin: 46px 0;
}

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

.player-box video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    z-index: 1;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62));
    transition: opacity 0.25s ease, visibility 0.25s ease;
    cursor: pointer;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: blur(1px);
}

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

.play-button {
    position: relative;
    z-index: 4;
    min-width: 152px;
    min-height: 58px;
    font-size: 1.1rem;
}

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

.article-panel,
.meta-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    background: var(--panel);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.16);
}

.article-panel h2,
.meta-panel h2,
.meta-panel h3 {
    margin-top: 0;
}

.article-panel p,
.meta-panel p,
.index-link-list a {
    color: var(--soft);
    line-height: 1.85;
}

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

.meta-list div {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.meta-list dd {
    margin: 0;
    color: #fff;
}

.index-link-list {
    columns: 4 220px;
    column-gap: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 24px;
    background: var(--panel);
}

.index-link-list a {
    display: block;
    break-inside: avoid;
    padding: 7px 0;
}

.index-link-list a:hover {
    color: var(--amber-light);
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
}

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

.footer-inner p {
    color: var(--muted);
    max-width: 430px;
    line-height: 1.7;
}

.footer-links {
    display: grid;
    gap: 10px;
    align-content: start;
}

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

.footer-links a:hover {
    color: var(--amber-light);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

    .hero-poster-card {
        display: none;
    }

    .side-panel {
        position: static;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: 620px;
        border-radius: 24px;
    }

    .hero-content {
        min-height: 620px;
        padding: 34px 24px 92px;
    }

    .hero-controls {
        left: 24px;
        right: 24px;
        bottom: 24px;
    }

    .hero-search,
    .search-panel {
        flex-direction: column;
    }

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

    .section-heading,
    .page-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-hero {
        padding: 22px;
    }

    .detail-poster {
        max-width: 360px;
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 540px) {
    .site-nav,
    .page-main,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .hero {
        width: min(100% - 22px, 1320px);
    }

    .movie-grid {
        gap: 16px;
    }

    .rank-item {
        grid-template-columns: 44px 66px 1fr;
    }

    .rank-thumb {
        width: 66px;
    }

    .article-panel,
    .meta-panel {
        padding: 20px;
    }
}
