:root {
    --bg-main: #020617;
    --bg-panel: rgba(15, 23, 42, 0.88);
    --bg-soft: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #0284c7;
    --accent-deep: #1d4ed8;
    --line: rgba(148, 163, 184, 0.18);
    --shadow: 0 25px 70px rgba(2, 8, 23, 0.55);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-main);
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(2, 8, 23, 0.32);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #7dd3fc, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0284c7, #1d4ed8);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #cbd5e1;
    font-weight: 650;
    font-size: 14px;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active,
.footer-links a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(51, 65, 85, 0.75);
    cursor: pointer;
}

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

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

.mobile-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
}

body.nav-open .mobile-nav {
    display: block;
}

main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    height: 78vh;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 7s ease;
}

.hero-slide.is-active > img {
    transform: scale(1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 40%, rgba(2, 6, 23, 0.16) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 42%);
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    max-width: 1180px;
}

.hero-content h1 {
    width: min(760px, 100%);
    margin: 18px 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    width: min(650px, 100%);
    margin: 0 0 30px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.movie-meta-line,
.tag-row,
.hero-actions,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.18);
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.22);
    font-size: 12px;
    font-weight: 700;
}

.movie-meta-line span {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.16);
}

.primary-button,
.ghost-button,
.search-panel button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 14px;
    border: 0;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.primary-button,
.search-panel button {
    color: white;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent-deep));
    box-shadow: 0 15px 35px rgba(2, 132, 199, 0.35);
}

.ghost-button {
    color: white;
    border: 1px solid rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.search-panel button:hover,
.text-link:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px;
    height: 64px;
    border: 0;
    border-radius: 18px;
    color: white;
    background: rgba(15, 23, 42, 0.5);
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 26px;
}

.hero-next {
    right: 26px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

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

.section {
    padding: 56px 0;
}

.section-search {
    margin-top: -76px;
    position: relative;
    z-index: 8;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.section-heading.centered {
    display: block;
    text-align: center;
    margin-bottom: 24px;
}

.section-heading.small {
    align-items: flex-start;
    margin-bottom: 18px;
}

.section-heading span,
.inner-hero span,
.split-feature span,
.category-overview-card span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading h2,
.inner-hero h1,
.split-feature h2,
.content-card h2,
.detail-info h1 {
    margin: 4px 0 0;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 42px);
}

.section-heading p,
.inner-hero p,
.split-feature p,
.content-card p,
.movie-card-body p,
.rank-content p,
.detail-one-line {
    color: var(--text-muted);
}

.section-heading a,
.text-link {
    color: #7dd3fc;
    font-weight: 800;
}

.search-panel {
    display: flex;
    width: min(760px, 100%);
    margin: 0 auto;
    gap: 12px;
}

.search-panel input {
    flex: 1;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: 0;
    color: white;
    background: rgba(2, 6, 23, 0.64);
}

.search-panel input:focus {
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(2, 8, 23, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 26px 60px rgba(2, 132, 199, 0.16);
}

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

.movie-poster img,
.rank-cover img,
.detail-poster img,
.category-covers img,
.overview-images img,
.split-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .movie-poster img,
.rank-item:hover .rank-cover img,
.category-tile:hover img,
.category-overview-card:hover img,
.split-feature:hover img {
    transform: scale(1.08);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: rgba(2, 132, 199, 0.78);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(12px);
}

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

.card-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    min-width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

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

.movie-card-body h3,
.rank-content h3 {
    margin: 10px 0 8px;
    color: white;
    font-size: 18px;
    line-height: 1.28;
}

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

.movie-card-body p,
.rank-content p {
    margin: 0 0 12px;
    font-size: 14px;
}

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

.category-tile,
.category-overview-card,
.split-feature,
.rank-panel,
.content-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-tile {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
    padding: 18px;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    min-height: 170px;
}

.category-covers img,
.overview-images img {
    border-radius: 14px;
}

.category-tile h3,
.category-overview-card h2 {
    margin: 4px 0 8px;
    font-size: 24px;
}

.category-tile p,
.category-overview-card p {
    color: var(--text-muted);
    margin: 0;
}

.section-split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 24px;
}

.split-feature {
    display: grid;
    grid-template-columns: 42% 1fr;
    min-height: 460px;
}

.split-feature > div {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.split-feature h2 {
    font-size: clamp(28px, 4vw, 48px);
}

.rank-panel {
    padding: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 86px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.compact-rank .rank-item:nth-child(n + 7) {
    display: none;
}

.rank-number {
    display: flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: white;
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.22);
    font-weight: 900;
}

.rank-cover {
    width: 86px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.page-inner {
    padding-top: 110px;
}

.inner-hero {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 460px);
    gap: 30px;
    align-items: end;
    min-height: 320px;
    padding: 54px;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.24), transparent 26rem), rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.inner-hero h1 {
    max-width: 760px;
    font-size: clamp(34px, 5vw, 60px);
}

.inner-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: 18px;
}

.filter-section {
    padding-top: 30px;
}

.filter-row {
    margin-bottom: 24px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.68);
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: white;
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(2, 132, 199, 0.5);
}

.category-overview-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 22px;
    padding: 18px;
}

.overview-images {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    min-height: 190px;
}

.detail-hero {
    position: relative;
    min-height: 760px;
    overflow: hidden;
    padding-top: 110px;
    background: #020617;
}

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

.detail-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.1);
    transform: scale(1.06);
    opacity: 0.42;
}

.detail-overlay {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.92)), linear-gradient(0deg, #020617 0%, transparent 35%);
}

.detail-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #cbd5e1;
    margin-bottom: 28px;
    font-size: 14px;
}

.breadcrumbs a {
    color: #7dd3fc;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 44px;
    align-items: center;
}

.detail-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(2, 8, 23, 0.58);
    border: 1px solid rgba(226, 232, 240, 0.22);
}

.detail-info h1 {
    max-width: 860px;
    margin: 18px 0;
    font-size: clamp(38px, 6vw, 72px);
}

.detail-one-line {
    max-width: 820px;
    font-size: 20px;
    margin-bottom: 24px;
}

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

.detail-section {
    margin-top: -130px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: #020617;
    box-shadow: 0 30px 90px rgba(2, 8, 23, 0.65);
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: white;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.26), rgba(2, 6, 23, 0.18) 32%, rgba(2, 6, 23, 0.58));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
    display: flex;
    width: 92px;
    height: 92px;
    align-items: center;
    justify-content: center;
    padding-left: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0284c7, #1d4ed8);
    box-shadow: 0 24px 60px rgba(2, 132, 199, 0.48);
    font-size: 34px;
}

.detail-text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.content-card {
    padding: 30px;
}

.content-card h2 {
    font-size: 28px;
}

.content-card p {
    margin: 16px 0 0;
    font-size: 17px;
}

.site-footer {
    margin-top: 70px;
    background: linear-gradient(90deg, #020617, #0f172a, #020617);
    border-top: 1px solid var(--line);
}

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

.footer-grid p {
    color: var(--text-muted);
    max-width: 520px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    color: #64748b;
    border-top: 1px solid var(--line);
}

.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

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

    .menu-toggle {
        display: block;
    }

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

    .section-split,
    .inner-hero,
    .detail-layout,
    .detail-text-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .split-feature {
        grid-template-columns: 1fr;
    }

    .split-feature img {
        min-height: 420px;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        height: 60px;
    }

    .site-logo {
        font-size: 20px;
    }

    .hero-carousel {
        height: 86vh;
        min-height: 600px;
    }

    .hero-content {
        padding-top: 60px;
    }

    .hero-arrow {
        display: none;
    }

    .section,
    .page-inner,
    .page-detail .section {
        width: min(100% - 24px, 1180px);
    }

    .section-search,
    .inner-hero {
        padding: 24px;
    }

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

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

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

    .category-tile,
    .category-overview-card,
    .rank-item {
        grid-template-columns: 1fr;
    }

    .rank-number {
        width: 100%;
    }

    .rank-cover {
        width: 100%;
        max-width: 220px;
    }

    .detail-hero {
        min-height: auto;
        padding-bottom: 180px;
    }

    .detail-section {
        margin-top: -150px;
    }

    .player-shell {
        border-radius: 18px;
    }
}
