* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.74);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --green: #14b8a6;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

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

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    color: #cbd5e1;
    font-weight: 600;
    border-radius: 12px;
    transition: 0.25s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
    color: white;
    background: rgba(51, 65, 85, 0.76);
}

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

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-link {
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.7);
}

.hero {
    position: relative;
    height: min(760px, 78vh);
    min-height: 560px;
    overflow: hidden;
}

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

.hero-slide.active {
    opacity: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06) contrast(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.88) 42%, rgba(15, 23, 42, 0.34) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 42%, rgba(2, 6, 23, 0.35) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
    padding-top: 36px;
}

.hero-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid rgba(34, 211, 238, 0.45);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.13);
    color: #67e8f9;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 24px 0 18px;
    font-size: clamp(44px, 8vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 720px;
    margin: 0 0 28px;
    color: #cbd5e1;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.7;
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.rank-meta span,
.card-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.primary-button,
.ghost-button,
.rank-action,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.25s ease;
}

.primary-button,
.rank-action {
    padding: 14px 24px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.22);
}

.ghost-button {
    padding: 14px 24px;
    color: white;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.54);
}

.primary-button:hover,
.ghost-button:hover,
.rank-action:hover,
.text-link:hover {
    transform: translateY(-2px);
}

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

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

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

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

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.section-heading > span {
    width: 5px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
}

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

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

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

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

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 12px 36px rgba(34, 211, 238, 0.3);
}

.card-body {
    padding: 18px;
}

.card-meta {
    margin-bottom: 12px;
    font-size: 12px;
}

.card-title {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
}

.card-title a:hover,
.rank-info h2 a:hover,
.category-body h2 a:hover {
    color: #67e8f9;
}

.card-desc {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.7;
}

.card-desc.compact {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag {
    padding: 6px 10px;
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.11);
    border: 1px solid rgba(34, 211, 238, 0.18);
    font-size: 12px;
}

.search-panel {
    margin-top: -54px;
    position: relative;
    z-index: 8;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.search-box input,
.category-search-panel input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    outline: none;
    background: rgba(2, 6, 23, 0.76);
    color: white;
    font: inherit;
}

.search-box input {
    padding: 15px 18px;
}

.category-search-panel input {
    margin-top: 24px;
    padding: 15px 18px;
}

.search-results {
    display: none;
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.94);
    overflow: hidden;
}

.search-results.is-open {
    display: grid;
}

.search-result {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    padding: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.search-result:last-child {
    border-bottom: 0;
}

.search-result img {
    width: 64px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
}

.search-result h3 {
    margin: 3px 0 6px;
    font-size: 16px;
}

.search-result p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

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

.category-pill {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    transition: 0.25s ease;
}

.category-pill:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.38);
}

.category-pill strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.category-pill span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 86px 58px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.rank-poster img {
    width: 86px;
    height: 116px;
    border-radius: 16px;
    object-fit: cover;
    background: #0f172a;
}

.rank-number {
    font-size: 30px;
    font-weight: 900;
    color: #67e8f9;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-info p {
    margin: 0 0 12px;
    color: #cbd5e1;
    line-height: 1.7;
}

.rank-meta {
    font-size: 12px;
}

.sub-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.sub-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(36px, 5vw, 66px);
}

.sub-hero p {
    max-width: 780px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

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

.category-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 230px;
    background: #0f172a;
}

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

.category-body {
    padding: 24px;
}

.category-body h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.category-body p {
    margin: 0 0 18px;
    color: #cbd5e1;
    line-height: 1.8;
}

.text-link {
    color: #67e8f9;
}

.detail-hero {
    padding: 82px 0;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(1.1);
    transform: scale(1.05);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #020617, rgba(2, 6, 23, 0.62));
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster img {
    width: 280px;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    object-fit: cover;
    background: #0f172a;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.48);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #93c5fd;
    font-weight: 700;
}

.detail-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 20px;
    line-height: 1.7;
}

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

.detail-main {
    padding: 54px 0 72px;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.42);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.16), rgba(2, 6, 23, 0.46));
    cursor: pointer;
    transition: 0.25s ease;
}

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

.player-start {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    font-size: 32px;
    box-shadow: 0 22px 60px rgba(34, 211, 238, 0.34);
}

.detail-article {
    margin-top: 36px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.68);
}

.detail-article h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.detail-article h2:not(:first-child) {
    margin-top: 30px;
}

.detail-article p {
    margin: 0;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 2;
}

.related-section {
    padding-top: 54px;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 900;
}

.footer-text {
    max-width: 520px;
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-title {
    margin: 0 0 16px;
    font-size: 18px;
}

.site-footer a {
    display: block;
    margin: 10px 0;
    color: #cbd5e1;
    transition: 0.2s ease;
}

.site-footer a:hover {
    color: #67e8f9;
}

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

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

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

    .category-card-grid {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        height: auto;
        min-height: 650px;
    }

    .hero-content {
        padding: 82px 0 110px;
    }

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

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

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

    .rank-row {
        grid-template-columns: 72px 42px 1fr;
    }

    .rank-poster img {
        width: 72px;
        height: 98px;
    }

    .rank-action {
        grid-column: 3;
        justify-self: start;
    }

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

    .detail-poster img {
        width: min(260px, 70vw);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .brand-subtitle {
        display: none;
    }

    .hero-copy {
        padding-top: 20px;
    }

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

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

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

    .category-card {
        grid-template-columns: 1fr;
    }

    .category-cover {
        min-height: 200px;
    }

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

    .rank-number {
        font-size: 24px;
    }

    .rank-action {
        grid-column: auto;
    }

    .detail-article {
        padding: 24px;
    }
}
