:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.2);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-2: #fbbf24;
    --danger: #f87171;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

.brand-text {
    font-size: 21px;
    color: #ffffff;
}

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

.desktop-nav a,
.mobile-nav a {
    color: var(--soft);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #ffffff;
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 300px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 13px;
    background: rgba(2, 6, 23, 0.62);
    overflow: hidden;
}

.nav-search input,
.mobile-nav input,
.catalog-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.nav-search input {
    padding: 11px 12px;
}

.nav-search button,
.mobile-nav button {
    border: 0;
    color: #111827;
    background: var(--accent);
    padding: 11px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nav-search button:hover,
.mobile-nav button:hover {
    background: var(--accent-2);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

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

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

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

.mobile-nav form {
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.62);
}

.mobile-nav input {
    padding: 11px 12px;
}

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #000000;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 42%, rgba(0, 0, 0, 0.08) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0) 55%, #020617 100%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    max-width: 1180px;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--soft);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 30px;
    margin-bottom: 14px;
    padding: 5px 12px;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 13px;
    font-weight: 800;
}

.hero-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--soft);
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.32);
}

.btn.secondary {
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.54);
}

.btn.secondary:hover {
    border-color: rgba(255, 255, 255, 0.52);
}

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

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

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

.quick-entry {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: -34px;
    position: relative;
    z-index: 10;
}

.quick-entry a {
    display: grid;
    place-items: center;
    min-height: 68px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    color: #ffffff;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-entry a:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.55);
}

.section-block {
    padding: 58px 0 0;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading span {
    color: var(--accent);
    font-weight: 800;
}

.section-heading h2,
.page-hero h1,
.detail-intro h1 {
    margin: 7px 0 10px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

.compact-heading h2 {
    font-size: 28px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.48);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

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

.movie-card:hover .poster-link img,
.category-tile:hover img,
.mini-card:hover img {
    transform: scale(1.08);
}

.poster-badge,
.poster-type {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    top: 12px;
    color: #111827;
    background: var(--accent);
}

.poster-type {
    right: 12px;
    bottom: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
}

.card-content {
    padding: 17px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 50px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.card-title:hover {
    color: var(--accent-2);
}

.card-meta,
.card-desc {
    color: var(--muted);
    line-height: 1.7;
}

.card-meta {
    margin: 8px 0 6px;
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    margin: 0 0 13px;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 5px 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.32);
    font-size: 12px;
}

.split-block {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
    gap: 28px;
}

.wide-panel,
.rank-panel,
.player-card,
.text-panel,
.info-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
}

.wide-panel,
.rank-panel {
    padding: 26px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.3);
    transition: background 0.2s ease;
}

.mini-card:hover {
    background: rgba(51, 65, 85, 0.5);
}

.mini-card img {
    width: 108px;
    height: 70px;
    border-radius: 13px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    color: #ffffff;
    line-height: 1.45;
}

.mini-card em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.short-rank {
    display: grid;
    gap: 13px;
}

.rank-item {
    display: grid;
    grid-template-columns: 54px 118px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.28);
}

.short-rank .rank-item {
    grid-template-columns: 44px 1fr;
}

.short-rank .rank-cover {
    display: none;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 900;
}

.rank-cover img {
    width: 118px;
    height: 76px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

.rank-body p {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 10px;
    color: var(--muted);
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--accent-2);
    font-weight: 800;
}

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

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: #0f172a;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.category-tile:hover img {
    opacity: 0.82;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.86));
}

.category-tile span {
    position: absolute;
    inset: auto 18px 18px;
    z-index: 2;
}

.category-tile strong,
.category-tile em {
    display: block;
}

.category-tile strong {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    color: var(--soft);
    font-size: 14px;
    font-style: normal;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 82px 0 48px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background:
        radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.2), transparent 30rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.compact-page-hero p {
    max-width: 820px;
}

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

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

.catalog-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
    padding: 9px 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    border-color: rgba(245, 158, 11, 0.55);
    color: #111827;
    background: var(--accent);
}

.catalog-search {
    display: grid;
    gap: 8px;
    min-width: 320px;
    color: var(--muted);
    font-weight: 700;
}

.wide-search {
    width: min(720px, 100%);
}

.catalog-search input {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    padding: 13px 15px;
}

.searchable-grid .is-hidden {
    display: none;
}

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

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.detail-backdrop,
.detail-shade {
    position: absolute;
    inset: 0;
}

.detail-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px);
    transform: scale(1.04);
}

.detail-shade {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.93), rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.2)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.24), #020617 100%);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    padding: 70px 0 48px;
}

.detail-cover {
    width: 260px;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-intro p {
    max-width: 820px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta-line {
    margin: 18px 0;
}

.detail-tags {
    max-width: 900px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 48px 0 70px;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card,
.text-panel,
.info-card {
    padding: 24px;
}

.player-card h2,
.text-panel h2,
.info-card h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: #000000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-mark {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.36);
    font-size: 28px;
}

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

.player-notice {
    margin: 14px 0 0;
    color: var(--danger);
}

.text-panel p {
    margin: 0;
    color: var(--soft);
    line-height: 1.9;
    font-size: 16px;
}

.detail-side {
    display: grid;
    gap: 22px;
    align-content: start;
}

.info-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.info-card dt {
    color: var(--muted);
}

.info-card dd {
    margin: 0;
    color: #ffffff;
}

.related-list {
    display: grid;
    gap: 12px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.site-footer p {
    max-width: 460px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

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

.footer-bottom {
    padding: 18px 0 28px;
    color: #64748b;
    text-align: center;
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

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

    .split-block,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .hero-carousel {
        height: 560px;
    }

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

    .quick-entry {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .catalog-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-search {
        min-width: 0;
    }

    .rank-item {
        grid-template-columns: 44px 1fr;
    }

    .rank-cover {
        display: none;
    }

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

    .detail-cover {
        width: 190px;
    }

    .mini-card {
        grid-template-columns: 96px 1fr;
    }

    .mini-card img {
        width: 96px;
        height: 64px;
    }
}
