:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --card: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #22d3ee;
    --accent-strong: #38bdf8;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --radius: 24px;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.18), transparent 26rem),
        radial-gradient(circle at 82% 12%, rgba(37, 99, 235, 0.18), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
    backdrop-filter: blur(20px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

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

.brand-text {
    font-size: 1.06rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--soft);
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 0.92rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: white;
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

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

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: white;
}

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

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    padding: 28px 0 18px;
}

.hero-stage {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: center;
    padding: 56px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.05);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 24%, rgba(34, 211, 238, 0.22), transparent 22rem),
        linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 42%);
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 1;
}

.hero-label,
.section-kicker,
.card-kicker {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p:not(.hero-label) {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 1.8vw, 1.28rem);
    line-height: 1.85;
}

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

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

.hero-tags span,
.detail-meta span,
.tag-cloud span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.66);
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #00111a;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.24);
}

.ghost-btn,
.text-link {
    border: 1px solid var(--line);
    color: white;
    background: rgba(15, 23, 42, 0.58);
}

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

.hero-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.44);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    left: 56px;
    bottom: 34px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    background: var(--accent);
}

.spotlight-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0 26px;
}

.spotlight-strip a,
.filter-panel,
.section-block,
.category-tile,
.category-overview-card,
.detail-hero,
.watch-panel,
.detail-content article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.76));
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.spotlight-strip a {
    padding: 22px;
}

.spotlight-strip span,
.spotlight-strip em {
    display: block;
    color: var(--muted);
    font-style: normal;
}

.spotlight-strip strong {
    display: block;
    margin: 8px 0;
    font-size: 1.15rem;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 22px;
    align-items: end;
    padding: 26px;
    margin: 28px 0;
}

.filter-panel h2,
.section-head h2,
.watch-head h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    letter-spacing: -0.03em;
}

.filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr);
    gap: 12px;
}

.filter-controls label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    outline: none;
    background: rgba(2, 6, 23, 0.74);
}

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

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

.section-head a {
    color: var(--accent);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    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.46);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.86);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #00111a;
    font-size: 0.78rem;
    font-weight: 900;
    background: rgba(34, 211, 238, 0.92);
}

.card-body {
    padding: 15px;
}

.card-body h2 {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0 0 10px;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-body p {
    display: -webkit-box;
    min-height: 4.6em;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.meta-line {
    color: var(--muted);
    font-size: 0.78rem;
}

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

.category-tile,
.category-overview-card {
    padding: 22px;
}

.category-tile span,
.category-title {
    display: block;
    color: white;
    font-size: 1.15rem;
    font-weight: 900;
}

.category-tile p,
.category-overview-card p,
.site-footer p,
.detail-content p,
.page-hero p {
    color: var(--soft);
    line-height: 1.85;
}

.page-shell,
.detail-shell {
    padding-top: 28px;
}

.page-hero {
    min-height: 340px;
    display: grid;
    align-content: end;
    margin-bottom: 28px;
    padding: 42px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.compact-hero {
    min-height: 280px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.78));
}

.page-hero h1 {
    max-width: 840px;
    margin: 0;
    font-size: clamp(2.1rem, 6vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

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

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.4);
}

.rank-row img {
    width: 52px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-num {
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 900;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 32px;
    padding: 30px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    background: rgba(2, 6, 23, 0.72);
}

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

.detail-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 860px;
    color: var(--soft);
    font-size: 1.12rem;
    line-height: 1.85;
}

.detail-meta {
    margin: 20px 0;
}

.watch-panel {
    padding: 28px;
    margin: 28px 0;
}

.watch-head {
    margin-bottom: 18px;
}

.video-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 28px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.8));
    cursor: pointer;
}

.play-cover.hide {
    display: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #00111a;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 16px 50px rgba(34, 211, 238, 0.26);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}

.detail-content article {
    padding: 26px;
}

.related-grid .movie-card-small .card-body p,
.movie-card-small .card-body p {
    -webkit-line-clamp: 2;
    min-height: 3.1em;
}

.mini-links {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}

.mini-links a {
    color: var(--accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-footer {
    width: min(1280px, calc(100% - 32px));
    margin: 42px auto 0;
    padding: 34px 0 28px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 28px;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

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

.copyright {
    margin-top: 28px;
    color: var(--muted);
    font-size: 0.88rem;
}

[data-movie-card].hidden {
    display: none;
}

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

    .nav-toggle {
        display: inline-block;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
        padding: 42px;
    }

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

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

@media (max-width: 820px) {
    main,
    .site-footer,
    .nav-shell,
    .mobile-nav {
        width: min(100% - 22px, 1280px);
    }

    .hero-stage {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: end;
        padding: 28px;
    }

    .hero-poster {
        width: min(220px, 58vw);
    }

    .hero-dots {
        left: 28px;
        bottom: 20px;
    }

    .spotlight-strip,
    .filter-panel,
    .detail-hero,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .section-block,
    .filter-panel,
    .watch-panel {
        padding: 18px;
    }

    .detail-hero {
        padding: 20px;
    }

    .detail-poster {
        max-width: 260px;
    }
}

@media (max-width: 520px) {
    .brand-text {
        font-size: 0.96rem;
    }

    .hero-stage {
        min-height: 700px;
        border-radius: 24px;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list,
    .wide-rank-list,
    .mobile-nav.open {
        grid-template-columns: 1fr;
    }

    .page-hero {
        min-height: 260px;
        padding: 24px;
        border-radius: 24px;
    }
}
