:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --deep: #020617;
    --navy: #0f2f61;
    --blue: #1d4ed8;
    --amber: #f59e0b;
    --orange: #f97316;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 32rem),
        radial-gradient(circle at top right, rgba(29, 78, 216, 0.12), transparent 34rem),
        var(--bg);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(30, 58, 138, 0.95), rgba(2, 6, 23, 0.97));
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(16px);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.36);
}

.brand-text,
.footer-brand span:last-child {
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #fb923c, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 650;
    padding: 22px 0 20px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fbbf24;
    border-color: #fbbf24;
}

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px 18px;
}

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

.mobile-nav-link {
    color: #cbd5e1;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 650;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.95);
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.36) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 45%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.52fr);
    align-items: center;
    gap: 52px;
    padding: 64px 0 90px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(2.55rem, 6vw, 5.5rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
    max-width: 850px;
    margin: 0 0 20px;
}

.hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
    line-height: 1.9;
    margin: 0;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 32px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.32);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(12px);
}

.hero-card {
    align-self: center;
    padding: 18px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(20px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.hero-card-title strong {
    font-size: 1.15rem;
}

.hero-card-title span {
    color: #fcd34d;
    font-weight: 800;
}

.hero-search {
    position: relative;
    z-index: 5;
    margin-top: -44px;
}

.hero-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-field {
    min-height: 50px;
    width: 100%;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    outline: none;
    color: var(--ink);
    background: #ffffff;
}

.search-field:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

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

.hero-dot {
    width: 38px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    transition: background 0.2s ease, width 0.2s ease;
}

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

.page-shell {
    padding: 44px 0 0;
}

.section {
    margin-top: 64px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-action {
    flex-shrink: 0;
    color: #b45309;
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(245, 158, 11, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

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

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

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.86);
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.62);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
    padding: 15px 15px 17px;
}

.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: #64748b;
    font-size: 0.78rem;
    margin-bottom: 9px;
}

.movie-meta a,
.movie-meta span {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.movie-card h3 {
    margin: 0 0 9px;
    font-size: 1rem;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #d97706;
}

.movie-card p {
    min-height: 3.2em;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

.category-tile {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: var(--radius);
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.9)),
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.45), transparent 14rem);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
    font-size: 1.25rem;
}

.category-tile p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
    margin: 14px 0 0;
}

.category-samples {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.compact-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.compact-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    opacity: 0.86;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.compact-card:hover img {
    opacity: 1;
    transform: scale(1.06);
}

.compact-card span {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid var(--line);
}

.empty-result {
    display: none;
    padding: 36px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border: 1px solid var(--line);
}

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

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 62px 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}

.rank-num {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.ranking-item:nth-child(-n + 3) .rank-num {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.ranking-item img {
    width: 92px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    background: #e2e8f0;
}

.ranking-item h2 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.ranking-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.score-pill {
    color: #b45309;
    background: #fef3c7;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 900;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 22px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    padding: 28px;
    border-radius: 34px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.95), rgba(30, 64, 175, 0.92)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.32), transparent 24rem);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-info .movie-meta a,
.detail-info .movie-meta span {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
}

.detail-info p {
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.9;
    margin: 18px 0 0;
}

.detail-info .tag-row {
    margin-top: 22px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    margin-top: 34px;
}

.article-panel,
.side-panel {
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}

.article-panel {
    padding: 26px;
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
}

.article-panel p {
    margin: 0 0 16px;
    color: #334155;
    line-height: 2;
}

.side-panel {
    padding: 18px;
    align-self: start;
}

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

.side-link {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.side-link:hover {
    background: #f8fafc;
}

.side-link img {
    width: 66px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: #e2e8f0;
}

.side-link strong {
    display: block;
    line-height: 1.4;
}

.side-link span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 5px;
}

.player-section {
    margin-top: 34px;
    border-radius: 34px;
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow);
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.15));
    cursor: pointer;
    z-index: 3;
}

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

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 2.4rem;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.38);
}

.player-caption {
    padding: 18px 22px 22px;
    color: rgba(255, 255, 255, 0.84);
}

.player-caption h2 {
    margin: 0 0 8px;
    color: #ffffff;
}

.player-caption p {
    margin: 0;
    line-height: 1.7;
}

.player-error {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: none;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.82);
    padding: 12px 14px;
    border-radius: 14px;
    z-index: 4;
}

.player-error.show {
    display: block;
}

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-grid p {
    max-width: 440px;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 1rem;
}

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

.footer-links a {
    color: #94a3b8;
}

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

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

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

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

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

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

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

    .hero,
    .hero-inner {
        min-height: 720px;
    }

    .hero-inner {
        gap: 24px;
        padding: 44px 0 92px;
    }

    .hero-search-panel,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

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

    .ranking-item {
        grid-template-columns: 48px 72px minmax(0, 1fr);
    }

    .ranking-item img {
        width: 72px;
    }

    .score-pill {
        grid-column: 3;
        width: fit-content;
    }

    .detail-hero,
    .article-panel {
        padding: 18px;
        border-radius: 24px;
    }

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

@media (max-width: 460px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

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

    .hero h1 {
        font-size: 2.35rem;
    }

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