:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: rgba(255, 255, 255, 0.84);
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #0891b2;
    --cyan-soft: #e0f7ff;
    --shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 30rem),
        radial-gradient(circle at top right, rgba(8, 145, 178, 0.15), transparent 28rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 20px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
}

.main-nav a {
    padding: 9px 12px;
    border-radius: 12px;
    color: #334155;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--blue);
    background: #eff6ff;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #0f172a;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide,
.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.1) 52%, rgba(2, 6, 23, 0.64));
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    background: linear-gradient(135deg, #0f172a, #1d4ed8, #06b6d4);
    filter: saturate(1.12);
}

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

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

.eyebrow {
    margin: 0 0 10px;
    color: #38bdf8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-desc {
    margin: 24px 0 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
}

.tag-row span {
    background: #f1f5f9;
    color: #475569;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 750;
    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, var(--blue), var(--cyan));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a, #0e7490);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #1e3a8a, #0e7490);
}

.hero-poster span {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.34);
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
}

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

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

.page-hero {
    padding: 54px 0 22px;
}

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

.page-hero p {
    max-width: 820px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.section {
    margin-top: 56px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-head p:not(.eyebrow) {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--blue);
    background: #eff6ff;
    font-weight: 750;
}

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

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

.movie-card {
    min-width: 0;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.poster-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #1e40af, #0e7490);
    transition: transform 0.3s ease, opacity 0.2s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent);
}

.rating-badge,
.region-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.rating-badge {
    right: 10px;
}

.region-badge {
    left: 10px;
    max-width: calc(100% - 74px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

.movie-card h3 a:hover,
.rank-body h3 a:hover {
    color: var(--blue);
}

.movie-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
}

.movie-card .tag-row {
    margin-top: 10px;
}

.feature-panel,
.filter-panel,
.detail-card,
.category-tile,
.player-card {
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: var(--panel-soft);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.feature-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 26px;
    padding: 28px;
}

.feature-panel h2 {
    margin: 0;
    font-size: clamp(28px, 5vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.feature-panel p {
    margin: 14px 0 0;
    color: var(--muted);
}

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

.feature-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
}

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

.category-tile {
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
}

.category-tile h3 {
    margin: 0;
    font-size: 20px;
}

.category-tile p {
    margin: 8px 0 16px;
    color: var(--muted);
    font-size: 14px;
}

.category-tile span {
    color: var(--blue);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 160px 160px;
    gap: 12px;
    margin: 18px 0 28px;
    padding: 16px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 0 14px;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px #dbeafe;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 86px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
}

.rank-num {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.rank-img {
    width: 86px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #1e40af, #0e7490);
}

.rank-body h3 {
    margin: 0;
    font-size: 18px;
}

.rank-body p {
    margin: 6px 0 0;
    color: var(--muted);
}

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

.detail-card {
    padding: 26px;
}

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

.detail-title {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.detail-summary {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.info-box {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.info-box span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.info-box strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
}

.article-block {
    margin-top: 26px;
}

.article-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.article-block p {
    margin: 0;
    color: #334155;
    font-size: 16px;
}

.side-poster {
    position: sticky;
    top: 96px;
}

.side-poster .poster {
    border-radius: 26px;
}

.player-card {
    margin-bottom: 28px;
    overflow: hidden;
    background: #020617;
}

.player-shell {
    position: relative;
    background: #020617;
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.32), rgba(2, 6, 23, 0.72));
}

.play-layer.is-hidden {
    display: none;
}

.play-button {
    display: inline-grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.32);
    font-size: 34px;
    text-indent: 4px;
}

.player-meta {
    padding: 16px 18px 18px;
    color: #cbd5e1;
}

.player-meta strong {
    color: #ffffff;
}

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

.no-results {
    display: none;
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    display: block;
    color: var(--text);
    margin-bottom: 6px;
}

.footer-inner p {
    margin: 0;
}

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

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

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

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

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

    .hero-poster {
        display: none;
    }

    .side-poster {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        max-height: 70vh;
        padding: 12px;
        overflow-y: auto;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        height: 540px;
    }

    .hero-content {
        width: min(100% - 28px, 1180px);
        gap: 20px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .page-main {
        width: min(100% - 28px, 1180px);
        padding-top: 30px;
    }

    .section-head,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .rank-item {
        grid-template-columns: 42px 70px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-num {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .rank-img {
        width: 70px;
    }

    .rank-body p {
        display: none;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .page-hero h1,
    .detail-title {
        letter-spacing: -0.03em;
    }
}
