:root {
    color-scheme: dark;
    --bg-main: #020617;
    --bg-soft: rgba(15, 23, 42, 0.76);
    --bg-card: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --amber: #f59e0b;
    --orange: #ea580c;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.18), transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(234, 88, 12, 0.14), transparent 24%),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #000000 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    background: rgba(15, 23, 42, 0.78);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.95));
    border-bottom: 1px solid rgba(245, 158, 11, 0.22);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.header-inner,
.mobile-panel,
.footer-grid,
.footer-bottom,
.page-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.34);
}

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

.brand-text strong,
.footer-brand strong {
    font-size: 1.2rem;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.75rem;
    font-style: normal;
}

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

.nav-link,
.mobile-cat-link {
    border-radius: 12px;
    padding: 10px 14px;
    color: #cbd5e1;
    font-size: 0.94rem;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-cat-link:hover {
    color: #fbbf24;
    background: rgba(51, 65, 85, 0.68);
}

.header-search,
.mobile-search,
.big-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 230px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 0;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    color: #ffffff;
    font-weight: 700;
    padding: 12px 18px;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(245, 158, 11, 0.38);
}

.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 12px;
    color: #fbbf24;
    padding: 11px 16px;
    background: rgba(245, 158, 11, 0.1);
    font-weight: 650;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border-radius: 12px;
    color: #cbd5e1;
    padding: 10px 12px;
    background: rgba(51, 65, 85, 0.66);
}

.mobile-panel {
    padding: 0 0 16px;
}

.mobile-links,
.mobile-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.page-shell {
    padding: 0 0 70px;
}

.inner-page {
    padding-top: 38px;
}

.hero-carousel {
    position: relative;
    min-height: clamp(520px, 68vh, 760px);
    overflow: hidden;
    border-radius: 0 0 28px 28px;
    box-shadow: var(--shadow);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.26)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 54%);
}

.hero-content {
    position: absolute;
    left: clamp(22px, 6vw, 72px);
    right: clamp(22px, 14vw, 260px);
    bottom: clamp(72px, 11vh, 132px);
    max-width: 820px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    width: max-content;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-content h1,
.page-hero h1 {
    margin-top: 18px;
    font-size: clamp(2.25rem, 5.2vw, 5.75rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p {
    margin-top: 20px;
    max-width: 760px;
    color: #cbd5e1;
    font-size: clamp(1rem, 1.5vw, 1.28rem);
    line-height: 1.78;
}

.hero-tags,
.genre-row,
.tag-cloud,
.detail-meta,
.wide-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.genre-row span,
.tag-cloud span,
.detail-meta span,
.wide-tags span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.56);
    padding: 7px 11px;
    font-size: 0.86rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.hero-controls {
    position: absolute;
    left: clamp(20px, 6vw, 72px);
    right: clamp(20px, 6vw, 72px);
    bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-arrow,
.hero-dot {
    pointer-events: auto;
}

.hero-arrow {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(203, 213, 225, 0.44);
}

.hero-dot.is-active {
    width: 32px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.content-section {
    margin-top: 54px;
}

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

.section-head h2 {
    margin-top: 8px;
    font-size: clamp(1.65rem, 2.8vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-head a,
.result-count {
    color: #fbbf24;
    font-weight: 750;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.88));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

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

.movie-card:hover .movie-cover img,
.wide-card:hover .wide-cover img {
    transform: scale(1.06);
}

.cover-label,
.rank-badge,
.list-rank {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    padding: 6px 10px;
}

.cover-label {
    left: 12px;
    bottom: 12px;
}

.rank-badge {
    top: 12px;
    right: 12px;
}

.movie-body {
    padding: 17px;
}

.movie-title,
.wide-title {
    display: -webkit-box;
    overflow: hidden;
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 820;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover,
.wide-title:hover,
.category-copy h2 a:hover {
    color: #fbbf24;
}

.movie-body p,
.wide-info p,
.category-copy p,
.site-footer p,
.detail-info p,
.info-card dd {
    color: var(--muted);
    line-height: 1.75;
}

.movie-body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3.3em;
    margin-top: 10px;
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    color: #94a3b8;
    font-size: 0.8rem;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 130px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.86));
    padding: 24px;
    transition: transform 0.24s ease, background 0.24s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: auto -30px -45px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.18);
}

.category-tile:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.78), rgba(234, 88, 12, 0.78));
}

.category-tile span {
    position: relative;
    z-index: 2;
    display: block;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 850;
}

.category-tile small {
    position: relative;
    z-index: 2;
    display: block;
    margin-top: 10px;
    color: #cbd5e1;
}

.split-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.ranking-panel,
.info-card,
.detail-info,
.player-card,
.poster-card,
.category-overview,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.ranking-panel,
.detail-info,
.info-card,
.poster-card,
.filter-panel {
    padding: 22px;
}

.wide-list,
.ranking-list,
.overview-stack {
    display: grid;
    gap: 16px;
}

.wide-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.64);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.wide-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.38);
}

.wide-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.list-rank {
    left: 10px;
    top: 10px;
}

.wide-info {
    min-width: 0;
    padding: 14px 14px 14px 0;
}

.wide-info p {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.wide-tags span {
    padding: 5px 9px;
    font-size: 0.76rem;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    padding: clamp(34px, 7vw, 78px);
    box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1,
.rank-hero h1,
.search-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.9rem);
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 16px;
    margin-top: 30px;
}

.filter-panel label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 750;
}

.empty-state {
    margin-top: 24px;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: var(--radius);
    padding: 28px;
    color: #94a3b8;
    text-align: center;
}

.category-overview {
    display: grid;
    grid-template-columns: 0.82fr 1.5fr;
    gap: 24px;
    padding: 24px;
}

.category-copy h2 {
    margin-top: 12px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
}

.category-copy p {
    margin: 14px 0 20px;
}

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

.big-search {
    width: min(760px, 100%);
    margin-top: 28px;
}

.big-search input {
    min-height: 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: #94a3b8;
    font-size: 0.94rem;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.detail-main {
    min-width: 0;
}

.player-card {
    overflow: hidden;
    padding: 0;
    background: #000000;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.76));
    color: #ffffff;
    font-size: 1rem;
    font-weight: 850;
}

.player-overlay.is-hidden {
    display: none;
}

.play-circle {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.4);
    font-size: 1.5rem;
}

.detail-info {
    margin-top: 24px;
}

.detail-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}

.detail-info h1 {
    margin-top: 12px;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-info h2,
.info-card h2 {
    margin: 22px 0 10px;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 850;
}

.detail-meta,
.genre-row,
.tag-cloud {
    margin-top: 18px;
}

.one-line {
    margin-top: 22px;
    color: #e2e8f0 !important;
    font-size: 1.08rem;
}

.related-text-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.related-text-links a {
    color: #fbbf24;
    font-size: 0.92rem;
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
}

.poster-card img {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.full-button {
    width: 100%;
    margin-top: 16px;
}

.info-card dl,
.info-card div {
    display: grid;
    gap: 10px;
}

.info-card div {
    grid-template-columns: 70px 1fr;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.info-card div:last-child {
    border-bottom: 0;
}

.info-card dt {
    color: #cbd5e1;
    font-weight: 800;
}

.info-card a {
    color: #fbbf24;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(0, 0, 0, 0.86));
    padding: 54px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 36px;
}

.site-footer h3 {
    margin-bottom: 16px;
    color: #ffffff;
    font-weight: 850;
}

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

.site-footer a {
    color: #94a3b8;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    font-size: 0.9rem;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    display: none;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.34);
}

.back-top.is-visible {
    display: grid;
}

@media (max-width: 1120px) {
    .header-search {
        display: none;
    }

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

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

    .detail-side {
        position: static;
        grid-template-columns: 280px 1fr;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .cards-3,
    .cards-4,
    .category-grid,
    .category-preview,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-overview,
    .filter-panel,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .hero-content {
        right: 24px;
    }
}

@media (max-width: 620px) {
    .header-inner,
    .mobile-panel,
    .footer-grid,
    .footer-bottom,
    .page-shell {
        width: min(100% - 22px, 1280px);
    }

    .brand-text em {
        display: none;
    }

    .hero-carousel {
        min-height: 570px;
        border-radius: 0 0 20px 20px;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 86px;
    }

    .hero-tags span:nth-child(n + 3) {
        display: none;
    }

    .hero-controls {
        left: 16px;
        right: 16px;
    }

    .section-head,
    .detail-title-row,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .cards-3,
    .cards-4,
    .category-grid,
    .category-preview,
    .footer-grid,
    .mobile-links,
    .mobile-categories {
        grid-template-columns: 1fr;
    }

    .wide-card {
        grid-template-columns: 110px 1fr;
    }

    .wide-info p,
    .wide-tags span:nth-child(n + 3) {
        display: none;
    }

    .page-hero {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .big-search {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-info,
    .ranking-panel,
    .info-card,
    .poster-card,
    .filter-panel,
    .category-overview {
        padding: 18px;
    }
}
