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

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.18), transparent 34rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
    z-index: -1;
}

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

img {
    width: 100%;
    display: block;
    object-fit: cover;
}

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

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

.header-shell {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

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

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong,
.footer-brand {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

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

.nav-link,
.mobile-nav-link,
.nav-chip {
    color: var(--soft);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 13px;
    border-radius: 999px;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
}

.header-search {
    width: min(340px, 28vw);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
}

.header-search input,
.filter-controls input,
.filter-controls select {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    width: 100%;
    padding: 8px 10px 8px 14px;
}

.header-search button,
.primary-button,
.ghost-button,
.intro-actions a,
.page-actions a {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-button,
.intro-actions a:first-child,
.page-actions .primary-button {
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 36px rgba(14, 165, 233, 0.25);
}

.header-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.intro-actions a:hover,
.page-actions a:hover {
    transform: translateY(-2px);
}

.ghost-button,
.intro-actions a:last-child,
.page-actions .ghost-button {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: var(--text);
}

.nav-strip {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto 12px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.nav-chip {
    flex: 0 0 auto;
    padding: 8px 13px;
    border: 1px solid rgba(34, 211, 238, 0.16);
    border-radius: 999px;
    font-size: 13px;
    background: rgba(15, 23, 42, 0.55);
}

.nav-chip:hover {
    color: white;
    transform: translateY(-1px);
    background: rgba(34, 211, 238, 0.14);
}

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

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
}

.hero-slider {
    position: relative;
    min-height: clamp(560px, 76vh, 820px);
    margin-top: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.hero-glow {
    position: absolute;
    inset: -20% auto auto -10%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.18);
    filter: blur(70px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
    align-items: center;
    gap: clamp(28px, 5vw, 78px);
    padding: clamp(28px, 5vw, 76px);
    opacity: 0;
    transform: translateX(34px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-visual {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    min-height: 420px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
}

.hero-visual::after,
.poster-frame::after,
.detail-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.42), transparent 45%);
}

.hero-visual img,
.poster-frame img,
.detail-poster img,
.compact-card img,
.ranking-item img {
    height: 100%;
}

.eyebrow,
.section-heading span,
.page-hero span {
    display: inline-flex;
    width: fit-content;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.intro-card p,
.article-card p,
.footer-grid p {
    color: var(--soft);
    line-height: 1.85;
}

.hero-content p {
    max-width: 720px;
    font-size: clamp(17px, 2vw, 23px);
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags {
    margin: 24px 0 30px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 7px 11px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.64);
    font-size: 13px;
}

.hero-actions,
.intro-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-dots {
    position: absolute;
    left: clamp(28px, 5vw, 76px);
    bottom: 32px;
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-dot {
    width: 32px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.3);
    cursor: pointer;
}

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

.feature-bar,
.split-section,
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature-bar {
    margin: 24px 0 0;
}

.feature-bar a,
.intro-card,
.filter-panel,
.article-card,
.category-card a {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.feature-bar a {
    padding: 22px;
    display: grid;
    gap: 8px;
}

.feature-bar strong {
    font-size: 18px;
}

.feature-bar span,
.movie-card-body p,
.compact-card small,
.rank-info small,
.category-card p,
.filter-panel p,
.breadcrumb,
.detail-one-line {
    color: var(--muted);
}

.section,
.page-hero,
.detail-hero {
    margin-top: 62px;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.article-card h2 {
    margin: 12px 0 0;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 46px);
}

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

.section-heading.compact h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.filter-panel {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 20px;
    align-items: center;
    padding: 20px;
    margin-bottom: 24px;
}

.filter-panel h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(110px, 0.55fr));
    gap: 10px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.48);
}

.filter-controls select option {
    color: #0f172a;
}

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: grid;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 28px 72px rgba(14, 165, 233, 0.16);
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

.poster-frame figcaption {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: white;
    background: rgba(2, 6, 23, 0.72);
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.28;
}

.movie-card-body p {
    margin: 0;
    line-height: 1.7;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row.large span {
    font-size: 14px;
    padding: 8px 12px;
}

.split-section {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
}

.ranking-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-item a {
    display: grid;
    grid-template-columns: 54px 58px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-no {
    font-weight: 950;
    color: var(--cyan);
    text-align: center;
}

.ranking-item img {
    height: 76px;
    border-radius: 12px;
}

.rank-info {
    min-width: 0;
    display: grid;
    gap: 5px;
}

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

.rank-year {
    color: var(--soft);
    font-size: 13px;
}

.intro-card {
    position: sticky;
    top: 116px;
    padding: 28px;
}

.intro-card h2 {
    margin: 0 0 16px;
    font-size: 32px;
    line-height: 1.2;
}

.intro-actions {
    margin-top: 22px;
}

.category-showcase {
    display: grid;
    gap: 24px;
}

.home-category-block {
    min-width: 0;
}

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

.compact-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
}

.compact-card img {
    aspect-ratio: 16 / 10;
    background: rgba(15, 23, 42, 0.8);
}

.compact-card span,
.compact-card small {
    display: block;
    padding: 0 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-card span {
    padding-top: 12px;
    font-weight: 900;
}

.compact-card small {
    padding-bottom: 12px;
    padding-top: 4px;
}

.page-hero,
.detail-hero {
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.68));
    box-shadow: var(--shadow);
}

.page-hero {
    padding: clamp(28px, 6vw, 74px);
}

.page-hero.slim {
    min-height: 280px;
}

.page-hero h1 {
    max-width: 1040px;
    font-size: clamp(36px, 6vw, 72px);
}

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

.page-actions {
    margin-top: 28px;
}

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

.category-card a {
    height: 100%;
    display: grid;
    gap: 12px;
    padding: 24px;
}

.category-card span {
    color: var(--cyan);
    font-weight: 950;
}

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

.category-card p {
    margin: 0;
    line-height: 1.75;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.category-preview .compact-card span,
.category-preview .compact-card small {
    font-size: 12px;
}

.ranking-grid .movie-card-link {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.82));
}

.detail-hero {
    padding: clamp(22px, 5vw, 48px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
    gap: clamp(26px, 5vw, 70px);
    align-items: center;
}

.detail-poster {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.detail-info h1 {
    font-size: clamp(40px, 7vw, 82px);
    line-height: 1.02;
}

.detail-one-line {
    max-width: 840px;
    margin: 18px 0 18px;
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-info .primary-button {
    display: inline-flex;
    margin-top: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 28px;
    background: black;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    padding: 0;
    color: white;
    cursor: pointer;
    background: black;
}

.player-cover img {
    width: 100%;
    height: 100%;
    opacity: 0.54;
    filter: saturate(1.1) contrast(1.08);
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.06));
}

.play-circle,
.play-label {
    position: absolute;
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
}

.play-circle {
    top: calc(50% - 52px);
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 6px;
    color: white;
    font-size: 38px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 22px 60px rgba(14, 165, 233, 0.35);
}

.play-label {
    top: calc(50% + 64px);
    font-weight: 950;
    font-size: 18px;
    letter-spacing: 0.08em;
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.article-section {
    display: grid;
    grid-template-columns: minmax(0, 960px);
}

.article-card {
    padding: clamp(24px, 4vw, 46px);
}

.article-card h2 {
    margin-top: 0;
    font-size: 34px;
}

.article-card p {
    margin: 18px 0 0;
    font-size: 17px;
}

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

.empty-state {
    margin: 22px 0 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
}

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

.footer-grid {
    align-items: start;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-grid p {
    margin: 14px 0 0;
}

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

.footer-links a {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.55);
}

.footer-bottom {
    margin-top: 28px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 1180px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-slide {
        grid-template-columns: 0.8fr 1.2fr;
    }

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

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

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

    .menu-button {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide,
    .detail-layout,
    .filter-panel,
    .split-section,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 0;
        max-width: 360px;
    }

    .hero-dots {
        bottom: 22px;
    }

    .feature-bar {
        grid-template-columns: 1fr;
    }

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

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

    .intro-card {
        position: static;
    }
}

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

    .brand-text small {
        display: none;
    }

    .hero-slider {
        min-height: 700px;
        margin-top: 16px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 22px;
        align-content: center;
    }

    .hero-visual {
        max-width: 260px;
    }

    .hero-content h1,
    .detail-info h1,
    .page-hero h1 {
        letter-spacing: -0.04em;
    }

    .hero-actions,
    .page-actions,
    .intro-actions {
        display: grid;
    }

    .section,
    .page-hero,
    .detail-hero {
        margin-top: 38px;
    }

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

    .filter-controls,
    .movie-grid,
    .compact-grid,
    .related-grid,
    .category-grid,
    .category-preview {
        grid-template-columns: 1fr 1fr;
    }

    .movie-card-body h2 {
        font-size: 16px;
    }

    .ranking-item a {
        grid-template-columns: 44px 52px minmax(0, 1fr);
    }

    .rank-year {
        display: none;
    }

    .detail-layout {
        gap: 24px;
    }

    .player-shell {
        border-radius: 18px;
    }

    .play-circle {
        width: 72px;
        height: 72px;
        font-size: 28px;
        top: calc(50% - 42px);
    }

    .play-label {
        top: calc(50% + 42px);
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid,
    .related-grid,
    .category-grid,
    .category-preview,
    .filter-controls {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        min-height: 660px;
    }

    .hero-visual {
        max-width: 210px;
    }
}
