* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --gold: #f59e0b;
    --red: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

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 top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 30rem),
        var(--bg);
    min-height: 100vh;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    width: min(1280px, 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.02em;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.logo-text,
.footer-logo {
    font-size: 1.35rem;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link,
.menu-link {
    color: #dbeafe;
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.menu-link:hover {
    color: var(--cyan);
}

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

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

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

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

.menu-link {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
}

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

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 23, 0.08) 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    padding: 96px 0 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1280px;
}

.hero-content h1 {
    width: min(760px, 100%);
    margin: 18px 0;
    font-size: clamp(2.6rem, 7vw, 6.4rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p {
    width: min(680px, 100%);
    margin: 0 0 28px;
    color: #cbd5e1;
    font-size: 1.12rem;
    line-height: 1.8;
}

.hero-pill,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.13);
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    font-size: 0.88rem;
}

.hero-tags,
.detail-tags,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-tags span,
.card-meta span {
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 0.84rem;
}

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

.primary-btn,
.ghost-btn,
.quick-search button,
.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.quick-search button,
.search-box button {
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.22);
}

.ghost-btn {
    color: #e0f2fe;
    border: 1px solid rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.ghost-btn:hover,
.quick-search button:hover,
.search-box button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(226, 232, 240, 0.2);
    border-radius: 50%;
    color: white;
    background: rgba(2, 6, 23, 0.56);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.home-search-panel,
.search-tools {
    width: min(1180px, calc(100% - 32px));
    margin: -54px auto 0;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 560px);
    align-items: center;
    gap: 24px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.home-search-panel span {
    color: var(--cyan);
    font-weight: 900;
}

.home-search-panel h2 {
    margin: 6px 0 0;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.quick-search,
.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.quick-search input,
.search-box input,
.filter-row select {
    width: 100%;
    min-height: 50px;
    color: #e2e8f0;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: rgba(2, 6, 23, 0.62);
    padding: 0 18px;
}

.content-section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0;
}

.dark-band {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1280px) / 2));
    padding-right: max(16px, calc((100% - 1280px) / 2));
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.42), rgba(2, 6, 23, 0.72));
}

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

.section-head h2 {
    margin: 12px 0 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -0.04em;
}

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

.section-more {
    flex: 0 0 auto;
    color: var(--cyan);
    font-weight: 900;
}

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel-strong);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
}

.category-tile img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.08));
}

.tile-content {
    position: absolute;
    inset: auto 18px 18px;
}

.tile-content strong {
    display: block;
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.tile-content small {
    display: -webkit-box;
    color: #cbd5e1;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-tile:hover img,
.movie-card:hover img {
    transform: scale(1.06);
}

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

.movie-row,
.ranking-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 240px;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x proximity;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.46);
    background: rgba(15, 23, 42, 0.92);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.card-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 38% 0 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.card-year,
.card-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 900;
}

.card-year {
    top: 12px;
    left: 12px;
    color: #00111a;
    background: var(--cyan);
}

.card-type {
    right: 12px;
    bottom: 12px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.2);
}

.rank-badge {
    top: 12px;
    right: 12px;
    color: white;
    background: linear-gradient(135deg, var(--red), var(--gold));
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.35;
}

.card-title a:hover {
    color: var(--cyan);
}

.card-desc {
    display: -webkit-box;
    min-height: 4.8em;
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    gap: 7px;
}

.card-meta span {
    padding: 5px 8px;
    font-size: 0.76rem;
}

.sub-hero,
.category-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.2), transparent 24rem),
        linear-gradient(135deg, #020617, #0f172a 55%, #111827);
}

.sub-hero-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 78px;
}

.sub-hero h1,
.category-hero h1,
.detail-copy h1 {
    margin: 18px 0 12px;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.sub-hero p,
.category-hero p,
.detail-one-line {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.8;
}

.category-hero {
    min-height: 460px;
}

.category-hero > img,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.category-hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.68) 55%, rgba(2, 6, 23, 0.24)),
        linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.04) 42%);
}

.category-hero-content,
.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-weight: 800;
    margin-bottom: 28px;
}

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

.detail-hero {
    min-height: 620px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(240px, 330px) 1fr;
    gap: 42px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(226, 232, 240, 0.2);
    box-shadow: var(--shadow);
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-copy {
    max-width: 820px;
}

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

.player-section {
    width: min(1100px, calc(100% - 32px));
    margin: -80px auto 0;
    position: relative;
    z-index: 4;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: var(--shadow);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: black;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: black;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    color: white;
    border: 0;
    cursor: pointer;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.42)),
        transparent;
}

.player-cover.is-hidden {
    display: none;
}

.play-circle {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.28);
    font-size: 2.2rem;
}

.player-cover strong {
    font-size: clamp(1.25rem, 3vw, 2rem);
}

.play-main {
    margin-top: 18px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.article-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    padding: clamp(22px, 4vw, 36px);
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 1.55rem;
}

.article-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 2;
    font-size: 1.02rem;
}

.compact-info dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.compact-info dl div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.36);
}

.compact-info dt {
    color: var(--cyan);
    font-weight: 900;
    margin-bottom: 6px;
}

.compact-info dd {
    margin: 0;
    color: #e2e8f0;
    line-height: 1.6;
}

.search-tools {
    margin-top: -40px;
    grid-template-columns: 1fr;
}

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

.filter-row label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.empty-result {
    display: none;
    margin: 28px auto 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: #cbd5e1;
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

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

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

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

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

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

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

.footer-links a {
    color: #cbd5e1;
    font-weight: 800;
}

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

@media (max-width: 1180px) {
    .desktop-nav {
        gap: 14px;
    }

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 600px;
    }

    .hero-content {
        padding: 76px 0 120px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .detail-layout {
        grid-template-columns: 220px 1fr;
        gap: 28px;
    }

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

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

    .logo-text {
        font-size: 1.08rem;
    }

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .quick-search,
    .search-box {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 54px 0;
    }

    .section-head {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 14px;
    }

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

    .movie-row,
    .ranking-strip {
        grid-auto-columns: 210px;
    }

    .card-body {
        padding: 13px;
    }

    .card-desc {
        font-size: 0.86rem;
    }

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

    .detail-poster {
        width: min(220px, 72vw);
    }

    .player-section {
        margin-top: -44px;
    }

    .compact-info dl {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        display: block;
    }

    .footer-links {
        margin-top: 20px;
    }
}

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

    .mobile-nav {
        grid-template-columns: 1fr;
    }

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

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