:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft-text: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --deep-blue: #1d4ed8;
    --green: #34d399;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.14), transparent 34rem),
        radial-gradient(circle at 100% 8%, rgba(59, 130, 246, 0.16), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 28px rgba(34, 211, 238, 0.22);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    color: var(--soft-text);
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: rgba(2, 6, 23, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 14px;
}

.header-search input,
.mobile-nav input,
.filter-panel input,
.filter-panel select {
    color: var(--text);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.22);
    outline: none;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 230px;
    padding: 10px 12px;
    border-color: transparent;
    background: transparent;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}

.header-search button,
.mobile-nav button,
.primary-button,
.ghost-button,
.section-more {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.primary-button {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 30px rgba(34, 211, 238, 0.18);
}

.header-search button {
    padding: 10px 14px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
}

.ghost-button,
.section-more {
    color: var(--text);
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.header-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding: 14px 16px 18px;
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.mobile-nav input {
    padding: 11px 12px;
}

.mobile-nav button {
    color: #001018;
    padding: 0 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 72% 20%, rgba(34, 211, 238, 0.18), transparent 22rem),
        radial-gradient(circle at 18% 42%, rgba(29, 78, 216, 0.16), transparent 28rem);
    z-index: 3;
}

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

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.1s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) brightness(0.45);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.32) 100%),
        linear-gradient(0deg, #020617 0%, transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 5;
    min-height: 650px;
    padding-top: 78px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    gap: 56px;
    align-items: center;
}

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

.eyebrow {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--text);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero h1 {
    font-size: clamp(46px, 7vw, 86px);
}

.hero-meta,
.detail-meta,
.wide-meta {
    color: var(--cyan);
    font-weight: 700;
}

.hero-summary {
    max-width: 640px;
    color: var(--soft-text);
    font-size: 18px;
    line-height: 1.9;
}

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

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    min-height: 520px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.14));
}

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

.hero-poster span,
.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #001018;
    background: rgba(34, 211, 238, 0.92);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.28);
}

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

.hero-dot {
    width: 36px;
    height: 4px;
    border: 0;
    border-radius: 99px;
    background: rgba(203, 213, 225, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-category-strip {
    position: absolute;
    z-index: 8;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
}

.hero-category-strip a {
    flex: 0 0 auto;
    color: var(--soft-text);
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.soft-panel-section {
    background: rgba(15, 23, 42, 0.34);
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.section-heading h2,
.site-footer h2,
.story-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 30px;
    letter-spacing: -0.04em;
}

.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
}

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

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

.catalog-grid {
    margin-top: 26px;
}

.movie-card,
.wide-card,
.category-card a,
.category-tile,
.story-card,
.filter-panel {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.58));
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.movie-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-tile:hover,
.category-card a:hover,
.wide-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 24px 56px rgba(8, 47, 73, 0.28);
}

.poster-link,
.poster-frame {
    display: block;
    position: relative;
}

.poster-frame {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.18));
}

.poster-frame img,
.wide-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-frame img,
.wide-card:hover .wide-cover img,
.detail-poster:hover img {
    transform: scale(1.05);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.72) 100%);
}

.play-mark {
    width: 50px;
    height: 50px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #001018;
    font-weight: 900;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.movie-card h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.wide-card h3 a:hover {
    color: var(--cyan);
}

.movie-card p,
.category-tile p,
.category-card p,
.story-card p,
.site-footer p,
.page-hero p,
.wide-card p,
.detail-one-line {
    color: var(--soft-text);
    line-height: 1.8;
}

.movie-card p {
    min-height: 72px;
    margin: 0 0 14px;
    font-size: 14px;
}

.tag-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-row span {
    color: var(--cyan);
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.09);
    border: 1px solid rgba(34, 211, 238, 0.16);
}

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

.category-tile,
.category-card a {
    display: block;
    min-height: 158px;
    padding: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.category-tile span,
.category-card h2 {
    display: block;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
}

.category-card strong {
    color: var(--cyan);
}

.category-card a {
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.category-glow {
    position: absolute;
    right: -48px;
    top: -48px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.14);
    filter: blur(10px);
}

.page-main {
    padding-bottom: 76px;
}

.page-hero {
    position: relative;
    margin-top: 42px;
    margin-bottom: 28px;
    padding: 54px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 32px;
    background:
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.16), transparent 20rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.52));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 62px);
}

.page-hero p {
    max-width: 780px;
    margin: 16px 0 0;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
    margin-top: 22px;
}

.breadcrumb a {
    color: var(--cyan);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1fr;
    gap: 16px;
    padding: 18px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 12px 14px;
}

.empty-state {
    display: none;
    color: var(--muted);
    text-align: center;
    padding: 38px;
    margin-top: 22px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 20px;
}

.empty-state.is-visible {
    display: block;
}

.ranking-lead {
    margin-bottom: 28px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.wide-cover {
    display: block;
    height: 170px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.14));
}

.wide-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wide-heading h3 {
    margin: 0;
    font-size: 22px;
}

.list-rank {
    width: 38px;
    height: 38px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: #001018;
    font-weight: 900;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.wide-tags {
    color: var(--cyan) !important;
}

.detail-main {
    padding-bottom: 70px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 610px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) brightness(0.42) saturate(1.14);
    transform: scale(1.08);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(34, 211, 238, 0.16), transparent 22rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.72), #020617 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 42px 0 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    margin-top: 36px;
}

.detail-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.14));
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.detail-one-line {
    max-width: 760px;
    font-size: 18px;
}

.detail-tags {
    margin: 20px 0 28px;
}

.player-section {
    margin-top: -28px;
    position: relative;
    z-index: 3;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    border: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.16), transparent 14rem),
        rgba(2, 6, 23, 0.28);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #001018;
    font-size: 30px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.3);
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 30px;
}

.story-card {
    padding: 28px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.72);
    padding-top: 54px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 40px;
}

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

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

.footer-bottom {
    margin-top: 42px;
    padding: 18px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

@media (max-width: 1120px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr 320px;
    }

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

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

@media (max-width: 820px) {
    .hero {
        min-height: 780px;
    }

    .hero-content {
        min-height: 700px;
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 44px;
    }

    .hero-poster {
        min-height: 360px;
        width: min(290px, 100%);
    }

    .hero-controls {
        bottom: 86px;
    }

    .section-heading,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

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

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

    .page-hero {
        padding: 34px 24px;
    }

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

    .detail-poster {
        width: min(260px, 100%);
    }
}

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

    .logo {
        font-size: 19px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-summary,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

    .wide-card {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 12px;
    }

    .wide-cover {
        height: 126px;
    }

    .wide-heading h3 {
        font-size: 18px;
    }

    .list-rank {
        width: 32px;
        height: 32px;
    }

    .story-card {
        padding: 22px;
    }
}
