:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --amber: #f59e0b;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 5%, rgba(34, 211, 238, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.16), transparent 26rem),
        linear-gradient(135deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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 {
    width: min(1480px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.logo-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: #00111f;
    font-weight: 900;
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.32);
}

.logo-text strong,
.logo-text small {
    display: block;
    line-height: 1.15;
}

.logo-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--soft);
    font-weight: 600;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--cyan);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
}

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

.header-search input {
    width: 170px;
    padding: 8px 10px;
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-row button,
.load-more-wrap button,
.large-search button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.header-search button,
.primary-btn {
    color: #04111f;
    background: linear-gradient(135deg, var(--cyan), #38bdf8);
    border-radius: 999px;
    box-shadow: 0 14px 36px rgba(34, 211, 238, 0.22);
}

.header-search button {
    padding: 8px 16px;
}

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

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

.mobile-nav a {
    display: block;
    padding: 12px;
    border-radius: 12px;
    color: var(--soft);
}

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

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

.hero-carousel {
    position: relative;
    min-height: 680px;
    margin: 30px 0 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
}

.hero-slides {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 44px;
    padding: clamp(30px, 5vw, 78px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(16px) saturate(1.2);
    transform: scale(1.08);
    opacity: 0.34;
}

.hero-backdrop,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62), rgba(15, 23, 42, 0.28)),
        radial-gradient(circle at 70% 22%, rgba(34, 211, 238, 0.24), transparent 22rem);
}

.hero-content,
.hero-cover {
    position: relative;
    z-index: 2;
}

.eyebrow,
.section-heading span,
.panel-title {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 18px;
    color: var(--text);
    font-size: clamp(40px, 5vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.85;
}

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

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
}

.secondary-btn {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.secondary-btn:hover,
.header-search button:hover {
    transform: translateY(-2px);
}

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

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

.hero-tags span,
.detail-facts span,
.tag-row span {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.64);
    font-size: 12px;
}

.hero-cover {
    display: block;
    justify-self: end;
    width: min(360px, 100%);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(30, 41, 59, 0.88));
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

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

.hero-side-panel,
.rank-panel,
.detail-side,
.detail-article,
.category-card,
.player-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.hero-side-panel {
    padding: 22px;
}

.hero-thumbs {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 68px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--soft);
    text-align: left;
    background: rgba(15, 23, 42, 0.58);
    cursor: pointer;
}

.hero-thumb span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-left: 12px;
    border-radius: 12px;
    background: rgba(34, 211, 238, 0.1);
    color: var(--cyan);
    font-weight: 900;
}

.hero-thumb strong {
    padding-right: 10px;
}

.hero-thumb.is-active {
    border-color: rgba(34, 211, 238, 0.62);
    background: rgba(34, 211, 238, 0.12);
    color: var(--text);
}

.quick-categories,
.content-section {
    margin: 28px 0;
}

.quick-categories {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.62);
}

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 3vw, 42px);
    letter-spacing: -0.04em;
}

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

.section-heading.slim {
    align-items: center;
    margin-bottom: 14px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pills a,
.filter-row button {
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(30, 41, 59, 0.68);
}

.category-pills a:hover,
.filter-row button:hover,
.filter-row button.is-active {
    color: #03131d;
    border-color: transparent;
    background: var(--cyan);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 48px 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.42);
    background: rgba(30, 41, 59, 0.88);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(34, 211, 238, 0.24), transparent 10rem),
        linear-gradient(135deg, #0f172a, #020617);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(2, 6, 23, 0.92));
}

.poster-title {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    color: var(--text);
    font-weight: 900;
    line-height: 1.35;
}

.score {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 999px;
    color: #1a1200;
    background: linear-gradient(135deg, #fde68a, var(--amber));
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

.card-meta {
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

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

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 58px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.tag-row {
    gap: 6px;
}

.split-layout,
.detail-text-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.rank-panel {
    padding: 22px;
    align-self: start;
}

.rank-mini-list {
    display: grid;
    gap: 10px;
}

.rank-mini-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-mini-item span {
    color: var(--cyan);
    font-weight: 900;
}

.rank-mini-item em {
    color: var(--amber);
    font-style: normal;
    font-weight: 900;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}

.is-hidden {
    display: none !important;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    margin: 30px 0 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86));
    box-shadow: var(--shadow);
}

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

.small-hero h1,
.category-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.inline-filter,
.large-search {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.inline-filter {
    padding: 9px 14px;
}

.inline-filter input {
    width: 220px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

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

.category-card {
    overflow: hidden;
}

.category-card-main {
    display: block;
    padding: 24px;
    background:
        radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.18), transparent 12rem),
        rgba(15, 23, 42, 0.76);
}

.category-card-main span {
    color: var(--text);
    font-size: 24px;
    font-weight: 900;
}

.category-card-main p {
    color: var(--muted);
    line-height: 1.7;
}

.category-samples {
    display: grid;
    gap: 8px;
    padding: 0 24px 24px;
}

.category-samples a {
    color: var(--soft);
    font-size: 14px;
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 76px 96px minmax(0, 1fr) 110px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    font-weight: 900;
}

.ranking-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.86);
}

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

.ranking-info p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.65;
}

.ranking-score {
    text-align: right;
}

.ranking-score strong,
.ranking-score span {
    display: block;
}

.ranking-score strong {
    color: var(--amber);
    font-size: 28px;
}

.ranking-score span {
    color: var(--muted);
}

.large-search {
    width: min(680px, 100%);
    margin-top: 26px;
    padding: 8px;
}

.large-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
}

.detail-hero {
    isolation: isolate;
    min-height: 560px;
    background-image: var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-wrap {
    position: relative;
    z-index: 2;
    padding: clamp(26px, 5vw, 70px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-main {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(24px, 5vw, 52px);
    align-items: center;
    margin-top: 34px;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 30px 76px rgba(0, 0, 0, 0.48);
}

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.detail-facts {
    margin: 18px 0;
}

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

.detail-section {
    scroll-margin-top: 96px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 50% 20%, rgba(34, 211, 238, 0.16), transparent 20rem),
        #020617;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--text);
    border: 0;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 15rem),
        rgba(2, 6, 23, 0.48);
    cursor: pointer;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #04111f;
    background: var(--cyan);
    box-shadow: 0 0 42px rgba(34, 211, 238, 0.5);
    font-size: 30px;
}

.player-overlay strong {
    font-size: 20px;
}

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

.detail-article,
.detail-side {
    padding: 26px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-article p {
    color: var(--soft);
    font-size: 17px;
    line-height: 1.9;
}

.detail-side dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-side div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    color: var(--text);
}

.compact-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.62);
}

.compact-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.8);
}

.compact-card strong,
.compact-card small {
    display: block;
}

.compact-card small {
    margin-top: 6px;
    color: var(--muted);
}

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

.footer-inner {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    display: block;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 20px;
}

.footer-inner p {
    margin: 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    color: var(--soft);
    font-weight: 700;
}

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

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

    .hero-carousel,
    .split-layout,
    .detail-text-grid {
        grid-template-columns: 1fr;
    }

    .hero-side-panel {
        order: -1;
    }

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

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

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

@media (max-width: 860px) {
    .header-inner {
        height: auto;
        min-height: 70px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

    .header-search input {
        flex: 1;
        width: auto;
    }

    .hero-carousel,
    .hero-slides {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
    }

    .hero-cover {
        justify-self: start;
        width: 210px;
    }

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

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

    .section-heading {
        display: block;
    }

    .inline-filter {
        margin-top: 14px;
    }

    .inline-filter input {
        width: 100%;
    }

    .ranking-row {
        grid-template-columns: 48px 76px minmax(0, 1fr);
    }

    .ranking-score {
        grid-column: 3;
        text-align: left;
    }

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

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

    .footer-inner {
        display: block;
    }

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

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

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

    .logo-text small {
        display: none;
    }

    .hero-carousel,
    .hero-slides {
        min-height: 700px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .hero-content p,
    .page-hero p,
    .detail-one-line {
        font-size: 15px;
    }

    .movie-grid,
    .all-grid,
    .featured-grid,
    .compact-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 44px 66px minmax(0, 1fr);
        gap: 10px;
    }

    .ranking-info p {
        display: none;
    }
}
