:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --bg-soft: #1c1917;
    --bg-panel: #292524;
    --bg-panel-light: #44403c;
    --border: #44403c;
    --text: #fafaf9;
    --muted: #a8a29e;
    --muted-deep: #78716c;
    --accent: #d97706;
    --accent-light: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 0%, rgba(217, 119, 6, 0.16), transparent 32rem),
        radial-gradient(circle at 88% 10%, rgba(251, 191, 36, 0.08), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(28, 25, 23, 0.94);
    border-bottom: 1px solid rgba(68, 64, 60, 0.78);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.26);
}

.nav-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff7ed;
    background: linear-gradient(135deg, var(--accent-light), #b45309);
    box-shadow: 0 12px 34px rgba(217, 119, 6, 0.34);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    color: #fffbeb;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.78rem;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    color: #d6d3d1;
    font-weight: 650;
}

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

.site-nav a:hover {
    color: var(--accent-light);
}

.nav-search,
.filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-search input,
.filter-form input,
.filter-form select {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: rgba(41, 37, 36, 0.86);
    outline: none;
    padding: 0 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.nav-search input:focus,
.filter-form input:focus,
.filter-form select:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.13);
}

.nav-search button,
.filter-form button,
.primary-btn,
.ghost-btn,
.plain-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.filter-form button,
.primary-btn {
    color: #fff7ed;
    background: linear-gradient(135deg, var(--accent-light), #b45309);
    padding: 0 18px;
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.26);
}

.nav-search button:hover,
.filter-form button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.plain-link:hover {
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: var(--bg-panel);
}

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 72px);
    padding: 56px 0 40px;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.34), rgba(12, 10, 9, 1));
}

.hero-glow {
    position: absolute;
    inset: -30% -15% auto auto;
    width: 58vw;
    height: 58vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 60%);
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-slider {
    position: relative;
    min-height: 650px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
    gap: 44px;
    align-items: center;
    min-height: 610px;
}

.hero-slide.is-active {
    display: grid;
    animation: fadeIn 0.48s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-light);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0;
    color: #fff7ed;
    font-size: clamp(2.35rem, 5.2vw, 5.35rem);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    color: #fef3c7;
    font-size: clamp(1.45rem, 2.4vw, 2.65rem);
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 0 0 26px;
    color: #d6d3d1;
    font-size: clamp(1.02rem, 1.5vw, 1.3rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0 22px;
}

.ghost-btn {
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.42);
    background: rgba(41, 37, 36, 0.76);
    padding: 0 18px;
}

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

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 999px;
    color: #fef3c7;
    background: var(--accent-soft);
    padding: 5px 10px;
    font-size: 0.8rem;
}

.hero-media {
    position: relative;
    display: block;
    min-height: 520px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 32px;
    overflow: hidden;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
}

.hero-media img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.55s ease;
}

.hero-media:hover img {
    transform: scale(1.08);
}

.hero-media::after,
.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.78));
    pointer-events: none;
}

.hero-play,
.poster-play {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    color: white;
    background: rgba(217, 119, 6, 0.88);
    box-shadow: 0 16px 44px rgba(217, 119, 6, 0.32);
}

.hero-play {
    left: 24px;
    bottom: 24px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    font-size: 1.4rem;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: #57534e;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 74px;
    background: var(--accent-light);
}

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

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

.section-heading span {
    display: block;
    color: var(--accent-light);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.section-heading h2 {
    margin: 4px 0 0;
    color: #fff7ed;
    font-size: clamp(1.65rem, 2.6vw, 2.35rem);
    line-height: 1.12;
}

.section-heading a,
.plain-link {
    color: #fef3c7;
}

.left-heading {
    justify-content: flex-start;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(68, 64, 60, 0.72);
    border-radius: var(--radius);
    background: rgba(41, 37, 36, 0.84);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
    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.56);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4.1;
    background: #1c1917;
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 3;
    top: 12px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(12, 10, 9, 0.72);
    padding: 4px 9px;
    font-size: 0.76rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.year-badge {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: rgba(217, 119, 6, 0.86);
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

.movie-card-body {
    padding: 16px;
}

.movie-card-body h2 {
    margin: 0 0 8px;
    color: #fff7ed;
    font-size: 1.04rem;
    line-height: 1.3;
}

.movie-card-body h2 a:hover {
    color: var(--accent-light);
}

.movie-meta,
.movie-desc {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.movie-desc {
    display: -webkit-box;
    min-height: 3.1em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card,
.category-overview-card,
.content-card,
.filter-panel {
    border: 1px solid rgba(68, 64, 60, 0.72);
    border-radius: var(--radius);
    background: rgba(41, 37, 36, 0.72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.category-card {
    min-height: 172px;
    padding: 20px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.58);
    background: rgba(68, 64, 60, 0.84);
}

.category-card span,
.category-title {
    display: block;
    color: #fff7ed;
    font-size: 1.18rem;
    font-weight: 850;
}

.category-card p,
.category-overview-card p {
    color: var(--muted);
    font-size: 0.92rem;
}

.category-card small {
    color: #fef3c7;
}

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

.category-overview-card {
    padding: 24px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.category-preview-links a {
    border-radius: 999px;
    color: #fef3c7;
    background: var(--accent-soft);
    padding: 5px 10px;
    font-size: 0.85rem;
}

.page-hero {
    padding: 72px 0;
    background:
        linear-gradient(135deg, rgba(41, 37, 36, 0.9), rgba(12, 10, 9, 1)),
        radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.2), transparent 28rem);
    border-bottom: 1px solid rgba(68, 64, 60, 0.72);
}

.slim-hero h1 {
    font-size: clamp(2.2rem, 4vw, 4.2rem);
}

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

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

.filter-panel {
    margin-top: 34px;
    padding: 18px;
}

.filter-form {
    flex-wrap: wrap;
}

.filter-form input {
    flex: 1 1 300px;
}

.filter-form select {
    flex: 0 1 170px;
}

.search-state {
    min-height: 1.2em;
    margin: 8px 0 0;
    color: var(--muted);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 70px 90px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 12px 18px;
}

.ranking-rank {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #fff7ed;
    background: linear-gradient(135deg, var(--accent-light), #b45309);
    font-size: 1.2rem;
    font-weight: 900;
}

.ranking-cover {
    display: block;
    overflow: hidden;
    width: 78px;
    height: 104px;
    border-radius: 12px;
    background: #1c1917;
}

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

.ranking-info h2 {
    margin: 0 0 6px;
    color: #fff7ed;
    font-size: 1.08rem;
}

.ranking-info p {
    margin: 0 0 8px;
    color: var(--muted);
}

.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted-deep);
    font-size: 0.84rem;
}

.plain-link {
    border: 1px solid rgba(245, 158, 11, 0.32);
    background: rgba(245, 158, 11, 0.12);
    padding: 0 14px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    min-height: 620px;
    padding: 58px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 28px;
    background: #1c1917;
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-meta span {
    border-radius: 999px;
    color: #e7e5e4;
    background: rgba(41, 37, 36, 0.76);
    padding: 7px 12px;
}

.video-player {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    color: #fff7ed;
    background: linear-gradient(135deg, var(--accent-light), #b45309);
    box-shadow: 0 18px 56px rgba(217, 119, 6, 0.46);
    font-size: 2rem;
    transform: translateX(2px);
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 36px;
}

.content-card {
    padding: 26px;
}

.content-card h2 {
    margin: 0 0 14px;
    color: #fff7ed;
    font-size: 1.35rem;
}

.content-card p {
    margin: 0;
    color: #d6d3d1;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid rgba(68, 64, 60, 0.78);
    background: #1c1917;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 34px;
    padding: 44px 0 32px;
}

.footer-brand p,
.footer-links a,
.footer-bottom p {
    color: var(--muted);
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #fff7ed;
    font-size: 1.05rem;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(68, 64, 60, 0.68);
    padding: 18px 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .nav-bar {
        grid-template-columns: auto auto;
    }

    .site-nav,
    .nav-search {
        display: none;
    }

    .nav-toggle {
        display: inline-grid;
        justify-self: end;
        place-items: center;
    }

    .site-nav.is-open,
    .nav-search.is-open {
        display: flex;
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: 100%;
    }

    .site-nav.is-open {
        flex-wrap: wrap;
        padding-top: 4px;
    }

    .nav-search.is-open input {
        width: 100%;
        flex: 1;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-slider {
        min-height: auto;
        padding-bottom: 42px;
    }

    .hero-media,
    .hero-media img {
        min-height: 420px;
    }

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

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

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

    .hero-section {
        min-height: auto;
        padding-top: 34px;
    }

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

    .hero-media,
    .hero-media img {
        min-height: 360px;
    }

    .hero-dots {
        left: 50%;
        transform: translateX(-50%);
    }

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

    .movie-grid,
    .compact-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 26px;
    }

    .detail-poster {
        max-width: 310px;
    }

    .ranking-item {
        grid-template-columns: 48px 72px 1fr;
        padding: 12px;
    }

    .ranking-rank {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 1rem;
    }

    .ranking-cover {
        width: 64px;
        height: 86px;
    }

    .ranking-item .plain-link {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-form input,
    .filter-form select,
    .filter-form button {
        width: 100%;
        flex: initial;
    }
}
