:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --violet: #8b5cf6;
    --pink: #f472b6;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.18), transparent 30rem),
        radial-gradient(circle at 82% 8%, rgba(59, 130, 246, 0.20), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 38%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 36px rgba(34, 211, 238, 0.32);
}

.logo-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 auto;
}

.desktop-nav a,
.mobile-panel nav a {
    color: var(--soft);
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel nav a:hover,
.mobile-panel nav a.is-active {
    color: var(--cyan);
}

.header-search,
.mobile-search,
.wide-search {
    display: flex;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-panel input {
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.88);
    border-radius: 14px;
}

.header-search input {
    width: 230px;
    padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.wide-search button,
.primary-button,
.ghost-button,
.filter-buttons button {
    border: 0;
    border-radius: 14px;
    color: var(--text);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.filter-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(34, 211, 238, 0.22);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 14px 24px 20px;
    background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.mobile-search input {
    flex: 1;
    padding: 11px 12px;
}

main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

.hero-shell {
    position: relative;
    min-height: 620px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #020617;
}

.hero-carousel,
.hero-slide {
    min-height: 620px;
}

.hero-slide {
    display: none;
    position: relative;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 80px clamp(28px, 6vw, 92px);
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28)),
        var(--hero-image) center / cover no-repeat;
}

.hero-slide.is-active {
    display: flex;
    animation: heroFade 0.5s ease both;
}

@keyframes heroFade {
    from {
        opacity: 0.35;
        transform: scale(1.015);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 20%, rgba(34, 211, 238, 0.24), transparent 24rem),
        linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.92) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

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

.hero-content h1,
.page-hero h1 {
    margin: 0;
    line-height: 1.05;
    font-size: clamp(38px, 7vw, 78px);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-text,
.page-hero p,
.lead-text {
    color: var(--soft);
    line-height: 1.9;
}

.hero-text {
    max-width: 680px;
    margin: 24px 0 0;
    font-size: 18px;
}

.hero-tags,
.tag-row,
.category-strip,
.filter-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.category-chip {
    border: 1px solid rgba(34, 211, 238, 0.22);
    color: #dffbff;
    background: rgba(8, 47, 73, 0.42);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
}

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

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

.ghost-button {
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.78);
}

.hero-poster {
    position: relative;
    z-index: 2;
    flex: 0 0 min(32vw, 360px);
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.12));
}

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

img.is-missing {
    opacity: 0;
}

.hero-dots {
    position: absolute;
    left: clamp(28px, 6vw, 92px);
    bottom: 34px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.search-band,
.section-block,
.hot-panel,
.filter-panel,
.detail-article,
.player-card,
.page-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.search-band {
    margin: 28px 0;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.search-band h2,
.section-heading h2,
.detail-article h1,
.detail-article h2,
.hot-panel h2 {
    margin: 0;
}

.wide-search {
    flex: 1;
    max-width: 720px;
}

.wide-search input {
    flex: 1;
    padding: 14px 16px;
}

.section-block {
    margin: 28px 0;
    padding: 28px;
}

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

.section-heading a {
    color: var(--cyan);
    font-weight: 800;
}

.section-heading.compact {
    align-items: center;
    margin-bottom: 16px;
}

.category-strip {
    margin-bottom: 22px;
}

.category-chip:hover {
    border-color: rgba(34, 211, 238, 0.56);
    background: rgba(8, 47, 73, 0.72);
}

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

.category-tile {
    position: relative;
    min-height: 178px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.92)),
        var(--tile-image) center / cover no-repeat,
        linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.12));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.46);
}

.category-tile span {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
}

.category-tile strong {
    font-size: 20px;
}

.category-tile em {
    color: var(--soft);
    font-style: normal;
    font-size: 14px;
    line-height: 1.7;
}

.category-tile.large {
    min-height: 240px;
}

.section-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.14));
}

.cover-year,
.rank-badge {
    position: absolute;
    top: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.cover-year {
    right: 10px;
    color: #e0f2fe;
    background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
    left: 10px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

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

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

.movie-meta,
.movie-line {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.movie-line {
    display: -webkit-box;
    min-height: 66px;
    margin: 10px 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row span {
    padding: 5px 9px;
    font-size: 12px;
}

.hot-panel {
    padding: 22px;
}

.sticky-panel {
    position: sticky;
    top: 86px;
}

.hot-list,
.ranking-list {
    display: grid;
    gap: 10px;
}

.hot-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
}

.hot-link:hover {
    border-color: rgba(34, 211, 238, 0.4);
    background: rgba(8, 47, 73, 0.34);
}

.hot-rank,
.hot-dot {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hot-dot {
    width: 10px;
    height: 10px;
}

.hot-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.hot-extra {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.page-hero {
    margin: 0 0 28px;
    padding: clamp(34px, 6vw, 74px);
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 0%, rgba(34, 211, 238, 0.22), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.88));
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
}

.category-hero .category-strip {
    margin-top: 26px;
    margin-bottom: 0;
}

.filter-panel {
    margin-bottom: 22px;
    padding: 18px;
    display: grid;
    gap: 14px;
}

.filter-panel input {
    width: 100%;
    padding: 14px 16px;
}

.filter-buttons button {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.86);
}

.filter-buttons button.is-active {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

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

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

.player-card {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #001018;
    font-size: 28px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 48px rgba(34, 211, 238, 0.32);
}

.player-card.is-playing .play-overlay {
    display: none;
}

.detail-article {
    margin-top: 24px;
    padding: clamp(22px, 4vw, 34px);
}

.detail-article h1 {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-article h2 {
    margin-top: 30px;
    margin-bottom: 12px;
    font-size: 24px;
}

.detail-article p {
    color: var(--soft);
    line-height: 2;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.32);
    padding: 8px 12px;
    font-size: 14px;
}

.detail-related {
    margin-bottom: 0;
}

.detail-side {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 20px;
}

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

.site-footer {
    max-width: 1440px;
    margin: 20px auto 0;
    padding: 36px 24px 44px;
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(2, 6, 23, 0.58);
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 12px;
    color: var(--text);
}

.footer-grid p {
    line-height: 1.8;
}

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

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

.copyright {
    margin: 18px 0 0;
    text-align: center;
}

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

    .header-search input {
        width: 180px;
    }

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

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

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-slide {
        display: none;
        min-height: auto;
        flex-direction: column;
        align-items: flex-start;
        padding: 54px 28px 80px;
    }

    .hero-slide.is-active {
        display: flex;
    }

    .hero-poster {
        width: min(100%, 330px);
        flex-basis: auto;
    }

    .search-band,
    .section-split,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .search-band {
        display: grid;
    }

    .hot-panel,
    .detail-side,
    .sticky-panel {
        position: static;
    }

    .detail-side {
        grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .header-inner,
    main,
    .site-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .logo-text {
        font-size: 17px;
    }

    .hero-shell,
    .hero-slide,
    .hero-carousel {
        min-height: 540px;
    }

    .hero-content h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .wide-search,
    .mobile-search {
        display: grid;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .footer-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .section-block,
    .search-band,
    .hot-panel,
    .page-hero {
        padding: 20px;
    }

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

    .hot-link {
        grid-template-columns: auto 1fr;
    }

    .hot-extra {
        grid-column: 2;
    }
}
