:root {
    color-scheme: dark;
    --bg-main: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.56);
    --bg-card-strong: rgba(15, 23, 42, 0.92);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --danger: #f87171;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #020617 0%, #0f172a 52%, #111827 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section-inner,
.page-inner {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), #fbbf24);
    color: #111827;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--muted);
    font-size: 15px;
}

.primary-nav a {
    transition: color 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a.is-active {
    color: #ffffff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-form {
    position: relative;
    width: 280px;
}

.search-form input,
.page-search input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    color: var(--text);
    padding: 12px 48px 12px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input:focus,
.page-search input:focus,
.filter-select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.search-form button,
.page-search button {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.8);
    color: #fff;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 24px 20px;
    border-top: 1px solid var(--border);
}

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

.mobile-panel nav {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    color: var(--muted);
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

.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-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.75) 0%, transparent 38%);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(100%, 680px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--amber);
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.hero p {
    max-width: 620px;
    margin: 0 0 28px;
    color: #d1d5db;
    font-size: 20px;
    line-height: 1.7;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    color: var(--muted);
    margin-bottom: 30px;
}

.meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    background: var(--amber);
    color: white;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.btn-primary:hover {
    background: var(--amber-dark);
}

.btn-ghost {
    border-color: var(--border);
    background: rgba(15, 23, 42, 0.68);
    color: var(--text);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--amber);
}

.main-block {
    padding: 76px 0;
}

.section-block {
    margin-bottom: 84px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-desc {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--subtle);
    line-height: 1.8;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--bg-card);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(245, 158, 11, 0.38);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.poster-wrap.tall {
    aspect-ratio: 2 / 3;
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-circle {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.94);
    color: #fff;
    font-size: 24px;
    padding-left: 4px;
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.82);
    color: #fff;
    font-size: 12px;
}

.card-body {
    padding: 18px;
}

.card-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card:hover .card-title {
    color: #fbbf24;
}

.card-text {
    margin: 0 0 14px;
    color: var(--subtle);
    line-height: 1.7;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--subtle);
    font-size: 13px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.08);
    color: #fcd34d;
    font-size: 12px;
}

.feature-card {
    min-height: 360px;
}

.feature-card .poster-wrap {
    aspect-ratio: 4 / 3;
}

.feature-card .card-body {
    position: absolute;
    inset: auto 0 0;
    z-index: 3;
    padding: 28px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.2));
}

.horizontal-scroller {
    overflow-x: auto;
    padding-bottom: 14px;
}

.horizontal-track {
    display: flex;
    gap: 24px;
    width: max-content;
}

.horizontal-track .movie-card {
    width: 310px;
}

.category-card {
    display: grid;
    min-height: 210px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.22), transparent 34%),
        rgba(30, 41, 59, 0.52);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 900;
}

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

.rank-panel,
.glass-panel {
    border: 1px solid var(--border);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 92px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.48);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(51, 65, 85, 0.72);
    transform: translateX(4px);
}

.rank-num {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    font-weight: 900;
}

.rank-poster {
    width: 92px;
    height: 58px;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    margin: 0 0 6px;
    font-weight: 800;
}

.rank-info {
    color: var(--subtle);
    font-size: 13px;
}

.rank-score {
    color: #fbbf24;
    font-size: 18px;
    font-weight: 900;
}

.page-hero {
    padding: 70px 0 42px;
    background:
        radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.2), transparent 28%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.84));
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--subtle);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #fff;
}

.page-hero h1 {
    max-width: 920px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
    font-size: 17px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin: 0 0 26px;
}

.page-search {
    position: relative;
}

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

.filter-chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--muted);
    padding: 10px 14px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.no-results {
    padding: 48px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    text-align: center;
    color: var(--muted);
}

.no-results.is-hidden,
.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

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

.player-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: #020617;
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.32));
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-cover .play-icon {
    display: inline-grid;
    place-items: center;
    width: 82px;
    height: 82px;
    padding-left: 6px;
    border-radius: 999px;
    background: var(--amber);
    box-shadow: 0 20px 48px rgba(245, 158, 11, 0.38);
    font-size: 34px;
}

.play-cover .play-text {
    font-size: 18px;
    font-weight: 900;
}

.player-message {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    place-items: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.86);
    color: var(--danger);
    text-align: center;
}

.player-message.is-visible {
    display: grid;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
}

.detail-card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-card h2,
.detail-card h3 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 900;
}

.detail-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

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

.detail-meta-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.52);
}

.detail-meta-item strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.detail-meta-item span {
    color: var(--subtle);
}

.side-poster {
    overflow: hidden;
    border-radius: 22px;
    background: #0f172a;
}

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

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

.compact-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.48);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: rgba(51, 65, 85, 0.72);
    transform: translateX(4px);
}

.compact-card img {
    width: 96px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
}

.compact-card h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.compact-card p {
    margin: 0;
    color: var(--subtle);
    font-size: 12px;
}

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

.footer-inner {
    padding-top: 48px;
    padding-bottom: 42px;
}

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

.footer-title {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.footer-text,
.footer-links {
    color: var(--subtle);
    line-height: 1.8;
}

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

.footer-links a:hover {
    color: #fff;
}

.copyright-line {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 1080px) {
    .primary-nav,
    .header-actions {
        display: none;
    }

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

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

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

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .header-inner,
    .footer-inner,
    .section-inner,
    .page-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero {
        height: 560px;
    }

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

    .hero p {
        font-size: 17px;
    }

    .grid-5,
    .grid-4,
    .grid-3 {
        grid-template-columns: 1fr;
    }

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

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

    .rank-score {
        grid-column: 3;
        font-size: 15px;
    }

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

    .horizontal-track .movie-card {
        width: 270px;
    }
}
